| 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 7ca0e29ffc422763127a2bf778ab0c02f1b04ed5..f68709c03de2eedf9fdaef0535fcaa01139e7f02 100644
|
| --- a/chrome/browser/prefs/incognito_mode_prefs.cc
|
| +++ b/chrome/browser/prefs/incognito_mode_prefs.cc
|
| @@ -16,6 +16,10 @@
|
| #include "base/win/metro.h"
|
| #endif // OS_WIN
|
|
|
| +#if defined(OS_ANDROID)
|
| +#include "chrome/browser/android/chromium_application.h"
|
| +#endif // OS_ANDROID
|
| +
|
| // static
|
| bool IncognitoModePrefs::IntToAvailability(int in_value,
|
| Availability* out_value) {
|
| @@ -35,15 +39,11 @@ IncognitoModePrefs::Availability IncognitoModePrefs::GetAvailability(
|
| 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 (ArePlatformParentalControlsEnabled()) {
|
| if (result == IncognitoModePrefs::FORCED)
|
| LOG(ERROR) << "Ignoring FORCED incognito. Parental control logging on";
|
| return IncognitoModePrefs::DISABLED;
|
| }
|
| -#endif // OS_WIN
|
| return result;
|
| }
|
|
|
| @@ -87,3 +87,15 @@ bool IncognitoModePrefs::CanOpenBrowser(Profile* profile) {
|
| NOTREACHED();
|
| return false;
|
| }
|
| +
|
| +// static
|
| +bool IncognitoModePrefs::ArePlatformParentalControlsEnabled() {
|
| +#if defined(OS_WIN)
|
| + // Disable incognito mode windows if parental controls are on. This is only
|
| + // for Windows Vista and above.
|
| + return base::win::IsParentalControlActivityLoggingOn();
|
| +#elif defined(OS_ANDROID)
|
| + return chrome::android::ChromiumApplication::AreParentalControlsEnabled();
|
| +#endif
|
| + return false;
|
| +}
|
|
|