Chromium Code Reviews| Index: chrome/browser/ui/cocoa/profile_menu_controller.mm |
| diff --git a/chrome/browser/ui/cocoa/profile_menu_controller.mm b/chrome/browser/ui/cocoa/profile_menu_controller.mm |
| index 50a40db8f6f2816d2dcfb692572741579dd26f79..b79b00a65ddf06f09a97c98b31e35c585ee7dd28 100644 |
| --- a/chrome/browser/ui/cocoa/profile_menu_controller.mm |
| +++ b/chrome/browser/ui/cocoa/profile_menu_controller.mm |
| @@ -12,6 +12,7 @@ |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/profiles/profile_info_cache.h" |
| #include "chrome/browser/profiles/profile_info_interface.h" |
| +#include "chrome/browser/profiles/profile_info_util.h" |
| #include "chrome/browser/profiles/profile_manager.h" |
| #include "chrome/browser/profiles/profile_metrics.h" |
| #include "chrome/browser/ui/browser.h" |
| @@ -129,7 +130,13 @@ class Observer : public chrome::BrowserListObserver, |
| if (dock) { |
| [item setIndentationLevel:1]; |
| } else { |
| - [item setImage:itemData.icon.ToNSImage()]; |
| + gfx::Image itemIcon = itemData.icon; |
| + // The image might be too large and need to be resized (i.e. if this is |
| + // a signed-in user using the GAIA profile photo. |
|
Alexei Svitkine (slow)
2014/01/29 20:23:56
Nit: Close your parenthesis!
noms (inactive)
2014/01/29 20:31:29
GAH. Done.
On 2014/01/29 20:23:56, Alexei Svitkine
|
| + if (profiles::AvatarIconNeedsResizing(itemIcon)) |
| + itemIcon = profiles::GetAvatarIconForWebUI(itemIcon, true); |
| + |
| + [item setImage:itemIcon.ToNSImage()]; |
| [item setState:itemData.active ? NSOnState : NSOffState]; |
| } |
| [menu insertItem:item atIndex:i + offset]; |