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

Unified Diff: chrome/browser/profiles/avatar_menu.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
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/profiles/profile_info_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/avatar_menu.cc
diff --git a/chrome/browser/profiles/avatar_menu.cc b/chrome/browser/profiles/avatar_menu.cc
index 6b7fee6dcaa640e9eeff7976ab78fa2f0ee355d5..2b5a5924dcd201f9d190ebfa58f285818dc1436a 100644
--- a/chrome/browser/profiles/avatar_menu.cc
+++ b/chrome/browser/profiles/avatar_menu.cc
@@ -39,14 +39,6 @@
using content::BrowserThread;
-namespace {
-
-// Constants for the show profile switcher experiment
-const char kShowProfileSwitcherFieldTrialName[] = "ShowProfileSwitcher";
-const char kAlwaysShowSwitcherGroupName[] = "AlwaysShow";
-
-} // namespace
-
AvatarMenu::AvatarMenu(ProfileInfoInterface* profile_cache,
AvatarMenuObserver* observer,
Browser* browser)
@@ -97,27 +89,15 @@ AvatarMenu::Item::~Item() {
// static
bool AvatarMenu::ShouldShowAvatarMenu() {
- if (base::FieldTrialList::FindFullName(kShowProfileSwitcherFieldTrialName) ==
- kAlwaysShowSwitcherGroupName) {
- // We should only be in this group when multi-profiles is enabled.
- DCHECK(profiles::IsMultipleProfilesEnabled());
- return true;
- }
-
// TODO: Eliminate this ifdef. Add a delegate interface for the menu which
// would also help remove the Browser dependency in AvatarMenuActions
// implementations.
- if (profiles::IsMultipleProfilesEnabled()) {
#if defined(OS_CHROMEOS)
- // On ChromeOS the menu will not be shown.
- return false;
+ // On ChromeOS the menu will not be shown.
+ return false;
#else
- return switches::IsNewAvatarMenu() ||
- (g_browser_process->profile_manager() &&
- g_browser_process->profile_manager()->GetNumberOfProfiles() > 1);
+ return true;
#endif
- }
- return false;
}
bool AvatarMenu::CompareItems(const Item* item1, const Item* item2) {
@@ -132,15 +112,16 @@ void AvatarMenu::SwitchToProfile(size_t index,
index == GetActiveProfileIndex());
const Item& item = GetItemAt(index);
- if (switches::IsNewAvatarMenu()) {
- // Don't open a browser window for signed-out profiles.
- if (item.signin_required) {
- UserManager::Show(item.profile_path,
- profiles::USER_MANAGER_NO_TUTORIAL,
- profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION);
- return;
- }
+#if !defined(OS_CHROMEOS)
+ // ChromeOS doesn't have the User Manager, it can't open it.
+ // Don't open a browser window for signed-out profiles.
+ if (item.signin_required) {
+ UserManager::Show(item.profile_path,
+ profiles::USER_MANAGER_NO_TUTORIAL,
+ profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION);
+ return;
}
+#endif
base::FilePath path =
profile_info_->GetPathOfProfileAtIndex(item.profile_index);
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/profiles/profile_info_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698