Index: components/content_settings/core/browser/content_settings_default_provider.h |
diff --git a/components/content_settings/core/browser/content_settings_default_provider.h b/components/content_settings/core/browser/content_settings_default_provider.h |
index 86ec1c847d217ddc96bcea5cb7aeee003b7bf79b..52b668c179149a22bb4565a2d79ca52ec12f5893 100644 |
--- a/components/content_settings/core/browser/content_settings_default_provider.h |
+++ b/components/content_settings/core/browser/content_settings_default_provider.h |
@@ -53,7 +53,7 @@ class DefaultProvider : public ObservableProvider { |
typedef linked_ptr<base::Value> ValuePtr; |
typedef std::map<ContentSettingsType, ValuePtr> ValueMap; |
- // Reads all individual settings from the pref service. |
+ // Reads all settings from the pref service. |
void ReadDefaultSettings(); |
// Change the remembered setting in the memory. |
@@ -63,43 +63,23 @@ class DefaultProvider : public ObservableProvider { |
bool IsValueEmptyOrDefault(ContentSettingsType content_type, |
base::Value* value); |
- // Parses a |DictionaryValue| into a |ValueMap|. |
- scoped_ptr<ValueMap> GetSettingsFromDictionary( |
- const base::DictionaryValue* dictionary); |
- |
// Forces the default settings in |value_map| to be explicitly set instead |
// of themselves being CONTENT_SETTING_DEFAULT. |
void ForceDefaultsToBeExplicit(ValueMap* value_map); |
- // Reads the dictionary prefrence and returns the dictionary parsed as |
- // a |ValueMap|. |
- scoped_ptr<ValueMap> ReadDictionaryPref(); |
- |
- // Reads an individual preference. |
- scoped_ptr<base::Value> ReadIndividualPref(ContentSettingsType content_type); |
+ // Reads the preference corresponding to |content_type|. |
+ scoped_ptr<base::Value> ReadFromPref(ContentSettingsType content_type); |
- // Writes the value |value| to the individual preference corresponding |
- // to |content_type|. It's the responsibility of caller to obtain a lock |
- // and notify observers. |
- void WriteIndividualPref(ContentSettingsType content_type, |
- base::Value* value); |
- |
- // Writes the value |value| to the dictionary preference entry corresponding |
- // to |content_type|. It's the responsibility of caller to obtain a lock |
- // and notify observers. |
- void WriteDictionaryPref(ContentSettingsType content_type, |
- base::Value* value); |
+ // Writes the value |value| to the preference corresponding to |content_type|. |
+ // It's the responsibility of caller to obtain a lock and notify observers. |
+ void WriteToPref(ContentSettingsType content_type, |
+ base::Value* value); |
// Called on prefs change. |
void OnPreferenceChanged(const std::string& pref_name); |
- // Migrates the dictionary settings to the individual settings. Only called |
- // once during the first run. |
- void MigrateDefaultSettings(); |
- |
- // Migrates the obsolete media stream default setting to the new microphone |
- // and camera settings. |
- void MigrateObsoleteMediaContentSetting(); |
+ // Clean up the obsolete preferences from the user's profile. |
+ void DiscardObsoletePreferences(); |
// Copies of the pref data, so that we can read it on the IO thread. |
ValueMap default_settings_; |