Chromium Code Reviews| Index: chrome/browser/profiles/profile_io_data.cc |
| diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc |
| index 6e14ddcf3471d3f2ede004a0225897cbe5f23048..353d458b5a98109eebb370d194e1c154d70e5aad 100644 |
| --- a/chrome/browser/profiles/profile_io_data.cc |
| +++ b/chrome/browser/profiles/profile_io_data.cc |
| @@ -118,7 +118,12 @@ |
| #include "net/ssl/client_cert_store_nss.h" |
| #endif |
| +#if defined(OS_ANDROID) |
| +#include "chrome/browser/android/chromium_application.h" |
| +#endif // OS_ANDROID |
| + |
| #if defined(OS_WIN) |
| +#include "base/win/metro.h" |
| #include "net/ssl/client_cert_store_win.h" |
| #endif |
| @@ -132,6 +137,10 @@ using content::ResourceContext; |
| namespace { |
| +#if defined(OS_WIN) |
| +bool g_parental_control_on = false; |
|
mmenke
2014/06/17 20:41:44
Why not make this a member of ProfileIOData?
mmenke
2014/06/17 20:44:13
Alternatively, put it in some other file (metro.h?
guohui
2014/06/18 19:36:38
Done.
|
| +#endif // OS_WIN |
| + |
| #if defined(DEBUG_DEVTOOLS) |
| bool IsSupportedDevToolsURL(const GURL& url, base::FilePath* path) { |
| std::string bundled_path_prefix(chrome::kChromeUIDevToolsBundledPath); |
| @@ -464,6 +473,10 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) { |
| } |
| #endif |
| +#if defined(OS_WIN) |
| + g_parental_control_on = base::win::IsParentalControlActivityLoggingOn(); |
| +#endif // OS_WIN |
| + |
| incognito_availibility_pref_.Init( |
| prefs::kIncognitoModeAvailability, pref_service); |
| incognito_availibility_pref_.MoveToThread(io_message_loop_proxy); |
| @@ -752,6 +765,16 @@ bool ProfileIOData::IsOffTheRecord() const { |
| || profile_type() == Profile::GUEST_PROFILE; |
| } |
| +bool ProfileIOData::ArePlatformParentalControlsEnabledCached() const { |
| +#if defined(OS_WIN) |
| + return g_parental_control_on; |
| +#elif defined(OS_ANDROID) |
| + return chrome::android::ChromiumApplication::AreParentalControlsEnabled(); |
| +#else |
| + return false; |
| +#endif |
| +} |
| + |
| void ProfileIOData::InitializeMetricsEnabledStateOnUIThread() { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| #if defined(OS_CHROMEOS) |