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

Unified Diff: chrome/browser/chromeos/login/session/user_session_manager.cc

Issue 2872133009: ChromeOS: Fix DCHECK hit when logging under Guest (Closed)
Patch Set: Created 3 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/session/user_session_manager.cc
diff --git a/chrome/browser/chromeos/login/session/user_session_manager.cc b/chrome/browser/chromeos/login/session/user_session_manager.cc
index 007699c5b583ea30ed10328b7881e959d00e005d..41f9f107f03cf0334aee279aae119309ff19b18e 100644
--- a/chrome/browser/chromeos/login/session/user_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/user_session_manager.cc
@@ -1516,7 +1516,12 @@ void UserSessionManager::OnRestoreActiveSessions(
void UserSessionManager::RestorePendingUserSessions() {
if (pending_user_sessions_.empty()) {
- user_manager::UserManager::Get()->SwitchToLastActiveUser();
+ // '>1' ignores "restart on signin" because of browser flags difference.
+ // In this case, last_session_active_account_id_ can carry account_id
+ // from the previous browser session.
+ if (user_manager::UserManager::Get()->GetLoggedInUsers().size() > 1)
+ user_manager::UserManager::Get()->SwitchToLastActiveUser();
+
NotifyPendingUserSessionsRestoreFinished();
return;
}
« 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