| Index: chrome/browser/content_settings/content_settings_default_provider.h
|
| diff --git a/chrome/browser/content_settings/content_settings_default_provider.h b/chrome/browser/content_settings/content_settings_default_provider.h
|
| index f9ddaffd135305d8cb0578de04b18f9d8e66b3e9..94d92525d80dbd3eeae0c8c7938eb59c48085375 100644
|
| --- a/chrome/browser/content_settings/content_settings_default_provider.h
|
| +++ b/chrome/browser/content_settings/content_settings_default_provider.h
|
| @@ -5,10 +5,12 @@
|
| #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_DEFAULT_PROVIDER_H_
|
| #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_DEFAULT_PROVIDER_H_
|
|
|
| +#include <map>
|
| #include <string>
|
| #include <vector>
|
|
|
| #include "base/basictypes.h"
|
| +#include "base/memory/linked_ptr.h"
|
| #include "base/synchronization/lock.h"
|
| #include "chrome/browser/content_settings/content_settings_observable_provider.h"
|
| #include "chrome/browser/prefs/pref_change_registrar.h"
|
| @@ -37,12 +39,12 @@ class DefaultProvider : public ObservableProvider,
|
| const ResourceIdentifier& resource_identifier,
|
| bool incognito) const OVERRIDE;
|
|
|
| - virtual void SetContentSetting(
|
| + virtual bool SetWebsiteSetting(
|
| const ContentSettingsPattern& primary_pattern,
|
| const ContentSettingsPattern& secondary_pattern,
|
| ContentSettingsType content_type,
|
| const ResourceIdentifier& resource_identifier,
|
| - ContentSetting content_setting) OVERRIDE;
|
| + Value* value) OVERRIDE;
|
|
|
| virtual void ClearAllContentSettingsRules(
|
| ContentSettingsType content_type) OVERRIDE;
|
| @@ -56,8 +58,7 @@ class DefaultProvider : public ObservableProvider,
|
|
|
| private:
|
| // Sets the fields of |settings| based on the values in |dictionary|.
|
| - void GetSettingsFromDictionary(const base::DictionaryValue* dictionary,
|
| - ContentSetting* settings);
|
| + void GetSettingsFromDictionary(const base::DictionaryValue* dictionary);
|
|
|
| // Forces the default settings to be explicitly set instead of themselves
|
| // being CONTENT_SETTING_DEFAULT.
|
| @@ -70,8 +71,10 @@ class DefaultProvider : public ObservableProvider,
|
| void MigrateObsoleteNotificationPref();
|
| void MigrateObsoleteGeolocationPref();
|
|
|
| + typedef linked_ptr<base::Value> ValuePtr;
|
| + typedef std::map<ContentSettingsType, ValuePtr> ValueMap;
|
| // Copies of the pref data, so that we can read it on the IO thread.
|
| - ContentSetting default_content_settings_[CONTENT_SETTINGS_NUM_TYPES];
|
| + ValueMap default_settings_;
|
|
|
| PrefService* prefs_;
|
|
|
|
|