Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1093)

Unified Diff: chrome/browser/content_settings/mock_content_settings_provider.h

Issue 6253012: Add ContentSettingsProvider Interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits and last comments. Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/content_settings/mock_content_settings_provider.h
diff --git a/chrome/browser/content_settings/mock_content_settings_provider.h b/chrome/browser/content_settings/mock_content_settings_provider.h
index 21f5436660e6924b51a849fec6746d3dbfdd6ac1..817d7bde561a19ff49b61eedbb1157f75c25b575 100644
--- a/chrome/browser/content_settings/mock_content_settings_provider.h
+++ b/chrome/browser/content_settings/mock_content_settings_provider.h
@@ -11,7 +11,8 @@
namespace content_settings {
-class MockContentSettingsProvider : public DefaultProviderInterface {
+class MockContentSettingsProvider : public DefaultProviderInterface,
+ public ProviderInterface {
public:
// Create a content settings provider that provides a given setting for a
// given type.
@@ -21,7 +22,7 @@ class MockContentSettingsProvider : public DefaultProviderInterface {
bool can_override);
virtual ~MockContentSettingsProvider();
- // ContentSettingsProviderInterface implementation.
+ // DefaultProviderInterface implementation.
virtual bool CanProvideDefaultSetting(ContentSettingsType content_type) const;
virtual ContentSetting ProvideDefaultSetting(
ContentSettingsType content_type) const;
@@ -30,6 +31,29 @@ class MockContentSettingsProvider : public DefaultProviderInterface {
virtual void ResetToDefaults();
virtual bool DefaultSettingIsManaged(ContentSettingsType content_type) const;
+ // ProviderInterface implementation
+ virtual ContentSetting GetContentSetting(
+ const GURL& requesting_url,
+ const GURL& embedding_url,
+ const ContentSettingsType& content_type,
jochen (gone - plz use gerrit) 2011/02/01 11:38:39 also remove the const ref here
markusheintz_ 2011/02/01 12:17:12 Done.
+ const ResourceIdentifier& resource_identifier) const {
+ return CONTENT_SETTING_DEFAULT;
+ }
+
+ virtual void SetContentSetting(
+ const ContentSettingsPattern& requesting_pattern,
+ const ContentSettingsPattern& embedding_pattern,
+ const ContentSettingsType& content_type,
jochen (gone - plz use gerrit) 2011/02/01 11:38:39 and here
markusheintz_ 2011/02/01 12:17:12 Done.
+ const ResourceIdentifier& resource_identifier,
+ ContentSetting content_setting) {}
+
+ virtual void GetAllContentSettingsRules(
+ const ContentSettingsType& content_type,
jochen (gone - plz use gerrit) 2011/02/01 11:38:39 and here
markusheintz_ 2011/02/01 12:17:12 Done.
+ const ResourceIdentifier& resource_identifier,
+ Rules* content_setting_rules) const {}
+
+ virtual void ClearAllContentSettingsRules() {}
+
private:
ContentSettingsType content_type_;
ContentSetting setting_;

Powered by Google App Engine
This is Rietveld 408576698