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

Unified Diff: Source/platform/weborigin/OriginAccessEntry.h

Issue 1163583005: Add "registerable domain" support to OriginAccessEntry. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Test. Created 5 years, 7 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
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/platform/weborigin/OriginAccessEntry.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/weborigin/OriginAccessEntry.h
diff --git a/Source/platform/weborigin/OriginAccessEntry.h b/Source/platform/weborigin/OriginAccessEntry.h
index 0147a1a2bb9614a4bafef2f129fcc485e49d3785..42a7827d737c4fbf4fac2b31a39fd857e0e5adc7 100644
--- a/Source/platform/weborigin/OriginAccessEntry.h
+++ b/Source/platform/weborigin/OriginAccessEntry.h
@@ -41,7 +41,13 @@ class SecurityOrigin;
class PLATFORM_EXPORT OriginAccessEntry {
public:
enum SubdomainSetting {
+ // 'www.example.com' matches an OriginAccessEntry for 'example.com'
AllowSubdomains,
+
+ // 'www.example.com' matches an OriginAccessEntry for 'not-www.example.com'
+ AllowRegisterableDomains,
+
+ // 'www.example.com' does not match an OriginAccessEntry for 'example.com'
DisallowSubdomains
};
@@ -51,7 +57,7 @@ public:
DoesNotMatchOrigin
};
- // If host is empty string and SubdomainSetting is AllowSubdomains, the entry will match all domains in the specified protocol.
+ // If host is empty string and SubdomainSetting is not DisallowSubdomains, the entry will match all domains in the specified protocol.
// IPv6 addresses must include brackets (e.g. '[2001:db8:85a3::8a2e:370:7334]', not '2001:db8:85a3::8a2e:370:7334').
OriginAccessEntry(const String& protocol, const String& host, SubdomainSetting);
MatchResult matchesOrigin(const SecurityOrigin&) const;
@@ -60,10 +66,12 @@ public:
const String& host() const { return m_host; }
SubdomainSetting subdomainSettings() const { return m_subdomainSettings; }
bool hostIsIPAddress() const { return m_hostIsIPAddress; }
+ const String& registerable() const { return m_registerableDomain; }
private:
String m_protocol;
String m_host;
+ String m_registerableDomain;
SubdomainSetting m_subdomainSettings;
bool m_hostIsIPAddress;
bool m_hostIsPublicSuffix;
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/platform/weborigin/OriginAccessEntry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698