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

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

Issue 15742014: [sync] Fix incorrectly grayed out "Disconnect your Google Account..." button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | « no previous file | 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 219a5e9d649e6280a084c84f59bfe0144eaa5b4b..1381109a03c5c4aff51bd98ac3132bd984c519cd 100644
--- a/chrome/browser/ui/webui/sync_setup_handler.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler.cc
@@ -1168,7 +1168,6 @@ void SyncSetupHandler::CloseSyncSetup() {
if (sync_service) {
DVLOG(1) << "Sync setup aborted by user action";
sync_service->OnStopSyncingPermanently();
- sync_service->SetSetupInProgress(false);
}
}
@@ -1181,6 +1180,12 @@ void SyncSetupHandler::CloseSyncSetup() {
GetLoginUIService()->LoginUIClosed(this);
}
+ // Alert the sync service anytime the sync setup dialog is closed. This can
+ // happen due to the user clicking the OK or Cancel button, or due to the
+ // dialog being closed by virtue of sync being disabled in the background.
+ if (sync_service)
+ sync_service->SetSetupInProgress(false);
+
#if !defined(OS_CHROMEOS)
// Reset the attempted email address and error, otherwise the sync setup
// overlay in the settings page will stay in whatever error state it was last
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698