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

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

Issue 2733833002: Change logic for recording redirect pattern histograms. (Closed)
Patch Set: fix ios 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_activation_list_utils.cc
diff --git a/components/subresource_filter/content/browser/content_activation_list_utils.cc b/components/subresource_filter/content/browser/content_activation_list_utils.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6689d600a6be3fc5ef7b0af4d4cd22b01d88a7fe
--- /dev/null
+++ b/components/subresource_filter/content/browser/content_activation_list_utils.cc
@@ -0,0 +1,26 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/subresource_filter/content/browser/content_activation_list_utils.h"
+
+namespace subresource_filter {
+
+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