| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1310 | 1310 |
| 1311 void LoginUtils::Set(LoginUtils* mock) { | 1311 void LoginUtils::Set(LoginUtils* mock) { |
| 1312 LoginUtilsWrapper::GetInstance()->reset(mock); | 1312 LoginUtilsWrapper::GetInstance()->reset(mock); |
| 1313 } | 1313 } |
| 1314 | 1314 |
| 1315 void LoginUtils::DoBrowserLaunch(Profile* profile, | 1315 void LoginUtils::DoBrowserLaunch(Profile* profile, |
| 1316 LoginDisplayHost* login_host) { | 1316 LoginDisplayHost* login_host) { |
| 1317 if (browser_shutdown::IsTryingToQuit()) | 1317 if (browser_shutdown::IsTryingToQuit()) |
| 1318 return; | 1318 return; |
| 1319 | 1319 |
| 1320 chromeos::StatusAreaViewChromeos:: | 1320 StatusAreaViewChromeos::SetScreenMode(StatusAreaViewChromeos::BROWSER_MODE); |
| 1321 SetScreenMode(StatusAreaViewChromeos::BROWSER_MODE); | |
| 1322 BootTimesLoader::Get()->AddLoginTimeMarker("BrowserLaunched", false); | 1321 BootTimesLoader::Get()->AddLoginTimeMarker("BrowserLaunched", false); |
| 1323 | 1322 |
| 1324 VLOG(1) << "Launching browser..."; | 1323 VLOG(1) << "Launching browser..."; |
| 1325 BrowserInit browser_init; | 1324 BrowserInit browser_init; |
| 1326 int return_code; | 1325 int return_code; |
| 1327 BrowserInit::IsFirstRun first_run = FirstRun::IsChromeFirstRun() ? | 1326 BrowserInit::IsFirstRun first_run = FirstRun::IsChromeFirstRun() ? |
| 1328 BrowserInit::IS_FIRST_RUN: BrowserInit::IS_NOT_FIRST_RUN; | 1327 BrowserInit::IS_FIRST_RUN: BrowserInit::IS_NOT_FIRST_RUN; |
| 1329 browser_init.LaunchBrowser(*CommandLine::ForCurrentProcess(), | 1328 browser_init.LaunchBrowser(*CommandLine::ForCurrentProcess(), |
| 1330 profile, | 1329 profile, |
| 1331 FilePath(), | 1330 FilePath(), |
| 1332 BrowserInit::IS_PROCESS_STARTUP, | 1331 BrowserInit::IS_PROCESS_STARTUP, |
| 1333 first_run, | 1332 first_run, |
| 1334 &return_code); | 1333 &return_code); |
| 1335 | 1334 |
| 1336 // Mark login host for deletion after browser starts. This | 1335 // Mark login host for deletion after browser starts. This |
| 1337 // guarantees that the message loop will be referenced by the | 1336 // guarantees that the message loop will be referenced by the |
| 1338 // browser before it is dereferenced by the login host. | 1337 // browser before it is dereferenced by the login host. |
| 1339 if (login_host) { | 1338 if (login_host) { |
| 1340 login_host->OnSessionStart(); | 1339 login_host->OnSessionStart(); |
| 1340 login_host->SetStatusAreaVisible(true); |
| 1341 login_host->SetStatusAreaEnabled(true); |
| 1341 login_host = NULL; | 1342 login_host = NULL; |
| 1342 } | 1343 } |
| 1343 } | 1344 } |
| 1344 | 1345 |
| 1345 } // namespace chromeos | 1346 } // namespace chromeos |
| OLD | NEW |