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

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

Issue 253063002: CleanUp: Introduce UserInfo. Move session_state stuff to ash/session. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 6 years, 8 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
« no previous file with comments | « chrome/browser/chromeos/login/session_login_browsertest.cc ('k') | chrome/browser/chromeos/login/user.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « chrome/browser/chromeos/login/session_login_browsertest.cc ('k') | chrome/browser/chromeos/login/user.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698