Chromium Code Reviews| 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..37f4b85d97f11cfee3b2c2393c8386e14d4e7464 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); |
|
raymes
2016/06/20 04:03:26
Could we get away with just having one new functio
lshang
2016/06/23 01:32:31
Done.
|
| + |
| // 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 using FromURL(). |
| + bool IsGeneratedUsingFromURL() const; |
| + |
| // Returns a std::string representation of this pattern. |
| std::string ToString() const; |