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

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

Issue 260783002: Revert 267158 "CleanUp: Introduce UserInfo. Move session_state s..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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
Index: trunk/src/chrome/browser/chromeos/login/user.h
===================================================================
--- trunk/src/chrome/browser/chromeos/login/user.h (revision 267249)
+++ trunk/src/chrome/browser/chromeos/login/user.h (working copy)
@@ -8,7 +8,6 @@
#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"
@@ -70,7 +69,7 @@
// returned by |displayed_email()|.
// Displayed emails are for use in UI only, anywhere else users must be referred
// to by |email()|.
-class User : public ash::UserInfo {
+class User {
public:
// The user type. Used in a histogram; do not modify existing types.
typedef enum {
@@ -124,20 +123,19 @@
// The email the user used to log in.
const std::string& email() const { return email_; }
- // The displayed user name.
- base::string16 display_name() const { return display_name_; }
+ // Returns the human name to display for this user.
+ base::string16 GetDisplayName() const;
- // 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 given name of user, or empty string if given name is unknown.
+ const base::string16& given_name() const { return given_name_; }
// 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;
@@ -170,6 +168,9 @@
// 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 | « trunk/src/chrome/browser/chromeos/login/session_login_browsertest.cc ('k') | trunk/src/chrome/browser/chromeos/login/user.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698