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

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

Issue 14139003: Chrome OS multi-profiles backend and UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move IsMultiProfilesEnabled() out of cros 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
« no previous file with comments | « chrome/browser/chromeos/login/user.cc ('k') | chrome/browser/chromeos/login/user_manager_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/user_manager.h
diff --git a/chrome/browser/chromeos/login/user_manager.h b/chrome/browser/chromeos/login/user_manager.h
index 1d3d32de7dbc31617b79de5d943c6b4bb6fe9b6f..fb9b3453b1f522b7ba2d9a70cc8bcc1d3a4bb77f 100644
--- a/chrome/browser/chromeos/login/user_manager.h
+++ b/chrome/browser/chromeos/login/user_manager.h
@@ -95,6 +95,9 @@ class UserManager {
// is sorted by last login date with the most recent user at the beginning.
virtual const UserList& GetUsers() const = 0;
+ // Returns a list of users who are currently logged in.
+ virtual const UserList& GetLoggedInUsers() const = 0;
+
// Indicates that a user with the given |email| has just logged in. The
// persistent list is updated accordingly if the user is not ephemeral.
// |browser_restart| is true when reloading Chrome after crash to distinguish
@@ -104,6 +107,9 @@ class UserManager {
const std::string& username_hash,
bool browser_restart) = 0;
+ // Switches to active user identified by |email|. User has to be logged in.
+ virtual void SwitchActiveUser(const std::string& email) = 0;
+
// Indicates that user just logged on as the retail mode user.
virtual void RetailModeUserLoggedIn() = 0;
@@ -168,9 +174,17 @@ class UserManager {
const string16& display_name) const = 0;
// Returns the logged-in user.
+ // TODO(nkostylev): Deprecate this call, move clients to GetActiveUser().
+ // http://crbug.com/230852
virtual const User* GetLoggedInUser() const = 0;
virtual User* GetLoggedInUser() = 0;
+ // Returns the logged-in user that is currently active within this session.
+ // There could be multiple users logged in at the the same but for now
+ // we support only one of them being active.
+ virtual const User* GetActiveUser() const = 0;
+ virtual User* GetActiveUser() = 0;
+
// Saves user's oauth token status in local state preferences.
virtual void SaveUserOAuthStatus(
const std::string& username,
@@ -213,7 +227,7 @@ class UserManager {
// a password with which to unlock the session).
virtual bool CanCurrentUserLock() const = 0;
- // Returns true if user is signed in.
+ // Returns true if at least one user has signed in.
virtual bool IsUserLoggedIn() const = 0;
// Returns true if we're logged in as a regular user.
« no previous file with comments | « chrome/browser/chromeos/login/user.cc ('k') | chrome/browser/chromeos/login/user_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698