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

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

Issue 2733833002: Change logic for recording redirect pattern histograms. (Closed)
Patch Set: . 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/core/common/activation_list.cc
diff --git a/components/subresource_filter/core/common/activation_list.cc b/components/subresource_filter/core/common/activation_list.cc
index 090eeae134cee791cea1a9e1d61718180dbcce4c..f0ff340049003403fe5cc89042fdfa4a4444002d 100644
--- a/components/subresource_filter/core/common/activation_list.cc
+++ b/components/subresource_filter/core/common/activation_list.cc
@@ -28,4 +28,21 @@ std::ostream& operator<<(std::ostream& os, const ActivationList& type) {
return os;
}
+ActivationList GetListForThreatTypeAndMetadata(
+ safe_browsing::SBThreatType threat_type,
+ safe_browsing::ThreatPatternType threat_type_metadata) {
+ bool is_phishing_interstitial =
+ (threat_type == safe_browsing::SB_THREAT_TYPE_URL_PHISHING);
+ bool is_soc_engineering_ads_interstitial =
+ threat_type_metadata ==
+ safe_browsing::ThreatPatternType::SOCIAL_ENGINEERING_ADS;
+ if (is_phishing_interstitial) {
+ if (is_soc_engineering_ads_interstitial) {
+ return ActivationList::SOCIAL_ENG_ADS_INTERSTITIAL;
+ }
+ return ActivationList::PHISHING_INTERSTITIAL;
+ }
+ return ActivationList::NONE;
+}
+
} // namespace subresource_filter

Powered by Google App Engine
This is Rietveld 408576698