OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "components/subresource_filter/content/browser/content_activation_list_
utils.h" |
| 6 |
| 7 namespace subresource_filter { |
| 8 |
| 9 ActivationList GetListForThreatTypeAndMetadata( |
| 10 safe_browsing::SBThreatType threat_type, |
| 11 safe_browsing::ThreatPatternType threat_type_metadata) { |
| 12 bool is_phishing_interstitial = |
| 13 (threat_type == safe_browsing::SB_THREAT_TYPE_URL_PHISHING); |
| 14 bool is_soc_engineering_ads_interstitial = |
| 15 threat_type_metadata == |
| 16 safe_browsing::ThreatPatternType::SOCIAL_ENGINEERING_ADS; |
| 17 if (is_phishing_interstitial) { |
| 18 if (is_soc_engineering_ads_interstitial) { |
| 19 return ActivationList::SOCIAL_ENG_ADS_INTERSTITIAL; |
| 20 } |
| 21 return ActivationList::PHISHING_INTERSTITIAL; |
| 22 } |
| 23 return ActivationList::NONE; |
| 24 } |
| 25 |
| 26 } // namespace subresource_filter |
OLD | NEW |