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

Unified Diff: chrome/browser/ui/ash/multi_user/multi_user_util.h

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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/ui/ash/multi_user/multi_user_util.h
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_util.h b/chrome/browser/ui/ash/multi_user/multi_user_util.h
index b85a4589a477eb943ac9a423effdc02250b5daaa..e2d90163c358e2a6d2a3172ebc2374e96bd01925 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_util.h
+++ b/chrome/browser/ui/ash/multi_user/multi_user_util.h
@@ -13,16 +13,20 @@ namespace aura {
class Window;
}
+namespace user_manager {
+class UserID;
+}
+
namespace multi_user_util {
// Get the user id from a given profile.
-std::string GetUserIDFromProfile(Profile* profile);
+user_manager::UserID GetUserIDFromProfile(Profile* profile);
// Get the user id from an email address.
-std::string GetUserIDFromEmail(const std::string& email);
+user_manager::UserID GetUserIDFromEmail(const std::string& email);
// Get a profile for a given user id.
-Profile* GetProfileFromUserID(const std::string& user_id);
+Profile* GetProfileFromUserID(const user_manager::UserID& user_id);
// Get a profile for a |window|. Returns NULL if window belongs to no profile.
Profile* GetProfileFromWindow(aura::Window* window);
@@ -34,7 +38,7 @@ bool IsProfileFromActiveUser(Profile* profile);
// Gets the current user. Note that this will only return for ChromeOS a string.
// All other operating systems will get an empty string.
-const std::string& GetCurrentUserId();
+const user_manager::UserID& GetCurrentUserId();
// Move the window to the current user's desktop.
void MoveWindowToCurrentDesktop(aura::Window* window);

Powered by Google App Engine
This is Rietveld 408576698