blob: ac7f16b63c18c40b82b8b6e59a09e02e7fee11fa [file] [log] [blame]
hkamila422a8782017-07-12 02:50:451// 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"
16namespace base {
17class ListValue;
18} // namespace base
19
20namespace safe_browsing {
21// Features list
Luke Zielinski56615572017-09-29 19:37:2522extern const base::Feature kAdSamplerCollectButDontSendFeature;
Luke Zielinskicea362a2017-07-19 16:49:3123extern const base::Feature kAdSamplerTriggerFeature;
Yuzhu Shencb3011f62018-02-08 02:51:5024extern const base::Feature kCheckByURLLoaderThrottle;
Varun Khanejaab827ab2017-08-25 16:31:3625// Gates logging of GaiaPasswordReuse user events.
26extern const base::Feature kGaiaPasswordReuseReporting;
Jialiu Lin6cdf8ec2017-07-30 19:50:0127extern const base::Feature kGoogleBrandedPhishingWarning;
Luke Zielinskia8136ae2017-08-28 20:25:4028
Varun Khanejada5d0c762017-08-08 16:04:4129// 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.
hkamila422a8782017-07-12 02:50:4535extern const base::Feature kThreatDomDetailsTagAndAttributeFeature;
Luke Zielinskia8136ae2017-08-28 20:25:4036
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.
41extern const base::Feature kTriggerThrottlerDailyQuotaFeature;
42
Charles Harrison62ced402017-11-22 03:22:2843// Controls whether to dispatch the SafetyNet check on a worker thread. Android
44// only.
45extern const base::Feature kDispatchSafetyNetCheckOffThread;
46
Jialiu Linbc867702018-01-05 18:19:5747// Controls whether to add recent navigation events to referrer chain for SBER
48// users if referrer chain is incomplete.
49extern const base::Feature kAppendRecentNavigationEvents;
50
Varun Khaneja6271fd9c2018-02-20 21:35:1451// Controls whether .rar files downloaded by the user are inspected for being
52// unsafe.
53extern const base::Feature kInspectDownloadedRarFiles;
54
hkamila422a8782017-07-12 02:50:4555base::ListValue GetFeatureStatusList();
56
hkamila422a8782017-07-12 02:50:4557} // namespace safe_browsing
Daniel Bratell30c4a062018-01-08 13:34:0258#endif // COMPONENTS_SAFE_BROWSING_FEATURES_H_