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

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

Issue 11494003: Enable "Let me choose what to sync" checkbox in gaia sign in page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased, and adjusted gaia URL Created 7 years, 12 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/ui/webui/sync_promo/sync_promo_ui.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 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 } else if (configuring_sync_) { 1044 } else if (configuring_sync_) {
1045 ProfileSyncService::SyncEvent( 1045 ProfileSyncService::SyncEvent(
1046 ProfileSyncService::CANCEL_DURING_CONFIGURE); 1046 ProfileSyncService::CANCEL_DURING_CONFIGURE);
1047 } else { 1047 } else {
1048 ProfileSyncService::SyncEvent( 1048 ProfileSyncService::SyncEvent(
1049 ProfileSyncService::CANCEL_FROM_SIGNON_WITHOUT_AUTH); 1049 ProfileSyncService::CANCEL_FROM_SIGNON_WITHOUT_AUTH);
1050 } 1050 }
1051 } 1051 }
1052 1052
1053 // Let the various services know that we're no longer active. 1053 // Let the various services know that we're no longer active.
1054 if (SyncPromoUI::UseWebBasedSigninFlow())
1055 CloseGaiaSigninPage();
1056
1054 GetLoginUIService()->LoginUIClosed(this); 1057 GetLoginUIService()->LoginUIClosed(this);
1055 } 1058 }
1056 1059
1057 if (sync_service) { 1060 if (sync_service) {
1058 // Make sure user isn't left half-logged-in (signed in, but without sync 1061 // Make sure user isn't left half-logged-in (signed in, but without sync
1059 // started up). If the user hasn't finished setting up sync, then sign out 1062 // started up). If the user hasn't finished setting up sync, then sign out
1060 // and shut down sync. 1063 // and shut down sync.
1061 if (!sync_service->HasSyncSetupCompleted()) { 1064 if (!sync_service->HasSyncSetupCompleted()) {
1062 DVLOG(1) << "Signin aborted by user action"; 1065 DVLOG(1) << "Signin aborted by user action";
1063 sync_service->DisableForUser(); 1066 sync_service->DisableForUser();
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1218 if (i != current_profile_index && AreUserNamesEqual( 1221 if (i != current_profile_index && AreUserNamesEqual(
1219 cache.GetUserNameOfProfileAtIndex(i), username_utf16)) { 1222 cache.GetUserNameOfProfileAtIndex(i), username_utf16)) {
1220 *error_message = l10n_util::GetStringUTF16( 1223 *error_message = l10n_util::GetStringUTF16(
1221 IDS_SYNC_USER_NAME_IN_USE_ERROR); 1224 IDS_SYNC_USER_NAME_IN_USE_ERROR);
1222 return false; 1225 return false;
1223 } 1226 }
1224 } 1227 }
1225 1228
1226 return true; 1229 return true;
1227 } 1230 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698