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..5e2c243035746645a3d3cd39cbdac41132626a6c 100644 |
| --- a/chrome/browser/profiles/profile_io_data.cc |
| +++ b/chrome/browser/profiles/profile_io_data.cc |
| @@ -42,6 +42,7 @@ |
| #include "chrome/browser/net/chrome_network_delegate.h" |
| #include "chrome/browser/net/cookie_store_util.h" |
| #include "chrome/browser/net/proxy_service_factory.h" |
| +#include "chrome/browser/prefs/incognito_mode_prefs.h" |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/profiles/profile_manager.h" |
| #include "chrome/browser/signin/signin_names_io_thread.h" |
| @@ -119,6 +120,7 @@ |
| #endif |
| #if defined(OS_WIN) |
| +#include "base/win/metro.h" |
| #include "net/ssl/client_cert_store_win.h" |
| #endif |
| @@ -126,6 +128,10 @@ |
| #include "net/ssl/client_cert_store_mac.h" |
| #endif |
| +#if defined(OS_ANDROID) |
|
Bernhard Bauer
2014/06/17 09:15:45
Move this block before OS_WIN, so the #ifdef condi
guohui
2014/06/17 18:45:04
Done.
|
| +#include "chrome/browser/android/chromium_application.h" |
| +#endif // OS_ANDROID |
| + |
| using content::BrowserContext; |
| using content::BrowserThread; |
| using content::ResourceContext; |
| @@ -464,6 +470,8 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) { |
| } |
| #endif |
| + // Makes sure the cached variable for parental control is initialized. |
| + IncognitoModePrefs::GetAvailability(profile->GetPrefs()); |
|
mmenke
2014/06/16 23:25:11
Is there a reason we can't use a PrefMember to kee
Bernhard Bauer
2014/06/17 09:15:45
The value isn't always coming from PrefService (if
|
| incognito_availibility_pref_.Init( |
| prefs::kIncognitoModeAvailability, pref_service); |
| incognito_availibility_pref_.MoveToThread(io_message_loop_proxy); |
| @@ -752,6 +760,16 @@ bool ProfileIOData::IsOffTheRecord() const { |
| || profile_type() == Profile::GUEST_PROFILE; |
| } |
| +bool ProfileIOData::ArePlatformParentalControlsEnabledCached() const { |
|
Bernhard Bauer
2014/06/17 09:15:45
So... above we initialize the parental control set
guohui
2014/06/17 18:45:04
Done.
|
| +#if defined(OS_WIN) |
| + return base::win::IsParentalControlActivityLoggingOnCached(); |
| +#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) |