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

Unified Diff: chrome/browser/ui/webui/settings/profile_info_handler.cc

Issue 2810443002: MD Settings: People: Fix issues with user icons (Closed)
Patch Set: . Created 3 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/ui/webui/options/chromeos/user_image_source.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/settings/profile_info_handler.cc
diff --git a/chrome/browser/ui/webui/settings/profile_info_handler.cc b/chrome/browser/ui/webui/settings/profile_info_handler.cc
index d577cd57ff3534015683947dc2852de4e73185f1..5bb0e952d00df355d912306c9ff4f349cf2c6e53 100644
--- a/chrome/browser/ui/webui/settings/profile_info_handler.cc
+++ b/chrome/browser/ui/webui/settings/profile_info_handler.cc
@@ -194,17 +194,11 @@ ProfileInfoHandler::GetAccountNameAndIcon() const {
chromeos::ProfileHelper::Get()->GetUserByProfile(profile_);
DCHECK(user);
name = base::UTF16ToUTF8(user->GetDisplayName());
- std::string user_email = profile_->GetProfileUserName();
- if (user_email.empty()) {
- // User is not associated with a gaia account.
- user_email = user->GetAccountId().GetUserEmail();
- }
// Get image as data URL instead of using chrome://userimage source to avoid
// issues with caching.
- const AccountId account_id(AccountId::FromUserEmail(user_email));
scoped_refptr<base::RefCountedMemory> image =
- chromeos::options::UserImageSource::GetUserImage(account_id);
+ chromeos::options::UserImageSource::GetUserImage(user->GetAccountId());
icon_url = webui::GetPngDataUrl(image->front(), image->size());
#else // !defined(OS_CHROMEOS)
ProfileAttributesEntry* entry;
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/user_image_source.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698