| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1316 // static | 1316 // static |
| 1317 void LoginUtils::DoBrowserLaunch(Profile* profile, | 1317 void LoginUtils::DoBrowserLaunch(Profile* profile, |
| 1318 LoginDisplayHost* login_host) { | 1318 LoginDisplayHost* login_host) { |
| 1319 if (browser_shutdown::IsTryingToQuit()) | 1319 if (browser_shutdown::IsTryingToQuit()) |
| 1320 return; | 1320 return; |
| 1321 | 1321 |
| 1322 StatusAreaViewChromeos::SetScreenMode(StatusAreaViewChromeos::BROWSER_MODE); | 1322 StatusAreaViewChromeos::SetScreenMode(StatusAreaViewChromeos::BROWSER_MODE); |
| 1323 BootTimesLoader::Get()->AddLoginTimeMarker("BrowserLaunched", false); | 1323 BootTimesLoader::Get()->AddLoginTimeMarker("BrowserLaunched", false); |
| 1324 | 1324 |
| 1325 VLOG(1) << "Launching browser..."; | 1325 VLOG(1) << "Launching browser..."; |
| 1326 if (login_host) |
| 1327 login_host->PreSessionStart(); |
| 1328 |
| 1326 BrowserInit browser_init; | 1329 BrowserInit browser_init; |
| 1327 int return_code; | 1330 int return_code; |
| 1328 BrowserInit::IsFirstRun first_run = first_run::IsChromeFirstRun() ? | 1331 BrowserInit::IsFirstRun first_run = first_run::IsChromeFirstRun() ? |
| 1329 BrowserInit::IS_FIRST_RUN: BrowserInit::IS_NOT_FIRST_RUN; | 1332 BrowserInit::IS_FIRST_RUN: BrowserInit::IS_NOT_FIRST_RUN; |
| 1330 browser_init.LaunchBrowser(*CommandLine::ForCurrentProcess(), | 1333 browser_init.LaunchBrowser(*CommandLine::ForCurrentProcess(), |
| 1331 profile, | 1334 profile, |
| 1332 FilePath(), | 1335 FilePath(), |
| 1333 BrowserInit::IS_PROCESS_STARTUP, | 1336 BrowserInit::IS_PROCESS_STARTUP, |
| 1334 first_run, | 1337 first_run, |
| 1335 &return_code); | 1338 &return_code); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1349 bool LoginUtils::IsWhitelisted(const std::string& username) { | 1352 bool LoginUtils::IsWhitelisted(const std::string& username) { |
| 1350 CrosSettings* cros_settings = CrosSettings::Get(); | 1353 CrosSettings* cros_settings = CrosSettings::Get(); |
| 1351 bool allow_new_user = false; | 1354 bool allow_new_user = false; |
| 1352 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); | 1355 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); |
| 1353 if (allow_new_user) | 1356 if (allow_new_user) |
| 1354 return true; | 1357 return true; |
| 1355 return cros_settings->FindEmailInList(kAccountsPrefUsers, username); | 1358 return cros_settings->FindEmailInList(kAccountsPrefUsers, username); |
| 1356 } | 1359 } |
| 1357 | 1360 |
| 1358 } // namespace chromeos | 1361 } // namespace chromeos |
| OLD | NEW |