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; |
Varun Khaneja | ab827ab | 2017-08-25 16:31:36 | [diff] [blame] | 25 | // Gates logging of GaiaPasswordReuse user events. |
| 26 | extern const base::Feature kGaiaPasswordReuseReporting; |
Jialiu Lin | 6cdf8ec | 2017-07-30 19:50:01 | [diff] [blame] | 27 | extern const base::Feature kGoogleBrandedPhishingWarning; |
Luke Zielinski | a8136ae | 2017-08-28 20:25:40 | [diff] [blame] | 28 | |
Varun Khaneja | da5d0c76 | 2017-08-08 16:04:41 | [diff] [blame] | 29 | // Specifies which non-resource HTML Elements to collect based on their tag and |
| 30 | // attributes. It's a single param containing a comma-separated list of pairs. |
| 31 | // For example: "tag1,id,tag1,height,tag2,foo" - this will collect elements with |
| 32 | // tag "tag1" that have attribute "id" or "height" set, and elements of tag |
| 33 | // "tag2" if they have attribute "foo" set. All tag names and attributes should |
| 34 | // be lower case. |
hkamila | 422a878 | 2017-07-12 02:50:45 | [diff] [blame] | 35 | extern const base::Feature kThreatDomDetailsTagAndAttributeFeature; |
Luke Zielinski | a8136ae | 2017-08-28 20:25:40 | [diff] [blame] | 36 | |
| 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. |
| 41 | extern const base::Feature kTriggerThrottlerDailyQuotaFeature; |
| 42 | |
Charles Harrison | 62ced40 | 2017-11-22 03:22:28 | [diff] [blame] | 43 | // Controls whether to dispatch the SafetyNet check on a worker thread. Android |
| 44 | // only. |
| 45 | extern const base::Feature kDispatchSafetyNetCheckOffThread; |
| 46 | |
Jialiu Lin | bc86770 | 2018-01-05 18:19:57 | [diff] [blame] | 47 | // Controls whether to add recent navigation events to referrer chain for SBER |
| 48 | // users if referrer chain is incomplete. |
| 49 | extern const base::Feature kAppendRecentNavigationEvents; |
| 50 | |
Varun Khaneja | 6271fd9c | 2018-02-20 21:35:14 | [diff] [blame] | 51 | // Controls whether .rar files downloaded by the user are inspected for being |
| 52 | // unsafe. |
| 53 | extern const base::Feature kInspectDownloadedRarFiles; |
| 54 | |
hkamila | 422a878 | 2017-07-12 02:50:45 | [diff] [blame] | 55 | base::ListValue GetFeatureStatusList(); |
| 56 | |
hkamila | 422a878 | 2017-07-12 02:50:45 | [diff] [blame] | 57 | } // namespace safe_browsing |
Daniel Bratell | 30c4a06 | 2018-01-08 13:34:02 | [diff] [blame] | 58 | #endif // COMPONENTS_SAFE_BROWSING_FEATURES_H_ |