Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(799)

Unified Diff: chrome/browser/ui/webui/sync_setup_handler.cc

Issue 12256015: Signing in to sync as a different user is redirecting to sync settings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typos Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_helper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/sync_setup_handler.cc
diff --git a/chrome/browser/ui/webui/sync_setup_handler.cc b/chrome/browser/ui/webui/sync_setup_handler.cc
index f4b7849bee1080a769c7d3f330bf76ba9f7cdc19..0845aa7146172af1fb2036dbf380ae1c9c8873cc 100644
--- a/chrome/browser/ui/webui/sync_setup_handler.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler.cc
@@ -1207,15 +1207,21 @@ void SyncSetupHandler::DidStopLoading(
// since the user is doing something with it. Disconnect and forget about it
// before closing down the sync setup.
// The one exception is the expected continue URL. If the user lands there,
- // this means sign in was successful.
+ // this means sign in was successful. Ignore the source parameter in the
+ // continue URL since this user may have changed the state of the
+ // "Let me choose what to sync" checkbox.
const GURL& url = active_gaia_signin_tab_->GetURL();
const GURL continue_url =
SyncPromoUI::GetNextPageURLForSyncPromoURL(
SyncPromoUI::GetSyncPromoURL(GURL(),
SyncPromoUI::SOURCE_SETTINGS,
false));
+ GURL::Replacements replacements;
+ replacements.ClearQuery();
- if (url != continue_url && !gaia::IsGaiaSignonRealm(url.GetOrigin())) {
+ if (!gaia::IsGaiaSignonRealm(url.GetOrigin()) &&
+ url.ReplaceComponents(replacements) !=
+ continue_url.ReplaceComponents(replacements)) {
content::WebContentsObserver::Observe(NULL);
active_gaia_signin_tab_ = NULL;
CloseSyncSetup();
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698