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 { |