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

Unified Diff: components/user_manager/user.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: components/user_manager/user.h
diff --git a/components/user_manager/user.h b/components/user_manager/user.h
index a0b2c2742a2f2d806843ea92969d6f561a748d91..fe774b43e5c71b9c54ec95d5aa1164333df80c44 100644
--- a/components/user_manager/user.h
+++ b/components/user_manager/user.h
@@ -82,9 +82,9 @@ class USER_MANAGER_EXPORT User : public UserInfo {
// Returns the user type.
virtual UserType GetType() const = 0;
- // The email the user used to log in.
- const std::string& email() const { return email_; }
-
+/* // The email the user used to log in.
+ const std::string& GetEmail();
+*/
// The displayed user name.
base::string16 display_name() const { return display_name_; }
@@ -96,7 +96,7 @@ class USER_MANAGER_EXPORT User : public UserInfo {
base::string16 GetDisplayName() const override;
base::string16 GetGivenName() const override;
const gfx::ImageSkia& GetImage() const override;
- UserID GetUserID() const override;
+ const UserID& GetUserID() const override;
// Allows managing child status of the user. Used for RegularUser.
virtual void SetIsChild(bool is_child);
@@ -179,13 +179,13 @@ class USER_MANAGER_EXPORT User : public UserInfo {
friend class chromeos::UserAddingScreenTest;
// Do not allow anyone else to create new User instances.
- static User* CreateRegularUser(const UserID& email);
+ static User* CreateRegularUser(const UserID& user_id);
static User* CreateGuestUser();
- static User* CreateKioskAppUser(const UserID& kiosk_app_username);
- static User* CreateSupervisedUser(const UserID& username);
- static User* CreatePublicAccountUser(const UserID& email);
+ static User* CreateKioskAppUser(const UserID& kiosk_app);
+ static User* CreateSupervisedUser(const UserID& user_id);
+ static User* CreatePublicAccountUser(const UserID& user_id);
- explicit User(const std::string& email);
+ explicit User(const UserID& email);
~User() override;
const std::string* GetAccountLocale() const { return account_locale_.get(); }
@@ -244,7 +244,7 @@ class USER_MANAGER_EXPORT User : public UserInfo {
bool has_gaia_account() const;
private:
- std::string email_;
+ UserID user_id_;
base::string16 display_name_;
base::string16 given_name_;
// The displayed user email, defaults to |email_|.

Powered by Google App Engine
This is Rietveld 408576698