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

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: rebase 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
« no previous file with comments | « no previous file | chrome/browser/resources/history/history.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4378baa7108a50d4efda51fcd62101a94ecf46c9 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,9 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver {
[dockMenu addItem:item];
// |profile| can be NULL during unit tests.
- if (!profile || !profile->IsSupervised()) {
+ if (!profile ||
+ IncognitoModePrefs::GetAvailability(profile->GetPrefs()) !=
+ 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698