Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 9181012: Don't activate a window if screen is locked. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698