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

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

Issue 10377147: Revert r137111 - "When Chrome is restarted after a crash..." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 26b8a134f76682a3c5d6fc273e737ec3f67692c4..9375ca12b5dbb46f6fc839f0fc2653f86d7e1028 100644
--- a/chrome/browser/chromeos/login/user_manager_impl.cc
+++ b/chrome/browser/chromeos/login/user_manager_impl.cc
@@ -797,16 +797,11 @@ bool UserManagerImpl::IsEphemeralUser(const std::string& email) const {
if (logged_in_user_ && (email == logged_in_user_->email()))
return is_current_user_ephemeral_;
- // The owner and any users found in the persistent list are never ephemeral.
- if (email == owner_email_ || FindUserInList(email))
- return false;
-
- // Any other user is ephemeral when:
- // a) Going through the regular login flow and ephemeral users are enabled.
- // - or -
- // b) The browser is restarting after a crash.
- return AreEphemeralUsersEnabled() ||
- !CommandLine::ForCurrentProcess()->HasSwitch(switches::kLoginManager);
+ // Any other user is ephemeral iff ephemeral users are enabled, the user is
+ // not the owner and is not in the persistent list.
+ return AreEphemeralUsersEnabled() &&
+ (email != owner_email_) &&
+ !FindUserInList(email);
}
const User* UserManagerImpl::FindUserInList(const std::string& email) const {
« 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