Chromium Code Reviews| Index: chrome/browser/content_settings/host_content_settings_map.h |
| diff --git a/chrome/browser/content_settings/host_content_settings_map.h b/chrome/browser/content_settings/host_content_settings_map.h |
| index b5939b5fcaa726af32e01dda82859553ac1b17ad..0b7f2eed2ab6d878bae235c6f149953678bb9b70 100644 |
| --- a/chrome/browser/content_settings/host_content_settings_map.h |
| +++ b/chrome/browser/content_settings/host_content_settings_map.h |
| @@ -19,6 +19,7 @@ |
| #include "base/threading/platform_thread.h" |
| #include "base/tuple.h" |
| #include "chrome/browser/content_settings/content_settings_observer.h" |
| +#include "chrome/browser/content_settings/content_settings_override_provider.h" |
| #include "chrome/common/content_settings.h" |
| #include "components/content_settings/core/common/content_settings_pattern.h" |
| #include "components/content_settings/core/common/content_settings_types.h" |
| @@ -33,6 +34,7 @@ class Value; |
| } |
| namespace content_settings { |
| +class OverrideProvider; |
| class ProviderInterface; |
| class PrefProvider; |
| } |
| @@ -248,6 +250,32 @@ class HostContentSettingsMap |
| const ContentSettingsPattern& secondary_pattern, |
| ContentSettingsType content_type); |
| + // Returns the content setting without considering the global on/off toggle |
| + // for the content setting that matches the URLs. |
| + ContentSetting GetContentSettingWithoutOverride( |
| + const GURL& primary_url, |
| + const GURL& secondary_url, |
| + ContentSettingsType content_type, |
| + const std::string& resource_identifier); |
| + |
| + // Returns the single content setting |value| without considering the |
| + // global on/off toggle for the content setting that matches the given |
| + // patterns. |
| + // The ownership of the resulting |Value| is transfered to the caller. |
|
Bernhard Bauer
2014/09/10 09:07:18
If you transfer ownership, consider returning a sc
Daniel Nishi
2014/09/10 16:38:29
This made me realize that GetWebsiteSetting() was
|
| + base::Value* GetWebsiteSettingWithoutOverride( |
| + const GURL& primary_url, |
| + const GURL& secondary_url, |
| + ContentSettingsType content_type, |
| + const std::string& resource_identifier, |
| + content_settings::SettingInfo* info) const; |
| + |
| + // Sets globally if a given |content_type| |is_enabled|. |
| + void SetContentSettingOverride(ContentSettingsType content_type, |
| + bool is_enabled); |
| + |
| + // Returns if a given |content_type| is enabled. |
| + bool GetContentSettingOverride(ContentSettingsType content_type); |
| + |
| // Adds/removes an observer for content settings changes. |
| void AddObserver(content_settings::Observer* observer); |
| void RemoveObserver(content_settings::Observer* observer); |
| @@ -314,6 +342,7 @@ class HostContentSettingsMap |
| // time and by RegisterExtensionService, both of which should happen |
| // before any other uses of it. |
| ProviderMap content_settings_providers_; |
| + content_settings::OverrideProvider override_; |
| ObserverList<content_settings::Observer> observers_; |