hkamila | 422a878 | 2017-07-12 02:50:45 | [diff] [blame] | 1 | // Copyright (c) 2017 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 | #ifndef COMPONENTS_SAFE_BROWSING_FEATURES_H_ |
| 6 | #define COMPONENTS_SAFE_BROWSING_FEATURES_H_ |
| 7 | |
| 8 | #include <stddef.h> |
| 9 | #include <algorithm> |
| 10 | #include <utility> |
| 11 | #include <vector> |
| 12 | |
| 13 | #include "base/feature_list.h" |
| 14 | #include "base/macros.h" |
| 15 | #include "base/values.h" |
| 16 | namespace base { |
| 17 | class ListValue; |
| 18 | } // namespace base |
| 19 | |
| 20 | namespace safe_browsing { |
| 21 | // Features list |
Luke Zielinski | 5661557 | 2017-09-29 19:37:25 | [diff] [blame] | 22 | extern const base::Feature kAdSamplerCollectButDontSendFeature; |
Luke Zielinski | cea362a | 2017-07-19 16:49:31 | [diff] [blame] | 23 | extern const base::Feature kAdSamplerTriggerFeature; |
Yuzhu Shen | cb3011f6 | 2018-02-08 02:51:50 | [diff] [blame] | 24 | extern const base::Feature kCheckByURLLoaderThrottle; |
Luke Zielinski | a8136ae | 2017-08-28 20:25:40 | [diff] [blame] | 25 | |
Varun Khaneja | da5d0c76 | 2017-08-08 16:04:41 | [diff] [blame] | 26 | // Specifies which non-resource HTML Elements to collect based on their tag and |
| 27 | // attributes. It's a single param containing a comma-separated list of pairs. |
| 28 | // For example: "tag1,id,tag1,height,tag2,foo" - this will collect elements with |
| 29 | // tag "tag1" that have attribute "id" or "height" set, and elements of tag |
| 30 | // "tag2" if they have attribute "foo" set. All tag names and attributes should |
| 31 | // be lower case. |
hkamila | 422a878 | 2017-07-12 02:50:45 | [diff] [blame] | 32 | extern const base::Feature kThreatDomDetailsTagAndAttributeFeature; |
Luke Zielinski | a8136ae | 2017-08-28 20:25:40 | [diff] [blame] | 33 | |
Luke Zielinski | 793ee52 | 2018-05-07 15:11:45 | [diff] [blame] | 34 | // Controls the daily quota for the suspicious site trigger. |
| 35 | extern const base::Feature kSuspiciousSiteTriggerQuotaFeature; |
| 36 | |
Luke Zielinski | a8136ae | 2017-08-28 20:25:40 | [diff] [blame] | 37 | // Controls the daily quota for data collection triggers. It's a single param |
| 38 | // containing a comma-separated list of pairs. The format of the param is |
| 39 | // "T1,Q1,T2,Q2,...Tn,Qn", where Tx is a TriggerType and Qx is how many reports |
| 40 | // that trigger is allowed to send per day. |
Luke Zielinski | 793ee52 | 2018-05-07 15:11:45 | [diff] [blame] | 41 | // TODO(crbug.com/744869): This param should be deprecated after ad sampler |
| 42 | // launch in favour of having a unique quota feature and param per trigger. |
| 43 | // Having a single shared feature makes it impossible to run multiple trigger |
| 44 | // trials simultaneously. |
Luke Zielinski | a8136ae | 2017-08-28 20:25:40 | [diff] [blame] | 45 | extern const base::Feature kTriggerThrottlerDailyQuotaFeature; |
| 46 | |
Varun Khaneja | 6271fd9c | 2018-02-20 21:35:14 | [diff] [blame] | 47 | // Controls whether .rar files downloaded by the user are inspected for being |
| 48 | // unsafe. |
| 49 | extern const base::Feature kInspectDownloadedRarFiles; |
| 50 | |
Jialiu Lin | 96ea5a7 | 2018-04-19 01:38:48 | [diff] [blame] | 51 | // Controls the Password Protection for Enterprise V1 feature; |
Luna Lu | aacaa90f | 2018-03-13 15:22:08 | [diff] [blame] | 52 | extern const base::Feature kEnterprisePasswordProtectionV1; |
| 53 | |
Jialiu Lin | 96ea5a7 | 2018-04-19 01:38:48 | [diff] [blame] | 54 | // Forces the chrome://reset-password page to be shown for review or testing |
| 55 | // purpose. |
| 56 | extern const base::Feature kForceEnableResetPasswordWebUI; |
| 57 | |
hkamila | 422a878 | 2017-07-12 02:50:45 | [diff] [blame] | 58 | base::ListValue GetFeatureStatusList(); |
| 59 | |
hkamila | 422a878 | 2017-07-12 02:50:45 | [diff] [blame] | 60 | } // namespace safe_browsing |
Daniel Bratell | 30c4a06 | 2018-01-08 13:34:02 | [diff] [blame] | 61 | #endif // COMPONENTS_SAFE_BROWSING_FEATURES_H_ |