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

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

Issue 8773046: [cros] Display emails of users are stored in a separate dictionary in Local State. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 9 years 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.h
diff --git a/chrome/browser/chromeos/login/user.h b/chrome/browser/chromeos/login/user.h
index 7921ac4d6cb71066355b5879dd2de7f0b4d5ff26..ad2bd5c564957c0a3c8415142eaf4439c95387b3 100644
--- a/chrome/browser/chromeos/login/user.h
+++ b/chrome/browser/chromeos/login/user.h
@@ -45,15 +45,14 @@ class User {
bool NeedsNameTooltip() const;
// The image for this user.
- void SetImage(const SkBitmap& image, int image_index);
const SkBitmap& image() const { return image_; }
int image_index() const { return image_index_; }
// OAuth token status for this user.
OAuthTokenStatus oauth_token_status() const { return oauth_token_status_; }
- void set_oauth_token_status(OAuthTokenStatus status) {
- oauth_token_status_ = status;
- }
+
+ // The displayed (non-canonical) user email.
+ std::string display_email() const { return display_email_; }
private:
friend class UserManager;
@@ -62,7 +61,20 @@ class User {
explicit User(const std::string& email);
~User();
+ // Setters are private so only UserManager can call them.
+ void SetImage(const SkBitmap& image, int image_index);
+
+ void set_oauth_token_status(OAuthTokenStatus status) {
+ oauth_token_status_ = status;
+ }
+
+ void set_display_email(const std::string& display_email) {
+ display_email_ = display_email;
+ }
+
std::string email_;
+ // The displayed user email, defaults to |email_|.
+ std::string display_email_;
SkBitmap image_;
OAuthTokenStatus oauth_token_status_;

Powered by Google App Engine
This is Rietveld 408576698