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

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

Issue 2807373003: MD Settings: get the avatar icon the same way the user switcher does (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 | « no previous file | 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 5bb0e952d00df355d912306c9ff4f349cf2c6e53..5dc80da74913d2cc2a8b8ee3cf1c566a9396816e 100644
--- a/chrome/browser/ui/webui/settings/profile_info_handler.cc
+++ b/chrome/browser/ui/webui/settings/profile_info_handler.cc
@@ -206,15 +206,12 @@ ProfileInfoHandler::GetAccountNameAndIcon() const {
->GetProfileAttributesStorage()
.GetProfileAttributesWithPath(profile_->GetPath(), &entry)) {
name = base::UTF16ToUTF8(entry->GetName());
-
- if (entry->IsUsingGAIAPicture() && entry->GetGAIAPicture()) {
- constexpr int kAvatarIconSize = 40;
- gfx::Image icon = profiles::GetSizedAvatarIcon(
- entry->GetAvatarIcon(), true, kAvatarIconSize, kAvatarIconSize);
- icon_url = webui::GetBitmapDataUrl(icon.AsBitmap());
- } else {
- icon_url = profiles::GetDefaultAvatarIconUrl(entry->GetAvatarIconIndex());
- }
+ // TODO(dbeam): special case chrome://theme/IDR_PROFILE_AVATAR_* in
+ // theme_source.cc.
dschuyler 2017/04/11 22:58:54 Could we say something about why, like: to avoid u
Dan Beam 2017/04/11 23:02:30 Done.
+ constexpr int kAvatarIconSize = 40;
+ gfx::Image icon = profiles::GetSizedAvatarIcon(
+ entry->GetAvatarIcon(), true, kAvatarIconSize, kAvatarIconSize);
+ icon_url = webui::GetBitmapDataUrl(icon.AsBitmap());
}
#endif // defined(OS_CHROMEOS)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698