| 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..654871279ce2097214906b3c37efa82409053c87 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;
|
| }
|
| @@ -97,9 +99,8 @@ class HostContentSettingsMap
|
| // setting, NULL is returned and the |source| field of |info| is set to
|
| // |SETTING_SOURCE_NONE|. The pattern fiels of |info| are set to empty
|
| // patterns.
|
| - // The ownership of the resulting |Value| is transfered to the caller.
|
| // May be called on any thread.
|
| - base::Value* GetWebsiteSetting(
|
| + scoped_ptr<base::Value> GetWebsiteSetting(
|
| const GURL& primary_url,
|
| const GURL& secondary_url,
|
| ContentSettingsType content_type,
|
| @@ -248,6 +249,31 @@ 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.
|
| + scoped_ptr<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 +340,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_;
|
|
|
|
|