OLD | NEW |
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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 profile, | 304 profile, |
305 base::FilePath(), | 305 base::FilePath(), |
306 chrome::startup::IS_PROCESS_STARTUP, | 306 chrome::startup::IS_PROCESS_STARTUP, |
307 first_run, | 307 first_run, |
308 &return_code); | 308 &return_code); |
309 | 309 |
310 // Mark login host for deletion after browser starts. This | 310 // Mark login host for deletion after browser starts. This |
311 // guarantees that the message loop will be referenced by the | 311 // guarantees that the message loop will be referenced by the |
312 // browser before it is dereferenced by the login host. | 312 // browser before it is dereferenced by the login host. |
313 if (login_host) | 313 if (login_host) |
314 login_host->OnSessionStart(); | 314 login_host->Finalize(); |
315 UserManager::Get()->SessionStarted(); | 315 UserManager::Get()->SessionStarted(); |
316 } | 316 } |
317 | 317 |
318 void LoginUtilsImpl::PrepareProfile( | 318 void LoginUtilsImpl::PrepareProfile( |
319 const UserContext& user_context, | 319 const UserContext& user_context, |
320 const std::string& display_email, | 320 const std::string& display_email, |
321 bool using_oauth, | 321 bool using_oauth, |
322 bool has_cookies, | 322 bool has_cookies, |
323 LoginUtils::Delegate* delegate) { | 323 LoginUtils::Delegate* delegate) { |
324 BootTimesLoader* btl = BootTimesLoader::Get(); | 324 BootTimesLoader* btl = BootTimesLoader::Get(); |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
912 bool LoginUtils::IsWhitelisted(const std::string& username) { | 912 bool LoginUtils::IsWhitelisted(const std::string& username) { |
913 CrosSettings* cros_settings = CrosSettings::Get(); | 913 CrosSettings* cros_settings = CrosSettings::Get(); |
914 bool allow_new_user = false; | 914 bool allow_new_user = false; |
915 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); | 915 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); |
916 if (allow_new_user) | 916 if (allow_new_user) |
917 return true; | 917 return true; |
918 return cros_settings->FindEmailInList(kAccountsPrefUsers, username); | 918 return cros_settings->FindEmailInList(kAccountsPrefUsers, username); |
919 } | 919 } |
920 | 920 |
921 } // namespace chromeos | 921 } // namespace chromeos |
OLD | NEW |