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

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

Issue 1428213004: This CL replaces std::string user_id in ash/* with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after review. Created 5 years, 1 month 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..476e68fdffb1b2a6e38207f5b6030e9183209999 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_util.h
+++ b/chrome/browser/ui/ash/multi_user/multi_user_util.h
@@ -7,6 +7,7 @@
#include <string>
+class AccountId;
class Profile;
namespace aura {
@@ -16,13 +17,13 @@ class Window;
namespace multi_user_util {
// Get the user id from a given profile.
-std::string GetUserIDFromProfile(Profile* profile);
+AccountId GetAccountIdFromProfile(Profile* profile);
// Get the user id from an email address.
-std::string GetUserIDFromEmail(const std::string& email);
+AccountId GetAccountIdFromEmail(const std::string& email);
// Get a profile for a given user id.
-Profile* GetProfileFromUserID(const std::string& user_id);
+Profile* GetProfileFromAccountId(const AccountId& account_id);
// Get a profile for a |window|. Returns NULL if window belongs to no profile.
Profile* GetProfileFromWindow(aura::Window* window);
@@ -32,9 +33,9 @@ Profile* GetProfileFromWindow(aura::Window* window);
// return false.
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();
+// Gets the current user. Note that this will return a valid AccountId for
+// ChromeOS only. All other operating systems will get an empty AccountId.
+const AccountId GetCurrentAccountId();
// Move the window to the current user's desktop.
void MoveWindowToCurrentDesktop(aura::Window* window);

Powered by Google App Engine
This is Rietveld 408576698