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

Unified Diff: chrome/browser/chromeos/login/user_manager_impl.cc

Issue 10541036: Show account part of the display email when real name is not available. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: comments Created 8 years, 6 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/user.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/user_manager_impl.cc
diff --git a/chrome/browser/chromeos/login/user_manager_impl.cc b/chrome/browser/chromeos/login/user_manager_impl.cc
index d1b119812d1862f4e4c319a668011802e53ad0ac..2cee53f2560481270120e6c01cf71fecc70d8af6 100644
--- a/chrome/browser/chromeos/login/user_manager_impl.cc
+++ b/chrome/browser/chromeos/login/user_manager_impl.cc
@@ -289,6 +289,8 @@ void UserManagerImpl::UserLoggedIn(const std::string& email) {
users_.insert(users_.begin(), logged_in_user_);
if (is_current_user_new_) {
+ SaveUserDisplayName(GetLoggedInUser().email(),
+ UTF8ToUTF16(GetLoggedInUser().GetAccountName(true)));
SetInitialUserImage(email);
SetInitialUserWallpaper(email);
} else {
@@ -1380,11 +1382,13 @@ void UserManagerImpl::OnDownloadComplete(ProfileDownloader* downloader,
ProfileDownloadResult result;
if (!success) {
+ SaveUserDisplayName(GetLoggedInUser().email(),
+ UTF8ToUTF16(GetLoggedInUser().GetAccountName(true)));
result = kDownloadFailure;
} else {
if (downloader->GetProfileFullName().empty()) {
SaveUserDisplayName(GetLoggedInUser().email(),
- UTF8ToUTF16(GetLoggedInUser().email()));
+ UTF8ToUTF16(GetLoggedInUser().GetAccountName(true)));
} else {
SaveUserDisplayName(GetLoggedInUser().email(),
downloader->GetProfileFullName());
« no previous file with comments | « chrome/browser/chromeos/login/user.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698