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