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

Unified Diff: chrome/browser/profiles/avatar_menu_model.cc

Issue 23532073: Only showing the new multi user menus when there are at least 2 suitable users known to the system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Created 7 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 | « no previous file | chrome/browser/ui/ash/chrome_shell_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/avatar_menu_model.cc
diff --git a/chrome/browser/profiles/avatar_menu_model.cc b/chrome/browser/profiles/avatar_menu_model.cc
index 2c83c571eeed49357db3f1c80fd58f33a39f522d..87f4a59d7b8b2db0a0b79caacf82ec2e53433d84 100644
--- a/chrome/browser/profiles/avatar_menu_model.cc
+++ b/chrome/browser/profiles/avatar_menu_model.cc
@@ -21,6 +21,7 @@
#include "chrome/browser/profiles/profile_window.h"
#include "chrome/browser/profiles/profiles_state.h"
#include "chrome/browser/signin/signin_promo.h"
+#include "chrome/browser/ui/ash/chrome_shell_delegate.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window.h"
@@ -269,11 +270,10 @@ bool AvatarMenuModel::ShouldShowAvatarMenu() {
}
if (profiles::IsMultipleProfilesEnabled()) {
#if defined(OS_CHROMEOS)
- // On ChromeOS we can always show this menu.
- // TODO(skuhne): For now show this menu even if there is a single profile.
- // This will have to change once we work out the right way to determine if
- // the multi profile UX should be displayed.
- return true;
+ // On ChromeOS the menu will be always visible when it is possible to have
+ // two users logged in at the same time.
+ return ChromeShellDelegate::instance() &&
+ ChromeShellDelegate::instance()->IsMultiProfilesEnabled();
#else
return profiles::IsNewProfileManagementEnabled() ||
(g_browser_process->profile_manager() &&
« no previous file with comments | « no previous file | chrome/browser/ui/ash/chrome_shell_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698