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

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

Issue 6542048: Add content_settings::PolicyProvider and a set of new policies to managed content settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 10 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/content_settings_mock_provider.h
diff --git a/chrome/browser/content_settings/content_settings_mock_provider.h b/chrome/browser/content_settings/content_settings_mock_provider.h
index a71a574988f367b72141b61ec48a400538448da4..17ced258b9eb90b7c6f816a9a18ab36a7d5d2448 100644
--- a/chrome/browser/content_settings/content_settings_mock_provider.h
+++ b/chrome/browser/content_settings/content_settings_mock_provider.h
@@ -49,9 +49,12 @@ class MockProvider : public ProviderInterface {
ContentSettingsType content_type,
ResourceIdentifier resource_identifier,
ContentSetting setting,
- bool read_only);
+ bool read_only,
+ bool is_managed);
virtual ~MockProvider();
+ virtual bool ContentSettingsTypeIsManaged(ContentSettingsType type);
+
// ProviderInterface implementation
virtual ContentSetting GetContentSetting(
const GURL& requesting_url,
@@ -83,7 +86,7 @@ class MockProvider : public ProviderInterface {
requesting_url_pattern_ = pattern;
}
- ContentSettingsPattern requesting_url_pattern() {
+ ContentSettingsPattern requesting_url_pattern() const {
return requesting_url_pattern_;
}
@@ -91,7 +94,7 @@ class MockProvider : public ProviderInterface {
embedding_url_pattern_ = pattern;
}
- ContentSettingsPattern embedding_url_pattern() {
+ ContentSettingsPattern embedding_url_pattern() const {
return embedding_url_pattern_;
}
@@ -99,7 +102,7 @@ class MockProvider : public ProviderInterface {
content_type_ = content_type;
}
- ContentSettingsType content_type() {
+ ContentSettingsType content_type() const {
return content_type_;
}
@@ -107,7 +110,7 @@ class MockProvider : public ProviderInterface {
resource_identifier_ = resource_identifier;
}
- ResourceIdentifier resource_identifier() {
+ ResourceIdentifier resource_identifier() const {
return resource_identifier_;
}
@@ -115,7 +118,7 @@ class MockProvider : public ProviderInterface {
setting_ = setting;
}
- ContentSetting setting() {
+ ContentSetting setting() const {
return setting_;
}
@@ -123,10 +126,18 @@ class MockProvider : public ProviderInterface {
read_only_ = read_only;
}
- bool read_only() {
+ bool read_only() const {
return read_only_;
}
+ void set_is_managed(bool is_managed) {
+ is_managed_ = is_managed;
+ }
+
+ bool is_managed() const {
+ return is_managed_;
+ }
+
private:
ContentSettingsPattern requesting_url_pattern_;
ContentSettingsPattern embedding_url_pattern_;
@@ -134,6 +145,7 @@ class MockProvider : public ProviderInterface {
ResourceIdentifier resource_identifier_;
ContentSetting setting_;
bool read_only_;
+ bool is_managed_;
DISALLOW_COPY_AND_ASSIGN(MockProvider);
};

Powered by Google App Engine
This is Rietveld 408576698