Index: chrome/browser/chromeos/login/user.cc |
diff --git a/chrome/browser/chromeos/login/user.cc b/chrome/browser/chromeos/login/user.cc |
index f165e552d665c7c44311f1a12ebea77038f644dd..c21222894579b6336e124baf8dcc61414cd83627 100644 |
--- a/chrome/browser/chromeos/login/user.cc |
+++ b/chrome/browser/chromeos/login/user.cc |
@@ -10,6 +10,7 @@ |
#include "base/threading/thread_restrictions.h" |
#include "chrome/browser/chromeos/login/default_user_images.h" |
#include "chrome/browser/chromeos/login/user_manager.h" |
+#include "google_apis/gaia/gaia_auth_util.h" |
#include "grit/theme_resources.h" |
#include "ui/base/resource/resource_bundle.h" |
@@ -168,6 +169,10 @@ void UserContext::CopyFrom(const UserContext& other) { |
auth_flow = other.auth_flow; |
} |
+std::string User::GetEmail() const { |
+ return display_email(); |
+} |
+ |
base::string16 User::GetDisplayName() const { |
// Fallback to the email account name in case display name haven't been set. |
return display_name_.empty() ? |
@@ -175,6 +180,18 @@ base::string16 User::GetDisplayName() const { |
display_name_; |
} |
+base::string16 User::GetGivenName() const { |
+ return given_name_; |
+} |
+ |
+const gfx::ImageSkia& User::GetImage() const { |
+ return user_image_.image(); |
+} |
+ |
+std::string User::GetUserID() const { |
+ return gaia::CanonicalizeEmail(gaia::SanitizeEmail(email())); |
+} |
+ |
std::string User::GetAccountName(bool use_display_email) const { |
if (use_display_email && !display_email_.empty()) |
return GetUserName(display_email_); |