Index: chrome/browser/chromeos/login/user.h |
diff --git a/chrome/browser/chromeos/login/user.h b/chrome/browser/chromeos/login/user.h |
index e80b13b9aca6690826a2a460955ff186d9ff7ae7..58eb1a3ec7dd95b90e98b217d392ca20ac4099ec 100644 |
--- a/chrome/browser/chromeos/login/user.h |
+++ b/chrome/browser/chromeos/login/user.h |
@@ -8,6 +8,7 @@ |
#include <string> |
#include <vector> |
+#include "ash/session/user_info.h" |
#include "base/basictypes.h" |
#include "base/strings/string16.h" |
#include "chrome/browser/chromeos/login/user_image.h" |
@@ -69,7 +70,7 @@ struct UserContext { |
// returned by |displayed_email()|. |
// Displayed emails are for use in UI only, anywhere else users must be referred |
// to by |email()|. |
-class User { |
+class User : public ash::UserInfo { |
public: |
// The user type. Used in a histogram; do not modify existing types. |
typedef enum { |
@@ -123,19 +124,20 @@ class User { |
// The email the user used to log in. |
const std::string& email() const { return email_; } |
- // Returns the human name to display for this user. |
- base::string16 GetDisplayName() const; |
+ // The displayed user name. |
+ base::string16 display_name() const { return display_name_; } |
- // Returns given name of user, or empty string if given name is unknown. |
- const base::string16& given_name() const { return given_name_; } |
+ // ash::UserInfo |
+ virtual std::string GetEmail() const OVERRIDE; |
+ virtual base::string16 GetDisplayName() const OVERRIDE; |
+ virtual base::string16 GetGivenName() const OVERRIDE; |
+ virtual const gfx::ImageSkia& GetImage() const OVERRIDE; |
+ virtual std::string GetUserID() const OVERRIDE; |
// Returns the account name part of the email. Use the display form of the |
// email if available and use_display_name == true. Otherwise use canonical. |
std::string GetAccountName(bool use_display_email) const; |
- // The image for this user. |
- const gfx::ImageSkia& image() const { return user_image_.image(); } |
- |
// Whether the user has a default image. |
bool HasDefaultImage() const; |
@@ -168,9 +170,6 @@ class User { |
// True if image is being loaded from file. |
bool image_is_loading() const { return image_is_loading_; } |
- // The displayed user name. |
- base::string16 display_name() const { return display_name_; } |
- |
// The displayed (non-canonical) user email. |
virtual std::string display_email() const; |