Commit dbb2ebf0 authored by noms@chromium.org's avatar noms@chromium.org

[Win] Use the default, non-high-res avatar when badging the taskbar.

BUG=374173
TEST=Start Chrome with --new-profile-management. Open and 'Incognito' window.
The taksbar icon should now have a grey background.

Review URL: https://codereview.chromium.org/286933008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271862 0039d316-1c4b-4281-b951-d872f2087c98
parent 08d8f5de
...@@ -6,8 +6,10 @@ ...@@ -6,8 +6,10 @@
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.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_info_cache.h"
#include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/profiles/profile_manager.h"
#include "ui/base/resource/resource_bundle.h"
// static // static
void AvatarMenu::GetImageForMenuButton(Profile* profile, void AvatarMenu::GetImageForMenuButton(Profile* profile,
...@@ -21,7 +23,11 @@ void AvatarMenu::GetImageForMenuButton(Profile* profile, ...@@ -21,7 +23,11 @@ void AvatarMenu::GetImageForMenuButton(Profile* profile,
return; 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 = *is_rectangle =
cache.IsUsingGAIAPictureOfProfileAtIndex(index) && cache.IsUsingGAIAPictureOfProfileAtIndex(index) &&
cache.GetGAIAPictureOfProfileAtIndex(index); cache.GetGAIAPictureOfProfileAtIndex(index);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment