[email protected] | ae9e12a | 2012-07-31 17:48:12 | [diff] [blame] | 1 | // Copyright (c) 2012 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 CHROME_BROWSER_CHROME_BROWSER_FIELD_TRIALS_H_ | ||||
6 | #define CHROME_BROWSER_CHROME_BROWSER_FIELD_TRIALS_H_ | ||||
7 | |||||
avi | e4d7b6f | 2015-12-26 00:59:18 | [diff] [blame] | 8 | #include "base/macros.h" |
[email protected] | ae9e12a | 2012-07-31 17:48:12 | [diff] [blame] | 9 | |
[email protected] | 64b8652c | 2014-07-16 19:14:28 | [diff] [blame] | 10 | namespace base { |
jwd | 34f77fa | 2016-08-30 22:53:03 | [diff] [blame] | 11 | class FeatureList; |
[email protected] | 64b8652c | 2014-07-16 19:14:28 | [diff] [blame] | 12 | } |
13 | |||||
[email protected] | ae9e12a | 2012-07-31 17:48:12 | [diff] [blame] | 14 | class ChromeBrowserFieldTrials { |
15 | public: | ||||
droger | bbb4856 | 2016-12-07 13:35:31 | [diff] [blame] | 16 | ChromeBrowserFieldTrials(); |
[email protected] | ae9e12a | 2012-07-31 17:48:12 | [diff] [blame] | 17 | ~ChromeBrowserFieldTrials(); |
18 | |||||
isherman | 292673a | 2015-03-31 22:04:29 | [diff] [blame] | 19 | void SetupFieldTrials(); |
[email protected] | ae9e12a | 2012-07-31 17:48:12 | [diff] [blame] | 20 | |
jwd | 34f77fa | 2016-08-30 22:53:03 | [diff] [blame] | 21 | // Create field trials that will control feature list features. This should be |
22 | // called during the same timing window as | ||||
23 | // FeatureList::AssociateReportingFieldTrial. |has_seed| indicates that the | ||||
24 | // variations service used a seed to create field trials. This can be used to | ||||
25 | // prevent associating a field trial with a feature that you expect to be | ||||
26 | // controlled by the variations seed. | ||||
27 | void SetupFeatureControllingFieldTrials(bool has_seed, | ||||
28 | base::FeatureList* feature_list); | ||||
29 | |||||
[email protected] | ae9e12a | 2012-07-31 17:48:12 | [diff] [blame] | 30 | private: |
[email protected] | bd557d4 | 2012-11-01 15:49:09 | [diff] [blame] | 31 | // Instantiates dynamic trials by querying their state, to ensure they get |
32 | // reported as used. | ||||
33 | void InstantiateDynamicTrials(); | ||||
34 | |||||
[email protected] | ae9e12a | 2012-07-31 17:48:12 | [diff] [blame] | 35 | DISALLOW_COPY_AND_ASSIGN(ChromeBrowserFieldTrials); |
36 | }; | ||||
37 | |||||
38 | #endif // CHROME_BROWSER_CHROME_BROWSER_FIELD_TRIALS_H_ |