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

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

Issue 11348220: sync: centralize sync startup decisions in TryStart. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: take 2 Created 8 years, 1 month 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
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 d77644a31a4a75661e01d26669071026d837d826..91ffae8c3269031d49926e64893334ff56674da3 100644
--- a/chrome/browser/ui/webui/sync_setup_handler.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler.cc
@@ -1014,8 +1014,6 @@ void SyncSetupHandler::CloseSyncSetup() {
}
if (sync_service) {
- sync_service->SetSetupInProgress(false);
-
// Make sure user isn't left half-logged-in (signed in, but without sync
// started up). If the user hasn't finished setting up sync, then sign out
// and shut down sync.
@@ -1026,6 +1024,7 @@ void SyncSetupHandler::CloseSyncSetup() {
browser_sync::SyncPrefs sync_prefs(GetProfile()->GetPrefs());
sync_prefs.SetStartSuppressed(true);
}
+ sync_service->SetSetupInProgress(false);
}
// Reset the attempted email address and error, otherwise the sync setup
@@ -1059,6 +1058,7 @@ void SyncSetupHandler::OpenSyncSetup(bool force_login) {
// logged in.
// 6) One-click signin (credentials are already available, so should display
// sync configure UI, not login UI).
+ // 7) ChromeOS re-enable after disabling sync.
if (force_login ||
!service->IsSyncEnabledAndLoggedIn() ||
service->GetAuthError().state() != GoogleServiceAuthError::NONE) {
@@ -1067,7 +1067,8 @@ void SyncSetupHandler::OpenSyncSetup(bool force_login) {
DisplayGaiaLogin(false);
} else {
// User is already logged in. They must have brought up the config wizard
- // via the "Advanced..." button or through One-Click signin (cases 5/6).
+ // via the "Advanced..." button or through One-Click signin (cases 5/6), or
+ // they are re-enabling sync on Chrome OS.
DisplayConfigureSync(true, false);
}

Powered by Google App Engine
This is Rietveld 408576698