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

Side by Side Diff: chrome/browser/sync/signin_manager.cc

Issue 7740083: Put pre- and auto-login behind flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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/about_flags.cc ('k') | chrome/browser/ui/autologin_infobar_delegate.cc » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/sync/signin_manager.h" 5 #include "chrome/browser/sync/signin_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "chrome/browser/net/gaia/token_service.h" 9 #include "chrome/browser/net/gaia/token_service.h"
10 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 password, 129 password,
130 "", 130 "",
131 login_token, 131 login_token,
132 login_captcha, 132 login_captcha,
133 GaiaAuthFetcher::HostedAccountsNotAllowed); 133 GaiaAuthFetcher::HostedAccountsNotAllowed);
134 134
135 // Register for token availability. The signin manager will pre-login the 135 // Register for token availability. The signin manager will pre-login the
136 // user when the GAIA service token is ready for use. Only do this if we 136 // user when the GAIA service token is ready for use. Only do this if we
137 // are not running in ChomiumOS, since it handles pre-login itself. 137 // are not running in ChomiumOS, since it handles pre-login itself.
138 #if !defined(OS_CHROMEOS) 138 #if !defined(OS_CHROMEOS)
139 if (profile_->GetPrefs()->GetBoolean(prefs::kAutologinEnabled)) { 139 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin) &&
140 profile_->GetPrefs()->GetBoolean(prefs::kAutologinEnabled)) {
140 registrar_.Add(this, 141 registrar_.Add(this,
141 chrome::NOTIFICATION_TOKEN_AVAILABLE, 142 chrome::NOTIFICATION_TOKEN_AVAILABLE,
142 Source<TokenService>(profile_->GetTokenService())); 143 Source<TokenService>(profile_->GetTokenService()));
143 } 144 }
144 #endif 145 #endif
145 } 146 }
146 147
147 void SigninManager::ProvideSecondFactorAccessCode( 148 void SigninManager::ProvideSecondFactorAccessCode(
148 const std::string& access_code) { 149 const std::string& access_code) {
149 DCHECK(!browser_sync::IsUsingOAuth()); 150 DCHECK(!browser_sync::IsUsingOAuth());
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 profile_->GetRequestContext())); 343 profile_->GetRequestContext()));
343 } 344 }
344 345
345 client_login_->StartMergeSession(tok_details->token()); 346 client_login_->StartMergeSession(tok_details->token());
346 347
347 // We only want to do this once per sign-in. 348 // We only want to do this once per sign-in.
348 CleanupNotificationRegistration(); 349 CleanupNotificationRegistration();
349 } 350 }
350 #endif 351 #endif
351 } 352 }
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/ui/autologin_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698