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

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

Issue 336213005: Disable incognito link if parental control is on (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sky's comments addressed Created 6 years, 6 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 | « chrome/browser/prefs/incognito_mode_prefs.h ('k') | chrome/browser/signin/signin_header_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/incognito_mode_prefs.cc
diff --git a/chrome/browser/prefs/incognito_mode_prefs.cc b/chrome/browser/prefs/incognito_mode_prefs.cc
index 7d124ffeadd525243a2f28b3b5e6e026b0b51f0c..3b7b32708f2766fc8198d5278708f2b61cfc9282 100644
--- a/chrome/browser/prefs/incognito_mode_prefs.cc
+++ b/chrome/browser/prefs/incognito_mode_prefs.cc
@@ -20,6 +20,14 @@
#include "chrome/browser/android/chromium_application.h"
#endif // OS_ANDROID
+#if defined(OS_WIN)
+namespace {
+
+bool g_parental_control_on = false;
+
+} // empty namespace
+#endif // OS_WIN
+
// static
bool IncognitoModePrefs::IntToAvailability(int in_value,
Availability* out_value) {
@@ -102,3 +110,20 @@ bool IncognitoModePrefs::ArePlatformParentalControlsEnabled() {
return false;
#endif
}
+
+#if defined(OS_WIN)
+void IncognitoModePrefs::InitializePlatformParentalControls() {
+ g_parental_control_on = base::win::IsParentalControlActivityLoggingOn();
+}
+#endif // OS_WIN
+
+bool IncognitoModePrefs::ArePlatformParentalControlsEnabledCached() {
+#if defined(OS_WIN)
+ return g_parental_control_on;
+#elif defined(OS_ANDROID)
+ return chrome::android::ChromiumApplication::AreParentalControlsEnabled();
+#else
+ return false;
+#endif
+}
+
« no previous file with comments | « chrome/browser/prefs/incognito_mode_prefs.h ('k') | chrome/browser/signin/signin_header_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698