blob: dd913aa69209a2b0f3f1fe6db258ebdbc161a098 [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;
Luke Zielinskia8136ae2017-08-28 20:25:4025
Varun Khanejada5d0c762017-08-08 16:04:4126// 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.
hkamila422a8782017-07-12 02:50:4532extern const base::Feature kThreatDomDetailsTagAndAttributeFeature;
Luke Zielinskia8136ae2017-08-28 20:25:4033
Luke Zielinski793ee522018-05-07 15:11:4534// Controls the daily quota for the suspicious site trigger.
35extern const base::Feature kSuspiciousSiteTriggerQuotaFeature;
36
Luke Zielinskia8136ae2017-08-28 20:25:4037// 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 Zielinski793ee522018-05-07 15:11:4541// 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 Zielinskia8136ae2017-08-28 20:25:4045extern const base::Feature kTriggerThrottlerDailyQuotaFeature;
46
Varun Khaneja6271fd9c2018-02-20 21:35:1447// Controls whether .rar files downloaded by the user are inspected for being
48// unsafe.
49extern const base::Feature kInspectDownloadedRarFiles;
50
Jialiu Lin96ea5a72018-04-19 01:38:4851// Controls the Password Protection for Enterprise V1 feature;
Luna Luaacaa90f2018-03-13 15:22:0852extern const base::Feature kEnterprisePasswordProtectionV1;
53
Jialiu Lin96ea5a72018-04-19 01:38:4854// Forces the chrome://reset-password page to be shown for review or testing
55// purpose.
56extern const base::Feature kForceEnableResetPasswordWebUI;
57
hkamila422a8782017-07-12 02:50:4558base::ListValue GetFeatureStatusList();
59
hkamila422a8782017-07-12 02:50:4560} // namespace safe_browsing
Daniel Bratell30c4a062018-01-08 13:34:0261#endif // COMPONENTS_SAFE_BROWSING_FEATURES_H_