Merge lp:~dobey/libubuntuone/just-load-already into lp:libubuntuone

Proposed by dobey on 2012-04-06
Status: Merged
Approved by: Brian Curtin on 2012-04-06
Approved revision: 151
Merged at revision: 151
Proposed branch: lp:~dobey/libubuntuone/just-load-already
Merge into: lp:libubuntuone
Diff against target: 46 lines (+2/-29)
1 file modified
libubuntuoneui/u1-music-store.c (+2/-29)
To merge this branch: bzr merge lp:~dobey/libubuntuone/just-load-already
Reviewer Review Type Date Requested Status
Brian Curtin (community) Approve on 2012-04-06
Diego Sarmentero (community) 2012-04-06 Approve on 2012-04-06
Review via email: mp+101131@code.launchpad.net

Commit message

Don't bother trying to auth u1ms urls, as we auth on checkout anyway

To post a comment you must log in.
Diego Sarmentero (diegosarmentero) wrote :

+1

review: Approve
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libubuntuoneui/u1-music-store.c'
--- libubuntuoneui/u1-music-store.c 2012-04-05 14:09:11 +0000
+++ libubuntuoneui/u1-music-store.c 2012-04-06 16:38:18 +0000
@@ -1345,8 +1345,6 @@
1345void1345void
1346u1_music_store_load_store_link (U1MusicStore *music_store, const gchar *url)1346u1_music_store_load_store_link (U1MusicStore *music_store, const gchar *url)
1347{1347{
1348 gchar *real_url, *oauth_consumer_token, *oauth_consumer_secret, *oauth_token, *oauth_token_secret, *quoted_url;
1349
1350 g_return_if_fail (U1_IS_MUSIC_STORE (music_store));1348 g_return_if_fail (U1_IS_MUSIC_STORE (music_store));
1351 g_return_if_fail (url != NULL);1349 g_return_if_fail (url != NULL);
13521350
@@ -1359,31 +1357,6 @@
1359 /* Stop any currently pending or active page loads first */1357 /* Stop any currently pending or active page loads first */
1360 webkit_web_view_stop_loading (WEBKIT_WEB_VIEW (music_store->priv->web_viewer));1358 webkit_web_view_stop_loading (WEBKIT_WEB_VIEW (music_store->priv->web_viewer));
13611359
1362 quoted_url = g_uri_escape_string (url, NULL, FALSE);1360 webkit_web_view_open (WEBKIT_WEB_VIEW (music_store->priv->web_viewer),
1363 real_url = g_strdup_printf ("%s%s?forward_on_to_url=%s",1361 url);
1364 music_store->priv->base_url,
1365 U1_STORE_URL,
1366 quoted_url);
1367 g_free (quoted_url);
1368
1369 /* Sign the URL if we have OAuth tokens */
1370 get_credentials (music_store,
1371 &oauth_consumer_token,
1372 &oauth_consumer_secret,
1373 &oauth_token,
1374 &oauth_token_secret);
1375 if (oauth_consumer_token != NULL && oauth_consumer_secret != NULL &&
1376 oauth_token != NULL && oauth_token_secret != NULL) {
1377 gchar *signed_url;
1378
1379 signed_url = oauth_sign_url2 (real_url, NULL, OA_HMAC, "GET",
1380 oauth_consumer_token, oauth_consumer_secret,
1381 oauth_token, oauth_token_secret);
1382 webkit_web_view_open (WEBKIT_WEB_VIEW (music_store->priv->web_viewer), signed_url);
1383
1384 g_free (signed_url);
1385 } else
1386 webkit_web_view_open (WEBKIT_WEB_VIEW (music_store->priv->web_viewer), real_url);
1387
1388 g_free (real_url);
1389}1362}

Subscribers

People subscribed via source and target branches