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

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

Issue 2645283007: Add the client for accessing Subresource Filter only list. (Closed)
Patch Set: feature Created 3 years, 9 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.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 d18b02fb3827db0b0603cfa436bbaa0b2e31b207..7819037198433436b92b1b69ac6d22110ef3ca41 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
@@ -356,6 +356,7 @@ int ContentSubresourceFilterDriverFactory::CalculateHitPatternForActivationList(
const int kInitialURLHitMask = 0x4;
const int kRedirectURLHitMask = 0x2;
const int kFinalURLHitMask = 0x1;
+
if (navigation_chain_.size() > 1) {
if (DidURLMatchActivationList(navigation_chain_.back(), activation_list))
hits_pattern |= kFinalURLHitMask;
@@ -383,6 +384,7 @@ void ContentSubresourceFilterDriverFactory::RecordRedirectChainMatchPattern()
RecordRedirectChainMatchPatternForList(
ActivationList::SOCIAL_ENG_ADS_INTERSTITIAL);
RecordRedirectChainMatchPatternForList(ActivationList::PHISHING_INTERSTITIAL);
+ RecordRedirectChainMatchPatternForList(ActivationList::SUBRESOURCE_FILTER);
}
void ContentSubresourceFilterDriverFactory::
@@ -401,6 +403,10 @@ void ContentSubresourceFilterDriverFactory::
REPORT_REDIRECT_PATTERN_FOR_SUFFIX("PhishingInterstital", hits_pattern,
chain_size);
break;
+ case ActivationList::SUBRESOURCE_FILTER:
+ REPORT_REDIRECT_PATTERN_FOR_SUFFIX("SubresourceFilterOnly", hits_pattern,
+ chain_size);
+ break;
default:
NOTREACHED();
break;

Powered by Google App Engine
This is Rietveld 408576698