Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Unified Diff: components/content_settings/core/browser/host_content_settings_map.h

Issue 1754073002: Migrate old settings for ContentSettingTypes with wildcard as secondary_pattern (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scoping_set_content_setting
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 b551d462dbb77c87a4ebbfadc53591985e59abe2..bd4240c0e9577b926f34f75a68e69c9cfae598b4 100644
--- a/components/content_settings/core/browser/host_content_settings_map.h
+++ b/components/content_settings/core/browser/host_content_settings_map.h
@@ -169,6 +169,16 @@ class HostContentSettingsMap : public content_settings::Observer,
const std::string& resource_identifier,
ContentSetting setting);
+ // 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.
+ // 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();
+
// Sets the |value| for the default scope of the url that is appropriate for
// the given |content_type| and |resource_identifier|. Setting the value to
// null removes the default pattern pair for this content type.

Powered by Google App Engine
This is Rietveld 408576698