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

Side by Side Diff: chrome/browser/ui/webui/sync_setup_handler.cc

Issue 17392009: [sync] Hide "Sync nothing" UI; Go back to signing out on dashboard clears and abandoned initial set… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/sync/sync_ui_util.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/sync_setup_handler.h" 5 #include "chrome/browser/ui/webui/sync_setup_handler.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 } 925 }
926 926
927 // If the user clicked "Cancel" while setting up sync, disable sync 927 // If the user clicked "Cancel" while setting up sync, disable sync
928 // because we don't want the sync backend to remain in the initialized 928 // because we don't want the sync backend to remain in the initialized
929 // state. Note: In order to disable sync across restarts on Chrome OS, we 929 // state. Note: In order to disable sync across restarts on Chrome OS, we
930 // must call OnStopSyncingPermanently(), which suppresses sync startup in 930 // must call OnStopSyncingPermanently(), which suppresses sync startup in
931 // addition to disabling it. 931 // addition to disabling it.
932 if (sync_service) { 932 if (sync_service) {
933 DVLOG(1) << "Sync setup aborted by user action"; 933 DVLOG(1) << "Sync setup aborted by user action";
934 sync_service->OnStopSyncingPermanently(); 934 sync_service->OnStopSyncingPermanently();
935 #if !defined(OS_CHROMEOS)
936 // Sign out the user on desktop Chrome if they click cancel during
937 // initial setup.
938 // TODO(rsimha): Revisit this for M30. See http://crbug.com/252049.
939 if (sync_service->FirstSetupInProgress())
940 SigninManagerFactory::GetForProfile(GetProfile())->SignOut();
941 #endif
935 } 942 }
936 } 943 }
937 944
938 #if !defined(OS_CHROMEOS) 945 #if !defined(OS_CHROMEOS)
939 // Let the various services know that we're no longer active. 946 // Let the various services know that we're no longer active.
940 CloseGaiaSigninPage(); 947 CloseGaiaSigninPage();
941 #endif 948 #endif
942 949
943 GetLoginUIService()->LoginUIClosed(this); 950 GetLoginUIService()->LoginUIClosed(this);
944 } 951 }
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 } 1097 }
1091 1098
1092 LoginUIService* SyncSetupHandler::GetLoginUIService() const { 1099 LoginUIService* SyncSetupHandler::GetLoginUIService() const {
1093 return LoginUIServiceFactory::GetForProfile(GetProfile()); 1100 return LoginUIServiceFactory::GetForProfile(GetProfile());
1094 } 1101 }
1095 1102
1096 void SyncSetupHandler::CloseOverlay() { 1103 void SyncSetupHandler::CloseOverlay() {
1097 CloseSyncSetup(); 1104 CloseSyncSetup();
1098 web_ui()->CallJavascriptFunction("OptionsPage.closeOverlay"); 1105 web_ui()->CallJavascriptFunction("OptionsPage.closeOverlay");
1099 } 1106 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_ui_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698