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

Unified Diff: components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc

Issue 2481923002: [WIP] make GURL::path() return a StringPiece (Closed)
Patch Set: thanks asan Created 4 years, 1 month 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 | « components/search_engines/template_url.cc ('k') | components/sync/driver/sync_stopped_reporter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc
diff --git a/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc b/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc
index 57bd1de7c13068b7955ce5f5b43c4f3dc3801fe5..df14c1c7ff19d87e25cf5a95e21279da293db648 100644
--- a/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc
+++ b/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc
@@ -76,7 +76,8 @@ bool ContentSubresourceFilterDriverFactory::IsWhitelisted(
}
bool ContentSubresourceFilterDriverFactory::IsHit(const GURL& url) const {
- return safe_browsing_blacklisted_patterns_.find(url.host() + url.path()) !=
+ return safe_browsing_blacklisted_patterns_.find(url.host() +
+ url.path().as_string()) !=
safe_browsing_blacklisted_patterns_.end();
}
@@ -109,8 +110,10 @@ void ContentSubresourceFilterDriverFactory::AddHostOfURLToWhitelistSet(
void ContentSubresourceFilterDriverFactory::AddToActivationHitsSet(
const GURL& url) {
- if (!url.host().empty() && url.SchemeIsHTTPOrHTTPS())
- safe_browsing_blacklisted_patterns_.insert(url.host() + url.path());
+ if (!url.host().empty() && url.SchemeIsHTTPOrHTTPS()) {
+ safe_browsing_blacklisted_patterns_.insert(url.host() +
+ url.path().as_string());
+ }
}
bool ContentSubresourceFilterDriverFactory::ShouldActivateForMainFrameURL(
« no previous file with comments | « components/search_engines/template_url.cc ('k') | components/sync/driver/sync_stopped_reporter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698