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

Unified Diff: chrome/browser/chromeos/login/user_manager_impl.cc

Issue 9811031: Log in stub user only if not showing login screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/user_manager_impl.cc
diff --git a/chrome/browser/chromeos/login/user_manager_impl.cc b/chrome/browser/chromeos/login/user_manager_impl.cc
index a8ed2c8a7b67807b9755d5c571ccfc5299064802..b281e81ea9338cfecca0f9bc785c7ec8a7a22745 100644
--- a/chrome/browser/chromeos/login/user_manager_impl.cc
+++ b/chrome/browser/chromeos/login/user_manager_impl.cc
@@ -292,9 +292,15 @@ UserManagerImpl::UserManagerImpl()
observed_sync_service_(NULL),
last_image_set_async_(false),
downloaded_profile_image_data_url_(chrome::kAboutBlankURL) {
- // Use stub as the logged-in user for test paths without login.
- if (!base::chromeos::IsRunningOnChromeOS())
+ // If we're not running on ChromeOS, and are not showing the login manager
+ // or attempting a command line login? Then login the stub user.
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
+ if (!base::chromeos::IsRunningOnChromeOS() &&
+ !command_line->HasSwitch(switches::kLoginManager) &&
+ !command_line->HasSwitch(switches::kLoginPassword)) {
StubUserLoggedIn();
+ }
+
registrar_.Add(this, chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED,
content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_ADDED,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698