Index: components/content_settings/core/common/content_settings_pattern.h |
diff --git a/components/content_settings/core/common/content_settings_pattern.h b/components/content_settings/core/common/content_settings_pattern.h |
index f85c648bfc036aa9ac0261d0aa3cb62ed0d5318f..b5b83529b00f92b431157744a22fa4e9abebb3bb 100644 |
--- a/components/content_settings/core/common/content_settings_pattern.h |
+++ b/components/content_settings/core/common/content_settings_pattern.h |
@@ -129,6 +129,7 @@ class ContentSettingsPattern { |
// Returns a pattern that matches the scheme and host of this URL, as well as |
// all subdomains and ports. |
+ // TODO(lshang): Remove this when crbug.com/604612 is done. |
static ContentSettingsPattern FromURL(const GURL& url); |
// Returns a pattern that matches exactly this URL. |
@@ -145,6 +146,13 @@ class ContentSettingsPattern { |
// - [a:b:c:d:e:f:g:h] (matches an exact IPv6 ip) |
static ContentSettingsPattern FromString(const std::string& pattern_spec); |
+ // Migrate domain scoped settings generated using FromURL() to be origin |
+ // scoped. Return false if domain_pattern is not generated using FromURL(). |
+ // TODO(lshang): Remove this when migration is done. https://crbug.com/604612 |
+ static bool MigrateFromDomainToOrigin( |
+ const ContentSettingsPattern& domain_pattern, |
+ ContentSettingsPattern* origin_pattern); |
+ |
// Sets the scheme that doesn't support domain wildcard and port. |
// Needs to be called by the embedder before using ContentSettingsPattern. |
// |scheme| can't be NULL, and the pointed string must remain alive until the |