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

Unified Diff: components/user_manager/user_manager_base.h

Issue 594163002: Restore last used user session after crash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: special case in ChromeUserManagerImpl Created 6 years, 3 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 | « components/user_manager/user_manager.h ('k') | components/user_manager/user_manager_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/user_manager/user_manager_base.h
diff --git a/components/user_manager/user_manager_base.h b/components/user_manager/user_manager_base.h
index b1176870a00957a02b36d49782b66cb93926d9bb..9da1cee8fc6739f2ac80895b008418fd93d24f36 100644
--- a/components/user_manager/user_manager_base.h
+++ b/components/user_manager/user_manager_base.h
@@ -52,6 +52,7 @@ class USER_MANAGER_EXPORT UserManagerBase : public UserManager {
const std::string& user_id_hash,
bool browser_restart) OVERRIDE;
virtual void SwitchActiveUser(const std::string& user_id) OVERRIDE;
+ virtual void SwitchToLastActiveUser() OVERRIDE;
virtual void SessionStarted() OVERRIDE;
virtual void RemoveUser(const std::string& user_id,
RemoveUserDelegate* delegate) OVERRIDE;
@@ -369,6 +370,12 @@ class USER_MANAGER_EXPORT UserManagerBase : public UserManager {
// as soon as user's profile is loaded.
std::string pending_user_switch_;
+ // ID of the user that was active in the previous session.
+ // Preference value is stored here before first user signs in
+ // because pref will be overidden once session restore starts.
+ std::string last_session_active_user_;
+ bool last_session_active_user_initialized_;
+
// TaskRunner for UI thread.
scoped_refptr<base::TaskRunner> task_runner_;
« no previous file with comments | « components/user_manager/user_manager.h ('k') | components/user_manager/user_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698