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

Unified Diff: chrome/browser/profiles/avatar_menu_desktop.cc

Issue 286933008: [Win] Use the default, non-high-res avatar when badging the taskbar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/profiles/avatar_menu_desktop.cc
diff --git a/chrome/browser/profiles/avatar_menu_desktop.cc b/chrome/browser/profiles/avatar_menu_desktop.cc
index 35949a5ef7ec71e3733745a0633c68251d9654ab..01758c856a25394893eb39ade2e600c912b87474 100644
--- a/chrome/browser/profiles/avatar_menu_desktop.cc
+++ b/chrome/browser/profiles/avatar_menu_desktop.cc
@@ -6,8 +6,10 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/profiles/profile_avatar_icon_util.h"
#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/profiles/profile_manager.h"
+#include "ui/base/resource/resource_bundle.h"
// static
void AvatarMenu::GetImageForMenuButton(Profile* profile,
@@ -21,7 +23,11 @@ void AvatarMenu::GetImageForMenuButton(Profile* profile,
return;
}
- *image = cache.GetAvatarIconOfProfileAtIndex(index);
+ // Ensure we are using the default resource, not the downloaded high-res one.
+ const size_t icon_index = cache.GetAvatarIconIndexOfProfileAtIndex(index);
+ const int resource_id =
+ profiles::GetDefaultAvatarIconResourceIDAtIndex(icon_index);
+ *image = ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id);
*is_rectangle =
cache.IsUsingGAIAPictureOfProfileAtIndex(index) &&
cache.GetGAIAPictureOfProfileAtIndex(index);
« 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