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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |