Chromium Code Reviews| Index: chrome/browser/content_settings/pref_content_settings_provider.h |
| diff --git a/chrome/browser/content_settings/pref_content_settings_provider.h b/chrome/browser/content_settings/pref_content_settings_provider.h |
| index b4631b8d9e79017beb2d5f79e2a8a5370068ab6e..51381b078d407914cbf43d80b7cdc122a174deba 100644 |
| --- a/chrome/browser/content_settings/pref_content_settings_provider.h |
| +++ b/chrome/browser/content_settings/pref_content_settings_provider.h |
| @@ -90,7 +90,9 @@ class PrefDefaultProvider : public DefaultProviderInterface, |
| DISALLOW_COPY_AND_ASSIGN(PrefDefaultProvider); |
| }; |
| -class PrefProvider : public ProviderInterface, |
| +// Content-settings-provider that provides content-settings from the user |
|
Bernhard Bauer
2011/02/15 09:55:25
Nit: Why the dashes?
markusheintz_
2011/02/15 11:00:16
For consistence.
e.g. host-content-settings-maps
|
| +// preference. |
| +class PrefProvider : public BaseProvider, |
| public NotificationObserver { |
| public: |
| static void RegisterUserPrefs(PrefService* prefs); |
| @@ -102,12 +104,6 @@ class PrefProvider : public ProviderInterface, |
| virtual bool ContentSettingsTypeIsManaged( |
| ContentSettingsType content_type); |
| - virtual ContentSetting GetContentSetting( |
| - const GURL& requesting_url, |
| - const GURL& embedding_url, |
| - ContentSettingsType content_type, |
| - const ResourceIdentifier& resource_identifier) const; |
| - |
| virtual void SetContentSetting( |
| const ContentSettingsPattern& requesting_pattern, |
| const ContentSettingsPattern& embedding_pattern, |
| @@ -115,43 +111,27 @@ class PrefProvider : public ProviderInterface, |
| const ResourceIdentifier& resource_identifier, |
| ContentSetting content_setting); |
| - virtual void GetAllContentSettingsRules( |
| - ContentSettingsType content_type, |
| - const ResourceIdentifier& resource_identifier, |
| - Rules* content_setting_rules) const; |
| - |
| virtual void ClearAllContentSettingsRules( |
| ContentSettingsType content_type); |
| virtual void ResetToDefaults(); |
| + // BaseProvider implementations. |
| + virtual void Init(); |
| + |
| // NotificationObserver implementation. |
| virtual void Observe(NotificationType type, |
| const NotificationSource& source, |
| const NotificationDetails& details); |
| private: |
| - typedef std::pair<ContentSettingsType, std::string> |
| - ContentSettingsTypeResourceIdentifierPair; |
| - typedef std::map<ContentSettingsTypeResourceIdentifierPair, ContentSetting> |
| - ResourceContentSettings; |
| - |
| - struct ExtendedContentSettings; |
| - |
| - typedef std::map<std::string, ExtendedContentSettings> HostContentSettings; |
| + void ReadExceptions(bool overwrite); |
| // Various migration methods (old cookie, popup and per-host data gets |
| // migrated to the new format). |
| void MigrateObsoletePerhostPref(PrefService* prefs); |
| void MigrateObsoletePopupsPref(PrefService* prefs); |
| - bool AllDefault(const ExtendedContentSettings& settings) const; |
| - |
| - void ReadExceptions(bool overwrite); |
| - |
| - bool RequiresResourceIdentifier( |
| - ContentSettingsType content_type) const; |
| - |
| void CanonicalizeContentSettingsExceptions( |
| DictionaryValue* all_settings_dictionary); |
| @@ -169,24 +149,9 @@ class PrefProvider : public ProviderInterface, |
| Profile* profile_; |
| - // Whether this settings map is for an OTR session. |
| - bool is_off_the_record_; |
| - |
| - // Used around accesses to the content_settings_ object to guarantee |
| - // thread safety. |
| - mutable base::Lock lock_; |
| - |
| PrefChangeRegistrar pref_change_registrar_; |
| NotificationRegistrar notification_registrar_; |
| - // Copies of the pref data, so that we can read it on threads other than the |
| - // UI thread. |
| - HostContentSettings host_content_settings_; |
| - |
| - // Differences to the preference-stored host content settings for |
| - // off-the-record settings. |
| - HostContentSettings off_the_record_settings_; |
| - |
| // Whether we are currently updating preferences, this is used to ignore |
| // notifications from the preferences service that we triggered ourself. |
| bool updating_preferences_; |
| @@ -194,9 +159,6 @@ class PrefProvider : public ProviderInterface, |
| // Do not fire any Notifications as long as we are in the constructor. |
| bool initializing_; |
| - // LEGACY: TBR |
| - ContentSettings GetNonDefaultContentSettings(const GURL& url) const; |
| - |
| DISALLOW_COPY_AND_ASSIGN(PrefProvider); |
| }; |