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

Unified Diff: url/origin.cc

Issue 2287483002: Provide the equivalent of GURL::DomainIs for url::Origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor changes. Created 4 years, 4 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 | « url/origin.h ('k') | url/origin_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: url/origin.cc
diff --git a/url/origin.cc b/url/origin.cc
index 97e24f208d5b2098df01078615a7791503d30fbf..a14c8918d35bfbf4430d0d5c5d7ebee577639f95 100644
--- a/url/origin.cc
+++ b/url/origin.cc
@@ -72,6 +72,10 @@ bool Origin::IsSameOriginWith(const Origin& other) const {
return tuple_.Equals(other.tuple_);
}
+bool Origin::DomainIs(base::StringPiece lower_ascii_domain) const {
+ return !unique_ && url::DomainIs(tuple_.host(), lower_ascii_domain);
+}
+
bool Origin::operator<(const Origin& other) const {
return tuple_ < other.tuple_;
}
« no previous file with comments | « url/origin.h ('k') | url/origin_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698