| 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
|
|
|