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

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

Issue 2874663002: [subresource_filter] s/ShouldSuppressActivation/OnPageActivationComputed (Closed)
Patch Set: engedy review Created 3 years, 7 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: components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc
diff --git a/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc b/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc
index d45a265136f96c93752aac8476e3ee24874a2619..33181c99a5231f6c7bdb7eacd0199e23a2d6ea81 100644
--- a/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc
+++ b/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc
@@ -189,10 +189,11 @@ class MockSubresourceFilterClient : public SubresourceFilterClient {
~MockSubresourceFilterClient() override = default;
- bool ShouldSuppressActivation(content::NavigationHandle* handle) override {
- return handle->IsInMainFrame() &&
- whitelisted_hosts_.find(handle->GetURL().host()) !=
- whitelisted_hosts_.end();
+ bool OnPageActivationComputed(content::NavigationHandle* handle,
+ bool activated) override {
+ DCHECK(handle->IsInMainFrame());
+ return activated && whitelisted_hosts_.find(handle->GetURL().host()) !=
+ whitelisted_hosts_.end();
shivanisha 2017/05/10 17:34:25 nit (for sake of conciseness): return activated
engedy 2017/05/10 17:40:20 Actually, I just discovered there is base::Contain
Charlie Harrison 2017/05/10 18:17:21 Changed to use base::ContainsValue, but it's a set
}
void WhitelistByContentSettings(const GURL& url) override {}

Powered by Google App Engine
This is Rietveld 408576698