Chromium Code Reviews| Index: chrome/browser/ui/views/profiles/avatar_menu_button.cc |
| diff --git a/chrome/browser/ui/views/profiles/avatar_menu_button.cc b/chrome/browser/ui/views/profiles/avatar_menu_button.cc |
| index 1c0aa1828d731b9a7e8827a990adb61c876a7e65..53336c9b21088951ccade0df3d8846b6e51542b5 100644 |
| --- a/chrome/browser/ui/views/profiles/avatar_menu_button.cc |
| +++ b/chrome/browser/ui/views/profiles/avatar_menu_button.cc |
| @@ -121,24 +121,22 @@ bool AvatarMenuButton::GetAvatarImages(Profile* profile, |
| if (index == std::string::npos) |
| return false; |
| - if (switches::IsNewAvatarMenu()) { |
| - *avatar = cache.GetAvatarIconOfProfileAtIndex(index); |
| - // TODO(noms): Once the code for the old avatar menu button is removed, |
| - // this function will only be called for badging the taskbar icon. The |
| - // function can be renamed to something like GetAvatarImageForBadging() |
| - // and only needs to return the avatar from |
| - // AvatarMenu::GetImageForMenuButton(). |
| -#if !defined(OS_CHROMEOS) |
| - bool is_badge_rectangle = false; |
| - AvatarMenu::GetImageForMenuButton(profile->GetPath(), |
| - taskbar_badge_avatar, |
| - &is_badge_rectangle); |
| +#if defined(OS_CHROMEOS) |
| + AvatarMenu::GetImageForMenuButton(profile->GetPath(), |
| + avatar, |
| + is_rectangle); |
|
Peter Kasting
2015/09/29 20:34:16
Nit: All fits on one line, I think:
AvatarMen
anthonyvd
2015/09/30 18:34:03
Done.
|
| +#else |
| + *avatar = cache.GetAvatarIconOfProfileAtIndex(index); |
| + // TODO(noms): Once the code for the old avatar menu button is removed, |
| + // this function will only be called for badging the taskbar icon. The |
| + // function can be renamed to something like GetAvatarImageForBadging() |
| + // and only needs to return the avatar from |
| + // AvatarMenu::GetImageForMenuButton(). |
| + bool is_badge_rectangle = false; |
| + AvatarMenu::GetImageForMenuButton(profile->GetPath(), |
| + taskbar_badge_avatar, |
| + &is_badge_rectangle); |
| #endif |
| - } else { |
| - AvatarMenu::GetImageForMenuButton(profile->GetPath(), |
| - avatar, |
| - is_rectangle); |
| - } |
| } |
| return true; |
| } |