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

Side by Side Diff: components/previews/core/previews_experiments.h

Issue 2442013003: Add non-host functionality to the previews blacklist (Closed)
Patch Set: tbansal comments Created 4 years, 1 month 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_PREVIEWS_CORE_PREVIEWS_EXPERIMENTS_H_ 5 #ifndef COMPONENTS_PREVIEWS_CORE_PREVIEWS_EXPERIMENTS_H_
6 #define COMPONENTS_PREVIEWS_CORE_PREVIEWS_EXPERIMENTS_H_ 6 #define COMPONENTS_PREVIEWS_CORE_PREVIEWS_EXPERIMENTS_H_
7 7
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 9
10 namespace previews { 10 namespace previews {
11 11
12 namespace params { 12 namespace params {
13 13
14 // The maximum number of recent previews navigations the black list looks at to 14 // The maximum number of recent previews navigations the black list looks at to
15 // determine if a host is blacklisted. 15 // determine if a host is blacklisted.
16 size_t MaxStoredHistoryLengthForBlackList(); 16 size_t MaxStoredHistoryLengthForPerHostBlackList();
17
18 // The maximum number of recent previews navigations the black list looks at to
19 // determine if all previews navigations are disallowed.
20 size_t MaxStoredHistoryLengthForHostIndifferentBlackList();
17 21
18 // The maximum number of hosts allowed in the in memory black list. 22 // The maximum number of hosts allowed in the in memory black list.
19 size_t MaxInMemoryHostsInBlackList(); 23 size_t MaxInMemoryHostsInBlackList();
20 24
21 // The number of recent navigations that were opted out of that would trigger 25 // The number of recent navigations that were opted out of that would trigger
22 // the host to be blacklisted. 26 // the host to be blacklisted.
23 int BlackListOptOutThreshold(); 27 int PerHostBlackListOptOutThreshold();
28
29 // The number of recent navigations that were opted out of that would trigger
30 // the all previews navigations to be disallowed.
31 int HostIndifferentBlackListOptOutThreshold();
24 32
25 // The amount of time a host remains blacklisted due to opt outs. 33 // The amount of time a host remains blacklisted due to opt outs.
26 base::TimeDelta BlackListDuration(); 34 base::TimeDelta PerHostBlackListDuration();
35
36 // The amount of time all previews navigations are disallowed due to opt outs.
37 base::TimeDelta HostIndifferentBlackListPerHostDuration();
27 38
28 } // namespace params 39 } // namespace params
29 40
30 // Returns true if any client-side previews experiment is active. 41 // Returns true if any client-side previews experiment is active.
31 bool IsIncludedInClientSidePreviewsExperimentsFieldTrial(); 42 bool IsIncludedInClientSidePreviewsExperimentsFieldTrial();
32 43
33 // Returns true if the field trial that should enable offline pages for 44 // Returns true if the field trial that should enable offline pages for
34 // prohibitvely slow networks is active. 45 // prohibitvely slow networks is active.
35 bool IsOfflinePreviewsEnabled(); 46 bool IsOfflinePreviewsEnabled();
36 47
37 // Sets the appropriate state for field trial and variations to imitate the 48 // Sets the appropriate state for field trial and variations to imitate the
38 // offline pages field trial. 49 // offline pages field trial.
39 bool EnableOfflinePreviewsForTesting(); 50 bool EnableOfflinePreviewsForTesting();
40 51
41 } // namespace previews 52 } // namespace previews
42 53
43 #endif // COMPONENTS_PREVIEWS_CORE_PREVIEWS_EXPERIMENTS_H_ 54 #endif // COMPONENTS_PREVIEWS_CORE_PREVIEWS_EXPERIMENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698