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

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

Issue 5528010: Implement preference and policy based content settings providers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser/content_settings
Patch Set: updates Created 10 years 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
« no previous file with comments | « no previous file | chrome/browser/content_settings/host_content_settings_map.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3229779a2e442fa023f1f354f2baa7f884119957..2754bfc4c340402e8a1d64cdea5c2f57ffd93c9a 100644
--- a/chrome/browser/content_settings/content_settings_provider.h
+++ b/chrome/browser/content_settings/content_settings_provider.h
@@ -12,14 +12,17 @@
class ContentSettingsProviderInterface {
public:
+ virtual ~ContentSettingsProviderInterface() {}
+
// True if this provider can provide a default setting for the |content_type|.
- virtual bool CanProvideDefaultSetting(ContentSettingsType content_type) = 0;
+ virtual bool CanProvideDefaultSetting(
+ ContentSettingsType content_type) const = 0;
// Returns the default content setting this provider has for the given
// |content_type|, or CONTENT_SETTING_DEFAULT if nothing be provided for this
// type.
virtual ContentSetting ProvideDefaultSetting(
- ContentSettingsType content_type) = 0;
+ ContentSettingsType content_type) const = 0;
// Notifies the provider that the host content settings map would like to
// update the default setting for the given |content_type|. The provider may
@@ -27,12 +30,13 @@ class ContentSettingsProviderInterface {
virtual void UpdateDefaultSetting(ContentSettingsType content_type,
ContentSetting setting) = 0;
+ // Resets the state of the provider to the default.
+ virtual void ResetToDefaults() = 0;
+
// True if the default setting for the |content_type| is policy managed, i.e.,
// there shouldn't be any UI shown to modify this setting.
- virtual bool DefaultSettingIsManaged(ContentSettingsType content_type) = 0;
-
- protected:
- virtual ~ContentSettingsProviderInterface() {};
+ virtual bool DefaultSettingIsManaged(
+ ContentSettingsType content_type) const = 0;
};
#endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_
« no previous file with comments | « no previous file | chrome/browser/content_settings/host_content_settings_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698