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

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

Issue 11418200: Setup from settings should allow configuration first (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 8 years 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/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 9b45f62c6057f381543cda488f285e6628b712e2..33841c61dd623a2fc85f0d84411c8b3840da1a79 100644
--- a/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
+++ b/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
@@ -59,18 +59,23 @@ void OneClickSigninSyncStarter::SigninSuccess() {
ProfileSyncService* profile_sync_service =
ProfileSyncServiceFactory::GetForProfile(browser_->profile());
- if (start_mode_ == SYNC_WITH_DEFAULT_SETTINGS) {
- // Just kick off the sync machine, no need to configure it first.
- profile_sync_service->OnUserChoseDatatypes(true, syncer::ModelTypeSet());
- profile_sync_service->SetSyncSetupCompleted();
- profile_sync_service->SetSetupInProgress(false);
- } else {
- // Give the user a chance to configure things. We don't clear the
- // ProfileSyncService::setup_in_progress flag because we don't want sync
- // to start up until after the configure UI is displayed (the configure UI
- // will clear the flag when the user is done setting up sync).
- LoginUIServiceFactory::GetForProfile(browser_->profile())->ShowLoginUI(
- browser_);
+ switch (start_mode_) {
+ case SYNC_WITH_DEFAULT_SETTINGS:
+ // Just kick off the sync machine, no need to configure it first.
+ profile_sync_service->OnUserChoseDatatypes(true, syncer::ModelTypeSet());
+ profile_sync_service->SetSyncSetupCompleted();
+ profile_sync_service->SetSetupInProgress(false);
+ break;
+ case CONFIGURE_SYNC_FIRST:
+ // Give the user a chance to configure things. We don't clear the
+ // ProfileSyncService::setup_in_progress flag because we don't want sync
+ // to start up until after the configure UI is displayed (the configure UI
+ // will clear the flag when the user is done setting up sync).
+ LoginUIServiceFactory::GetForProfile(browser_->profile())->ShowLoginUI(
+ browser_);
+ break;
+ default:
+ NOTREACHED() << "Invalid start_mode=" << start_mode_;
}
delete this;
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_sync_starter.h ('k') | chrome/browser/ui/webui/sync_setup_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698