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

Side by Side Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 12929026: Load sync token upon login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with ToT Created 7 years, 9 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
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/chromeos/login/login_utils.h" 5 #include "chrome/browser/chromeos/login/login_utils.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/chromeos/chromeos_version.h" 10 #include "base/chromeos/chromeos_version.h"
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 272
273 DISALLOW_COPY_AND_ASSIGN(LoginUtilsWrapper); 273 DISALLOW_COPY_AND_ASSIGN(LoginUtilsWrapper);
274 }; 274 };
275 275
276 void LoginUtilsImpl::DoBrowserLaunch(Profile* profile, 276 void LoginUtilsImpl::DoBrowserLaunch(Profile* profile,
277 LoginDisplayHost* login_host) { 277 LoginDisplayHost* login_host) {
278 if (browser_shutdown::IsTryingToQuit()) 278 if (browser_shutdown::IsTryingToQuit())
279 return; 279 return;
280 280
281 if (!UserManager::Get()->GetCurrentUserFlow()->ShouldLaunchBrowser()) { 281 if (!UserManager::Get()->GetCurrentUserFlow()->ShouldLaunchBrowser()) {
282 UserManager::Get()->GetCurrentUserFlow()->LaunchExtraSteps(login_host); 282 UserManager::Get()->GetCurrentUserFlow()->LaunchExtraSteps(profile,
283 login_host);
283 return; 284 return;
284 } 285 }
285 286
286 if (login_host) { 287 if (login_host) {
287 login_host->SetStatusAreaVisible(true); 288 login_host->SetStatusAreaVisible(true);
288 login_host->BeforeSessionStart(); 289 login_host->BeforeSessionStart();
289 } 290 }
290 291
291 BootTimesLoader::Get()->AddLoginTimeMarker("BrowserLaunched", false); 292 BootTimesLoader::Get()->AddLoginTimeMarker("BrowserLaunched", false);
292 293
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 bool LoginUtils::IsWhitelisted(const std::string& username) { 944 bool LoginUtils::IsWhitelisted(const std::string& username) {
944 CrosSettings* cros_settings = CrosSettings::Get(); 945 CrosSettings* cros_settings = CrosSettings::Get();
945 bool allow_new_user = false; 946 bool allow_new_user = false;
946 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); 947 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user);
947 if (allow_new_user) 948 if (allow_new_user)
948 return true; 949 return true;
949 return cros_settings->FindEmailInList(kAccountsPrefUsers, username); 950 return cros_settings->FindEmailInList(kAccountsPrefUsers, username);
950 } 951 }
951 952
952 } // namespace chromeos 953 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698