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

Unified Diff: chrome/browser/app_controller_mac.mm

Issue 697693004: Supervised users: if history recording is off, allow incognito and deleting history (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix browser_tests Created 6 years, 1 month 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/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
« no previous file with comments | « no previous file | chrome/browser/resources/history/history.js » ('j') | chrome/browser/resources/history/history.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698