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

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

Issue 1607243002: Add 'OriginAccessEntry::matchDomain'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2623
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 820402d99494219062350b0be3edc16e1b8cfb84..a97e957ef996901c3cb10059bd77f6e173172d13 100644
--- a/third_party/WebKit/Source/platform/weborigin/OriginAccessEntry.cpp
+++ b/third_party/WebKit/Source/platform/weborigin/OriginAccessEntry.cpp
@@ -108,12 +108,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