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

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

Issue 2022783002: Skeleton of the Safe Browsing Subresource Filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "components/subresource_filter/core/browser/subresource_filter_features .h"
6
7 #include <string>
8
9 #include "base/strings/string_util.h"
10 #include "components/variations/variations_associated_data.h"
11
12 namespace subresource_filter {
13
14 const base::Feature kSafeBrowsingSubresourceFilter{
battre 2016/05/30 15:29:25 nit: space before { ?
engedy 2016/05/30 20:54:00 Agreed that it looks horrible, but clang-format do
15 "SubresourceFilter", base::FEATURE_DISABLED_BY_DEFAULT};
16
17 const char kActivationStateParameterName[] = "activation_state";
18 const char kActivationStateDryRun[] = "dryrun";
19 const char kActivationStateEnabled[] = "enabled";
20
21 ActivationState GetMaximumActivationState() {
22 std::string activation_state = variations::GetVariationParamValueByFeature(
23 kSafeBrowsingSubresourceFilter, kActivationStateParameterName);
24 if (base::LowerCaseEqualsASCII(activation_state, kActivationStateEnabled))
25 return ActivationState::ENABLED;
26 else if (base::LowerCaseEqualsASCII(activation_state, kActivationStateDryRun))
27 return ActivationState::DRYRUN;
28 return ActivationState::DISABLED;
29 }
30
31 } // namespace subresource_filter
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698