| Index: components/subresource_filter/core/browser/subresource_filter_features.cc
|
| diff --git a/components/subresource_filter/core/browser/subresource_filter_features.cc b/components/subresource_filter/core/browser/subresource_filter_features.cc
|
| index 3e16a9f98d7aed7b2f8538c298fca6744e0ea7fa..a0dea3959a6db787c5a27ba211922ebcacfe608a 100644
|
| --- a/components/subresource_filter/core/browser/subresource_filter_features.cc
|
| +++ b/components/subresource_filter/core/browser/subresource_filter_features.cc
|
| @@ -19,6 +19,11 @@ const char kActivationStateDryRun[] = "dryrun";
|
| const char kActivationStateEnabled[] = "enabled";
|
| const char kActivationStateDisabled[] = "disabled";
|
|
|
| +const char kActivationScopeParameterName[] = "activation_scope";
|
| +const char kActivationScopeAllSites[] = "all_sites";
|
| +const char kActivationScopeActivationList[] = "activation_list";
|
| +const char kActivationScopeNoSites[] = "no_sites";
|
| +
|
| ActivationState GetMaximumActivationState() {
|
| std::string activation_state = variations::GetVariationParamValueByFeature(
|
| kSafeBrowsingSubresourceFilter, kActivationStateParameterName);
|
| @@ -29,4 +34,15 @@ ActivationState GetMaximumActivationState() {
|
| return ActivationState::DISABLED;
|
| }
|
|
|
| +ActivationScope GetCurrentActivationScope() {
|
| + std::string activation_scope = variations::GetVariationParamValueByFeature(
|
| + kSafeBrowsingSubresourceFilter, kActivationScopeParameterName);
|
| + if (base::LowerCaseEqualsASCII(activation_scope, kActivationScopeAllSites))
|
| + return ActivationScope::ALL_SITES;
|
| + else if (base::LowerCaseEqualsASCII(activation_scope,
|
| + kActivationScopeActivationList))
|
| + return ActivationScope::ACTIVATION_LIST;
|
| + return ActivationScope::NO_SITES;
|
| +}
|
| +
|
| } // namespace subresource_filter
|
|
|