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

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

Issue 2765193002: Prototype for the new UI for the Safe Browsing Subresource Filter. (Closed)
Patch Set: comments 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{
21 "SubresourceFilterExperimentalUI", base::FEATURE_DISABLED_BY_DEFAULT};
22
20 // Legacy name `activation_state` is used in variation parameters. 23 // Legacy name `activation_state` is used in variation parameters.
21 const char kActivationLevelParameterName[] = "activation_state"; 24 const char kActivationLevelParameterName[] = "activation_state";
22 const char kActivationLevelDryRun[] = "dryrun"; 25 const char kActivationLevelDryRun[] = "dryrun";
23 const char kActivationLevelEnabled[] = "enabled"; 26 const char kActivationLevelEnabled[] = "enabled";
24 const char kActivationLevelDisabled[] = "disabled"; 27 const char kActivationLevelDisabled[] = "disabled";
25 28
26 const char kActivationScopeParameterName[] = "activation_scope"; 29 const char kActivationScopeParameterName[] = "activation_scope";
27 const char kActivationScopeAllSites[] = "all_sites"; 30 const char kActivationScopeAllSites[] = "all_sites";
28 const char kActivationScopeActivationList[] = "activation_list"; 31 const char kActivationScopeActivationList[] = "activation_list";
29 const char kActivationScopeNoSites[] = "no_sites"; 32 const char kActivationScopeNoSites[] = "no_sites";
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 subresource_filter::kRulesetFlavorParameterName); 106 subresource_filter::kRulesetFlavorParameterName);
104 } 107 }
105 108
106 bool ShouldWhitelistSiteOnReload() { 109 bool ShouldWhitelistSiteOnReload() {
107 return base::GetFieldTrialParamByFeatureAsBool( 110 return base::GetFieldTrialParamByFeatureAsBool(
108 kSafeBrowsingSubresourceFilter, kWhitelistSiteOnReloadParameterName, 111 kSafeBrowsingSubresourceFilter, kWhitelistSiteOnReloadParameterName,
109 false /* default value */); 112 false /* default value */);
110 } 113 }
111 114
112 } // namespace subresource_filter 115 } // 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