Chromium Code Reviews| Index: chrome/browser/content_settings/content_settings_pref_provider.h |
| diff --git a/chrome/browser/content_settings/content_settings_pref_provider.h b/chrome/browser/content_settings/content_settings_pref_provider.h |
| index 479ddd14bb54d6b09e0bb2c12984c73516c2a2b7..c3bc788a872d39df8a6e150f99eb6d3be2a77e9a 100644 |
| --- a/chrome/browser/content_settings/content_settings_pref_provider.h |
| +++ b/chrome/browser/content_settings/content_settings_pref_provider.h |
| @@ -14,12 +14,15 @@ |
| #include "base/basictypes.h" |
| #include "base/synchronization/lock.h" |
| -#include "chrome/browser/content_settings/content_settings_base_provider.h" |
| #include "chrome/browser/content_settings/content_settings_provider.h" |
| +#include "chrome/browser/content_settings/content_settings_origin_identifier_value_map.h" |
| #include "chrome/browser/prefs/pref_change_registrar.h" |
| #include "content/common/notification_observer.h" |
| #include "content/common/notification_registrar.h" |
| +// TODO |
| +#include "chrome/browser/content_settings/content_settings_base_provider.h" |
| + |
| class ContentSettingsDetails; |
| class DictionaryValue; |
| class PrefService; |
| @@ -99,7 +102,7 @@ class PrefDefaultProvider : public DefaultProviderInterface, |
| // Content settings provider that provides content settings from the user |
| // preference. |
| -class PrefProvider : public BaseProvider, |
| +class PrefProvider : public ProviderInterface, |
| public NotificationObserver { |
| public: |
| static void RegisterUserPrefs(PrefService* prefs); |
| @@ -107,6 +110,9 @@ class PrefProvider : public BaseProvider, |
| explicit PrefProvider(Profile* profile); |
| virtual ~PrefProvider(); |
| + // ProviderInterface implementations. |
| + virtual void Init(); |
| + |
| virtual void SetContentSetting( |
| const ContentSettingsPattern& requesting_pattern, |
| const ContentSettingsPattern& embedding_pattern, |
| @@ -114,14 +120,22 @@ class PrefProvider : public BaseProvider, |
| const ResourceIdentifier& resource_identifier, |
| ContentSetting content_setting); |
| + virtual ContentSetting GetContentSetting( |
| + const GURL& requesting_url, |
| + const GURL& embedding_url, |
| + ContentSettingsType content_type, |
| + const ResourceIdentifier& resource_identifier) const; |
| + |
| + 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, |
| @@ -152,6 +166,8 @@ class PrefProvider : public BaseProvider, |
| Profile* profile_; |
| + bool is_incognito_; |
| + |
| PrefChangeRegistrar pref_change_registrar_; |
| NotificationRegistrar notification_registrar_; |
| @@ -162,6 +178,14 @@ class PrefProvider : public BaseProvider, |
| // Do not fire any Notifications as long as we are in the constructor. |
| bool initializing_; |
| + OriginIdentifierValueMap value_map_; |
| + |
| + OriginIdentifierValueMap incognito_value_map_; |
| + |
| + // Used around accesses to the content_settings_ object to guarantee |
|
Bernhard Bauer
2011/05/24 14:21:29
Nit: "around accesses to the value maps" or someth
markusheintz_
2011/05/26 13:22:13
Done.
|
| + // thread safety. |
| + mutable base::Lock lock_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(PrefProvider); |
| }; |