OLD | NEW |
---|---|
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_PREVIEWS_EXPERIMENTS_H_ |
tbansal1
2016/09/19 21:26:08
s/COMPONENTS_PREVIEWS_PREVIEWS_EXPERIMENTS_H_/??/
RyanSturm
2016/09/19 22:37:45
Good catch. I've fixed others.
| |
6 #define COMPONENTS_PREVIEWS_CORE_PREVIEWS_EXPERIMENTS_H_ | 6 #define COMPONENTS_PREVIEWS_PREVIEWS_EXPERIMENTS_H_ |
7 | |
8 #include "base/time/time.h" | |
7 | 9 |
8 namespace previews { | 10 namespace previews { |
9 | 11 |
12 namespace params { | |
13 | |
14 // The maximum number of recent previews navigations the black list looks at to | |
15 // determine if a domain is blacklisted. | |
16 size_t MaxStoredHistoryLengthForBlackList(); | |
17 | |
18 // The maximum number of hosts allowed in the in memory black list. | |
19 size_t MaxInMemoryHostsInBlackList(); | |
20 | |
21 // The number of recent navigations that were opted out of that would trigger | |
22 // the domain to be blacklisted. | |
23 int BlackListOptOutThreshold(); | |
24 | |
25 // The amount of time a domain remains blacklisted due to opt outs. | |
26 base::TimeDelta BlackListDuration(); | |
27 } | |
28 | |
10 // Returns true if any client-side previews experiment is active. | 29 // Returns true if any client-side previews experiment is active. |
11 bool IsIncludedInClientSidePreviewsExperimentsFieldTrial(); | 30 bool IsIncludedInClientSidePreviewsExperimentsFieldTrial(); |
12 | 31 |
13 // Returns true if the field trial that should enable offline pages for | 32 // Returns true if the field trial that should enable offline pages for |
14 // prohibitvely slow networks is active. | 33 // prohibitvely slow networks is active. |
15 bool IsOfflinePreviewsEnabled(); | 34 bool IsOfflinePreviewsEnabled(); |
16 | 35 |
17 // Sets the appropriate state for field trial and variations to imitate the | 36 // Sets the appropriate state for field trial and variations to imitate the |
18 // offline pages field trial. | 37 // offline pages field trial. |
19 bool EnableOfflinePreviewsForTesting(); | 38 bool EnableOfflinePreviewsForTesting(); |
20 | 39 |
21 } // namespace previews | 40 } // namespace previews |
22 | 41 |
23 #endif // COMPONENTS_PREVIEWS_CORE_PREVIEWS_EXPERIMENTS_H_ | 42 #endif // COMPONENTS_PREVIEWS_PREVIEWS_EXPERIMENTS_H_ |
OLD | NEW |