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

Unified Diff: chrome/browser/ui/sync/one_click_signin_sync_starter.cc

Issue 1862963003: Only handle the first AccountAddedToCookie event in OneClickSigninSyncStarter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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_sync_starter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/sync/one_click_signin_sync_starter.cc
diff --git a/chrome/browser/ui/sync/one_click_signin_sync_starter.cc b/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
index c9020a2e8a3fbccbc47f689d2d7b6ed627ae588b..6195bbdc8b425bf690731b89ff1374474ce9a3ba 100644
--- a/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
+++ b/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
@@ -90,6 +90,7 @@ OneClickSigninSyncStarter::OneClickSigninSyncStarter(
current_url_(current_url),
continue_url_(continue_url),
sync_setup_completed_callback_(sync_setup_completed_callback),
+ first_account_added_to_cookie_(false),
weak_pointer_factory_(this) {
DCHECK(profile);
DCHECK(web_contents || continue_url.is_empty());
@@ -458,6 +459,11 @@ void OneClickSigninSyncStarter::SigninSuccess() {
void OneClickSigninSyncStarter::AccountAddedToCookie(
const GoogleServiceAuthError& error) {
+ if (first_account_added_to_cookie_)
+ return;
+
+ first_account_added_to_cookie_ = true;
+
// Regardless of whether the account was successfully added or not,
// continue with sync starting.
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_sync_starter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698