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

Unified Diff: chrome/browser/ui/views/profiles/avatar_menu_button.cc

Issue 1307093004: Remove references to IsNewAvatarMenu since the flag was removed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review feedback Created 5 years, 3 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
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..30da45d23be85c6e0c8b1015d2b29b688aecec06 100644
--- a/chrome/browser/ui/views/profiles/avatar_menu_button.cc
+++ b/chrome/browser/ui/views/profiles/avatar_menu_button.cc
@@ -121,24 +121,20 @@ 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);
+#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;
}

Powered by Google App Engine
This is Rietveld 408576698