Index: components/content_settings/core/browser/host_content_settings_map.h |
diff --git a/components/content_settings/core/browser/host_content_settings_map.h b/components/content_settings/core/browser/host_content_settings_map.h |
index 2308855ba577df3201d2054365ee6bec9394aec2..947e075b358dfbfd4718d04ae1e630aa9568fdcd 100644 |
--- a/components/content_settings/core/browser/host_content_settings_map.h |
+++ b/components/content_settings/core/browser/host_content_settings_map.h |
@@ -279,7 +279,8 @@ class HostContentSettingsMap : public content_settings::Observer, |
private: |
friend class base::RefCountedThreadSafe<HostContentSettingsMap>; |
- friend class HostContentSettingsMapTest_NonDefaultSettings_Test; |
+ friend class HostContentSettingsMapTest_MigrateOldSettings_Test; |
+ |
friend class content_settings::TestUtils; |
typedef std::map<ProviderType, content_settings::ProviderInterface*> |
@@ -293,6 +294,16 @@ class HostContentSettingsMap : public content_settings::Observer, |
ContentSettingsType content_type, |
content_settings::ProviderInterface* provider) const; |
+ // Migrate old settings for those ContentSettingsType which previously |
+ // would use the same pattern twice instead of using |
+ // ContentSettingsPattern::Wildcard(). This has no impact on lookups using |
+ // GetContentSetting (because Wildcard matches everything) but it has an |
+ // impact when trying to change the existing content setting. We need to |
+ // migrate the old-format keys. |
raymes
2016/03/07 01:47:55
I think we can rephrase this a bit because my expl
lshang
2016/03/23 13:58:36
Done.
|
+ // TODO(lshang): Remove this when clients have migrated. We should leave in |
+ // some code to remove old-format settings for a long time. |
+ void MigrateOldSettings(); |
+ |
// Adds content settings for |content_type| and |resource_identifier|, |
// provided by |provider|, into |settings|. If |incognito| is true, adds only |
// the content settings which are applicable to the incognito mode and differ |