Chromium Code Reviews| Index: chrome/browser/content_settings/host_content_settings_map.h |
| diff --git a/chrome/browser/content_settings/host_content_settings_map.h b/chrome/browser/content_settings/host_content_settings_map.h |
| index e19c125992fb4f0dceb438a1ea7037a8ed01e63a..a58fba2ba6af88fc9e02d299e83af394588d7b63 100644 |
| --- a/chrome/browser/content_settings/host_content_settings_map.h |
| +++ b/chrome/browser/content_settings/host_content_settings_map.h |
| @@ -17,6 +17,7 @@ |
| #include "base/basictypes.h" |
| #include "base/lock.h" |
| #include "base/ref_counted.h" |
| +#include "base/stl_util-inl.h" |
| #include "chrome/browser/browser_thread.h" |
| #include "chrome/browser/content_settings/content_settings_pattern.h" |
| #include "chrome/browser/prefs/pref_change_registrar.h" |
| @@ -25,6 +26,7 @@ |
| #include "chrome/common/notification_registrar.h" |
| class ContentSettingsDetails; |
| +class ContentSettingsProviderInterface; |
| class DictionaryValue; |
| class GURL; |
| class PrefService; |
| @@ -163,11 +165,6 @@ class HostContentSettingsMap |
| // Returns true if the default setting for the |content_type| is managed. |
| bool IsDefaultContentSettingManaged(ContentSettingsType content_type) const; |
| - // NotificationObserver implementation. |
| - virtual void Observe(NotificationType type, |
| - const NotificationSource& source, |
| - const NotificationDetails& details); |
| - |
| private: |
| friend class base::RefCountedThreadSafe<HostContentSettingsMap>; |
| @@ -187,34 +184,18 @@ class HostContentSettingsMap |
| void GetResourceSettingsFromDictionary(const DictionaryValue* dictionary, |
| ResourceContentSettings* settings); |
| - // Forces the default settings to be explicitly set instead of themselves |
| - // being CONTENT_SETTING_DEFAULT. |
| - void ForceDefaultsToBeExplicit(); |
| - |
| // Returns true if |settings| consists entirely of CONTENT_SETTING_DEFAULT. |
| bool AllDefault(const ExtendedContentSettings& settings) const; |
| - // Reads the default settings from the prefereces service. If |overwrite| is |
| - // true and the preference is missing, the local copy will be cleared as well. |
| - void ReadDefaultSettings(bool overwrite); |
| - |
| - // Reads managed default content settings from the preference service |prefs|. |
| - // |settings| is set to the respective content setting for managed settings, |
| - // and to CONTENT_SETTING_DEFAULT for other settings. |
| - void ReadManagedDefaultSettings(const PrefService* prefs, |
| - ContentSettings* settings); |
| - |
| - // Updates the managed setting of the default-content-settings-type |type|. |
| - // The updated setting is read from the preference service |prefs| and written |
| - // to |settings|. |
| - void UpdateManagedDefaultSetting(ContentSettingsType type, |
| - const PrefService* prefs, |
| - ContentSettings* settings); |
| - |
| // Reads the host exceptions from the prefereces service. If |overwrite| is |
| // true and the preference is missing, the local copy will be cleared as well. |
| void ReadExceptions(bool overwrite); |
| + // NotificationObserver implementation. |
| + virtual void Observe(NotificationType type, |
| + const NotificationSource& source, |
| + const NotificationDetails& details); |
| + |
| // Informs observers that content settings have changed. Make sure that |
| // |lock_| is not held when calling this, as listeners will usually call one |
| // of the GetSettings functions in response, which would then lead to a |
| @@ -240,8 +221,12 @@ class HostContentSettingsMap |
| NotificationRegistrar notification_registrar_; |
| PrefChangeRegistrar pref_change_registrar_; |
| + // Content setting providers. |
| + std::vector<ContentSettingsProviderInterface*> content_settings_providers_; |
| + STLElementDeleter<std::vector<ContentSettingsProviderInterface*> > |
| + content_settings_providers_deleter_; |
|
gfeher
2010/12/08 13:59:17
What was the reason for not using linked_ptr or so
jochen (gone - plz use gerrit)
2010/12/08 14:54:01
Done.
|
| + |
| // Copies of the pref data, so that we can read it on the IO thread. |
| - ContentSettings default_content_settings_; |
| ContentSettings managed_default_content_settings_; |
| HostContentSettings host_content_settings_; |