Index: chrome/browser/app_controller_mac.mm |
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm |
index 3a433d7120e7dd48a494f789c72612391e8ad92c..0e03adb76f0517d8f792f01dd556607ee2c94e5c 100644 |
--- a/chrome/browser/app_controller_mac.mm |
+++ b/chrome/browser/app_controller_mac.mm |
@@ -33,6 +33,7 @@ |
#include "chrome/browser/lifetime/application_lifetime.h" |
#include "chrome/browser/mac/handoff_utility.h" |
#include "chrome/browser/mac/mac_startup_profiler.h" |
+#include "chrome/browser/prefs/incognito_mode_prefs.h" |
#include "chrome/browser/profiles/profile_info_cache_observer.h" |
#include "chrome/browser/profiles/profile_manager.h" |
#include "chrome/browser/profiles/profiles_state.h" |
@@ -1467,7 +1468,8 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver { |
[dockMenu addItem:item]; |
// |profile| can be NULL during unit tests. |
- if (!profile || !profile->IsSupervised()) { |
+ if (!profile || IncognitoModePrefs::GetAvailability(profile->GetPrefs()) != |
Robert Sesek
2014/11/06 19:06:41
nit: would be a little better to break after || an
Marc Treib
2014/11/07 10:16:42
Break after || done. The condition still doesn't f
|
+ IncognitoModePrefs::DISABLED) { |
titleStr = l10n_util::GetNSStringWithFixup(IDS_NEW_INCOGNITO_WINDOW_MAC); |
item.reset( |
[[NSMenuItem alloc] initWithTitle:titleStr |