| Index: chrome/browser/content_settings/content_settings_provider.h
|
| diff --git a/chrome/browser/content_settings/content_settings_provider.h b/chrome/browser/content_settings/content_settings_provider.h
|
| index e791eaddade8f36ac72730fd3a733fcc4805e030..1c8adc5087209e6a9b02f85d9b533104da5ce067 100644
|
| --- a/chrome/browser/content_settings/content_settings_provider.h
|
| +++ b/chrome/browser/content_settings/content_settings_provider.h
|
| @@ -8,8 +8,14 @@
|
| #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_
|
| #pragma once
|
|
|
| +#include "chrome/browser/content_settings/content_settings_pattern.h"
|
| +#include "chrome/browser/content_settings/content_settings_rule.h"
|
| #include "chrome/common/content_settings.h"
|
|
|
| +class GURL;
|
| +
|
| +namespace content_settings {
|
| +
|
| class DefaultContentSettingsProvider {
|
| public:
|
| virtual ~DefaultContentSettingsProvider() {}
|
| @@ -39,4 +45,36 @@ class DefaultContentSettingsProvider {
|
| ContentSettingsType content_type) const = 0;
|
| };
|
|
|
| +class ContentSettingsProvider {
|
| + public:
|
| + typedef std::string ResourceIdentifier;
|
| + typedef std::pair<ContentSettingsType, ResourceIdentifier> ContentIdentifier;
|
| +
|
| + virtual ~ContentSettingsProvider() {}
|
| +
|
| + // This may be called on any thread.
|
| + virtual ContentSetting GetContentSetting(
|
| + const GURL requesting_url,
|
| + const GURL embedding_url,
|
| + const ContentIdentifier& content_identifier) const = 0;
|
| +
|
| + // This should only be called on the UI thread.
|
| + virtual void SetContentSetting(
|
| + const ContentSettingsPattern& requesting_pattern,
|
| + const ContentSettingsPattern& embedding_pattern,
|
| + const ContentIdentifier& content_identifier,
|
| + ContentSetting content_setting) = 0;
|
| +
|
| + // This may be called on any thread.
|
| + virtual void GetAllContentSettingsRules(
|
| + const ContentIdentifier& content_identifier,
|
| + ContentSettingsRules* content_setting_rules) const = 0;
|
| +
|
| + // This should only be called on the UI thread.
|
| + virtual void ClearAllContentSettingsRules(
|
| + const ContentIdentifier& content_identifier) = 0;
|
| +};
|
| +
|
| +} // namespace content_settings
|
| +
|
| #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_
|
|
|