Chromium Code Reviews (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out

Unified Diff: components/content_settings/core/common/content_settings_pattern.h

Issue 1895993003: Add migration code to change existing domain scoped content settings to be origin scoped (Closed) Base URL:
Patch Set: remove logs and format Created 4 years, 6 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/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..13468ce483b89dfd5c0601fdac476f6fbe1be5ad 100644
--- a/components/content_settings/core/common/content_settings_pattern.h
+++ b/components/content_settings/core/common/content_settings_pattern.h
@@ -145,6 +145,9 @@ class ContentSettingsPattern {
// - [a:b:c:d:e:f:g:h] (matches an exact IPv6 ip)
static ContentSettingsPattern FromString(const std::string& pattern_spec);
+ static ContentSettingsPattern FromDomainToOrigin(
+ const ContentSettingsPattern domain_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
@@ -167,6 +170,9 @@ class ContentSettingsPattern {
// True if this pattern matches all hosts (i.e. it has a host wildcard).
bool MatchesAllHosts() const;
+ // True if this pattern is generated from FromURL().
+ bool IsGeneratedFromURLDomainScoped() const;
// Returns a std::string representation of this pattern.
std::string ToString() const;

Powered by Google App Engine
This is Rietveld 408576698