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

Side by Side Diff: components/subresource_filter/core/browser/subresource_filter_features.cc

Issue 2770153004: Unittests for the Safe Browsing Subresource filter navigation throttle (Closed)
Patch Set: . Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « components/subresource_filter/core/browser/subresource_filter_features.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/subresource_filter/core/browser/subresource_filter_features .h" 5 #include "components/subresource_filter/core/browser/subresource_filter_features .h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/metrics/field_trial_params.h" 9 #include "base/metrics/field_trial_params.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
11 #include "base/strings/string_split.h" 11 #include "base/strings/string_split.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "components/variations/variations_associated_data.h" 13 #include "components/variations/variations_associated_data.h"
14 14
15 namespace subresource_filter { 15 namespace subresource_filter {
16 16
17 const base::Feature kSafeBrowsingSubresourceFilter{ 17 const base::Feature kSafeBrowsingSubresourceFilter{
18 "SubresourceFilter", base::FEATURE_DISABLED_BY_DEFAULT}; 18 "SubresourceFilter", base::FEATURE_DISABLED_BY_DEFAULT};
19 19
20 const base::Feature kSafeBrowsingSubresourceFilterExperimentalUI{ 20 const base::Feature kSafeBrowsingSubresourceFilterExperimentalUI{
21 "SubresourceFilterExperimentalUI", base::FEATURE_DISABLED_BY_DEFAULT}; 21 "SubresourceFilterExperimentalUI", base::FEATURE_DISABLED_BY_DEFAULT};
22 22
23 const base::Feature kSubresourceFilterSafeBrowsingActivationThrottle{
24 "SubresourceFilterSafeBrowsingActivationThrottle",
25 base::FEATURE_DISABLED_BY_DEFAULT};
26
27 // Legacy name `activation_state` is used in variation parameters. 23 // Legacy name `activation_state` is used in variation parameters.
28 const char kActivationLevelParameterName[] = "activation_state"; 24 const char kActivationLevelParameterName[] = "activation_state";
29 const char kActivationLevelDryRun[] = "dryrun"; 25 const char kActivationLevelDryRun[] = "dryrun";
30 const char kActivationLevelEnabled[] = "enabled"; 26 const char kActivationLevelEnabled[] = "enabled";
31 const char kActivationLevelDisabled[] = "disabled"; 27 const char kActivationLevelDisabled[] = "disabled";
32 28
33 const char kActivationScopeParameterName[] = "activation_scope"; 29 const char kActivationScopeParameterName[] = "activation_scope";
34 const char kActivationScopeAllSites[] = "all_sites"; 30 const char kActivationScopeAllSites[] = "all_sites";
35 const char kActivationScopeActivationList[] = "activation_list"; 31 const char kActivationScopeActivationList[] = "activation_list";
36 const char kActivationScopeNoSites[] = "no_sites"; 32 const char kActivationScopeNoSites[] = "no_sites";
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 subresource_filter::kRulesetFlavorParameterName); 110 subresource_filter::kRulesetFlavorParameterName);
115 } 111 }
116 112
117 bool ShouldWhitelistSiteOnReload() { 113 bool ShouldWhitelistSiteOnReload() {
118 return base::GetFieldTrialParamByFeatureAsBool( 114 return base::GetFieldTrialParamByFeatureAsBool(
119 kSafeBrowsingSubresourceFilter, kWhitelistSiteOnReloadParameterName, 115 kSafeBrowsingSubresourceFilter, kWhitelistSiteOnReloadParameterName,
120 false /* default value */); 116 false /* default value */);
121 } 117 }
122 118
123 } // namespace subresource_filter 119 } // namespace subresource_filter
OLDNEW
« no previous file with comments | « components/subresource_filter/core/browser/subresource_filter_features.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698