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

Unified Diff: components/subresource_filter/core/common/indexed_ruleset.cc

Issue 2282773002: Use Origin::DomainIs without converting to GURL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@origin_domain_is
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/subresource_filter/core/common/indexed_ruleset.cc
diff --git a/components/subresource_filter/core/common/indexed_ruleset.cc b/components/subresource_filter/core/common/indexed_ruleset.cc
index 424f4f353c48aaf639dd92162fd26d8f8deae15a..58985d85616aa14680a2680ef7cbd2c5324acdb2 100644
--- a/components/subresource_filter/core/common/indexed_ruleset.cc
+++ b/components/subresource_filter/core/common/indexed_ruleset.cc
@@ -328,10 +328,6 @@ bool DoesInitiatorMatchDomainList(
return true;
}
- // TODO(pkalinnikov): Switch back to const url::Origin& once |DomainIs|
- // becomes implemented for url::Origin.
- GURL initiator_as_url(initiator.Serialize());
-
size_t max_domain_length = 0;
bool is_positive = true;
bool negatives_only = true;
@@ -352,7 +348,7 @@ bool DoesInitiatorMatchDomainList(
negatives_only = false;
}
- if (!initiator_as_url.DomainIs(filter_piece))
+ if (!initiator.DomainIs(filter_piece))
continue;
max_domain_length = filter_piece.length();
is_positive = !is_negative;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698