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

Unified Diff: third_party/WebKit/Source/platform/weborigin/OriginAccessEntry.cpp

Issue 1661573002: Add 'OriginAccessEntry::matchDomain'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: Created 4 years, 11 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: third_party/WebKit/Source/platform/weborigin/OriginAccessEntry.cpp
diff --git a/third_party/WebKit/Source/platform/weborigin/OriginAccessEntry.cpp b/third_party/WebKit/Source/platform/weborigin/OriginAccessEntry.cpp
index 23dfb75ef0a40b584000c8122cd8199e8b24da3d..303719960a48e75b77e28ee5de3af33e1f48f1be 100644
--- a/third_party/WebKit/Source/platform/weborigin/OriginAccessEntry.cpp
+++ b/third_party/WebKit/Source/platform/weborigin/OriginAccessEntry.cpp
@@ -109,12 +109,17 @@ OriginAccessEntry::OriginAccessEntry(const String& protocol, const String& host,
OriginAccessEntry::MatchResult OriginAccessEntry::matchesOrigin(const SecurityOrigin& origin) const
{
- ASSERT(origin.host() == origin.host().lower());
ASSERT(origin.protocol() == origin.protocol().lower());
if (m_protocol != origin.protocol())
return DoesNotMatchOrigin;
+ return matchesDomain(origin);
+}
+
+OriginAccessEntry::MatchResult OriginAccessEntry::matchesDomain(const SecurityOrigin& origin) const
+{
+ ASSERT(origin.host() == origin.host().lower());
// Special case: Include subdomains and empty host means "all hosts, including ip addresses".
if (m_subdomainSettings != DisallowSubdomains && m_host.isEmpty())
return MatchesOrigin;

Powered by Google App Engine
This is Rietveld 408576698