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

Unified Diff: chrome/browser/chromeos/login/user_manager_impl.h

Issue 14139003: Chrome OS multi-profiles backend and UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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: 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_;

Powered by Google App Engine
This is Rietveld 408576698