Chromium Code Reviews| Index: chrome/browser/chromeos/login/user_manager_impl.h |
| diff --git a/chrome/browser/chromeos/login/user_manager_impl.h b/chrome/browser/chromeos/login/user_manager_impl.h |
| index cb9c5c8503f8ed26df2e39adf92365eb3956b4fb..d177799abb445535235cba9f7b29966059f347ae 100644 |
| --- a/chrome/browser/chromeos/login/user_manager_impl.h |
| +++ b/chrome/browser/chromeos/login/user_manager_impl.h |
| @@ -46,9 +46,11 @@ class UserManagerImpl |
| virtual void Shutdown() OVERRIDE; |
| virtual UserImageManager* GetUserImageManager() OVERRIDE; |
| virtual const UserList& GetUsers() const OVERRIDE; |
| + virtual const UserList& GetLoggedInUsers() const OVERRIDE; |
| virtual void UserLoggedIn(const std::string& email, |
| const std::string& username_hash, |
| bool browser_restart) OVERRIDE; |
| + virtual void SwitchActiveUser(const std::string& email) OVERRIDE; |
| virtual void RetailModeUserLoggedIn() OVERRIDE; |
| virtual void GuestUserLoggedIn() OVERRIDE; |
| virtual void KioskAppLoggedIn(const std::string& username) OVERRIDE; |
| @@ -68,6 +70,8 @@ class UserManagerImpl |
| const string16& display_name) const OVERRIDE; |
| virtual const User* GetLoggedInUser() const OVERRIDE; |
| virtual User* GetLoggedInUser() OVERRIDE; |
| + virtual const User* GetActiveUser() const OVERRIDE; |
| + virtual User* GetActiveUser() OVERRIDE; |
| virtual void SaveUserOAuthStatus( |
| const std::string& username, |
| User::OAuthTokenStatus oauth_token_status) OVERRIDE; |
| @@ -157,7 +161,8 @@ class UserManagerImpl |
| // list. Returns |NULL| otherwise. |
| const User* FindUserInList(const std::string& email) const; |
| - // Notifies that new user session has started. |
| + // Notifies that user has logged in. |
| + // Sends NOTIFICATION_LOGIN_USER_CHANGED notification. |
| void NotifyOnLogin(); |
| // Reads user's oauth token status from local state preferences. |
| @@ -221,10 +226,15 @@ class UserManagerImpl |
| // |UpdateAndCleanUpPublicAccounts|. |
| UserList users_; |
| - // The logged-in user. NULL until a user has logged in, then points to one |
| + // List of all users that are logged in current session. These point to User |
| + // instances in |users_|. Only one of them could be marked as active. |
| + UserList logged_in_users_; |
| + |
| + // The logged-in user that is currently active in current session. |
| + // NULL until a user has logged in, then points to one |
| // of the User instances in |users_|, the |guest_user_| instance or an |
| // ephemeral user instance. |
| - User* logged_in_user_; |
| + User* active_user_; |
|
Dmitry Polukhin
2013/04/11 13:34:15
FYI, perhaps we will need to switch to linked_ptr
Nikita (slow)
2013/04/12 15:41:25
I'll do that in a separate CL as I've looked over
|
| // True if SessionStarted() has been called. |
| bool session_started_; |