Chromium Code Reviews| Index: components/content_settings/core/browser/content_settings_policy_provider.h |
| diff --git a/components/content_settings/core/browser/content_settings_policy_provider.h b/components/content_settings/core/browser/content_settings_policy_provider.h |
| index f2058456a24949fde95f63ec1d912f6c53506d9e..3e306cd83d73c3493380bfa38bcc910760b942a5 100644 |
| --- a/components/content_settings/core/browser/content_settings_policy_provider.h |
| +++ b/components/content_settings/core/browser/content_settings_policy_provider.h |
| @@ -7,6 +7,7 @@ |
| // A content settings provider that takes its settings out of policies. |
| +#include <map> |
| #include <vector> |
| #include "base/macros.h" |
| @@ -46,14 +47,24 @@ class PolicyProvider : public ObservableProvider { |
| void ShutdownOnUIThread() override; |
| + // Returns the pref exception usage setting for a given content type. |
| + ContentSetting AllowUserExceptionsForType( |
|
Bernhard Bauer
2016/04/07 09:11:08
What does the return value here mean?
huangs
2016/04/07 21:44:07
Updated comments and function name.
|
| + ContentSettingsType content_type) const; |
| + |
| private: |
| struct PrefsForManagedDefaultMapEntry; |
| + using UserExceptionsAllowedMap = |
| + std::map<ContentSettingsType, ContentSetting>; |
| + |
| static const PrefsForManagedDefaultMapEntry kPrefsForManagedDefault[]; |
| // Reads the policy managed default settings. |
| void ReadManagedDefaultSettings(); |
| + // Reads the policy managed exceptions settings (but not exception lists). |
| + void ReadUserExceptionsAllowed(); |
| + |
| // Callback for preference changes. |
| void OnPreferenceChanged(const std::string& pref_name); |
| @@ -71,6 +82,10 @@ class PolicyProvider : public ObservableProvider { |
| OriginIdentifierValueMap value_map_; |
| + // Preference exceptions can be explictly enabled or disabled by policy for |
| + // various content types. Only non-CONTENT_SETTING_DEFAULT values are stored. |
| + UserExceptionsAllowedMap user_exceptions_allowed_map_; |
| + |
| PrefService* prefs_; |
| PrefChangeRegistrar pref_change_registrar_; |