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

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: 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
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 a322afdb85cd11c59811d17e152d716c20cdccf3..4821169c000c9ba21ab42417f63ce0531ea45f8e 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;
@@ -368,6 +369,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_;

Powered by Google App Engine
This is Rietveld 408576698