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

Unified Diff: chrome/browser/prefs/incognito_mode_prefs.cc

Issue 10690181: Relanding this as the earlier attempt caused a managed mode browser test to fail. That issue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/incognito_mode_prefs.cc
===================================================================
--- chrome/browser/prefs/incognito_mode_prefs.cc (revision 146470)
+++ chrome/browser/prefs/incognito_mode_prefs.cc (working copy)
@@ -10,6 +10,10 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
+#if defined(OS_WIN)
+#include "base/win/metro.h"
+#endif // OS_WIN
+
// static
bool IncognitoModePrefs::IntToAvailability(int in_value,
Availability* out_value) {
@@ -29,6 +33,15 @@
Availability result = IncognitoModePrefs::ENABLED;
bool valid = IntToAvailability(pref_value, &result);
DCHECK(valid);
+#if defined(OS_WIN)
+ // Disable incognito mode windows if parental controls are on. This is only
+ // for Windows Vista and above.
+ if (base::win::IsParentalControlActivityLoggingOn()) {
+ if (result == IncognitoModePrefs::FORCED)
+ LOG(ERROR) << "Ignoring FORCED incognito. Parental control logging on";
+ return IncognitoModePrefs::DISABLED;
+ }
+#endif // OS_WIN
return result;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698