summaryrefslogtreecommitdiffstats
path: root/chrome/browser/app_controller_mac.mm
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-11 18:16:39 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-11 18:16:39 +0000
commit6b2d30bcac57cc8566cf11efe24d5b5c404d3d91 (patch)
treed033cf7a5d597f2678d2590922e6711ee1dbd5f9 /chrome/browser/app_controller_mac.mm
parent832ecdbe8ab03045a8b80abe9071633548626dab (diff)
downloadchromium_src-6b2d30bcac57cc8566cf11efe24d5b5c404d3d91.zip
chromium_src-6b2d30bcac57cc8566cf11efe24d5b5c404d3d91.tar.gz
chromium_src-6b2d30bcac57cc8566cf11efe24d5b5c404d3d91.tar.bz2
[Mac] Conditionally show/hide the main menubar Users menu.
BUG=99310 TEST=With only 1 profile, the Users menu is not visible. With 2+ it is. Review URL: http://codereview.chromium.org/8233015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104919 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/app_controller_mac.mm')
-rw-r--r--chrome/browser/app_controller_mac.mm14
1 files changed, 6 insertions, 8 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index 0a8eac7..8ad407f 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -991,8 +991,6 @@ const AEEventClass kAECloudPrintUninstallClass = 'GCPu';
// Conditionally adds the Profile menu to the main menu bar.
- (void)initProfileMenu {
- bool enableMenu = ProfileManager::IsMultipleProfilesEnabled();
-
NSMenu* mainMenu = [NSApp mainMenu];
NSMenuItem* profileMenu = [mainMenu itemWithTag:IDC_PROFILE_MAIN_MENU];
@@ -1000,17 +998,17 @@ const AEEventClass kAECloudPrintUninstallClass = 'GCPu';
// in Chromium as squished menu items <http://crbug.com/90753>. To prevent
// this, remove the Profile menu on Leopard, regardless of the user's
// multiprofile state.
- if (base::mac::IsOSLeopard()) {
+ if (!ProfileManager::IsMultipleProfilesEnabled() ||
+ base::mac::IsOSLeopard()) {
[mainMenu removeItem:profileMenu];
return;
}
- [profileMenu setHidden:!enableMenu];
+ // The controller will unhide the menu if necessary.
+ [profileMenu setHidden:YES];
- if (enableMenu) {
- profileMenuController_.reset(
- [[ProfileMenuController alloc] initWithMainMenuItem:profileMenu]);
- }
+ profileMenuController_.reset(
+ [[ProfileMenuController alloc] initWithMainMenuItem:profileMenu]);
}
// The Confirm to Quit preference is atypical in that the preference lives in