[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" |
Kyle Milka | 9ae0cdee | 2017-07-20 20:24:57 | [diff] [blame] | 9 | #include "components/variations/platform_field_trials.h" |
[email protected] | ae9e12a | 2012-07-31 17:48:12 | [diff] [blame] | 10 | |
Ramya Nagarajan | bea45544c | 2019-04-08 19:30:14 | [diff] [blame] | 11 | class PrefService; |
12 | |||||
[email protected] | 64b8652c | 2014-07-16 19:14:28 | [diff] [blame] | 13 | namespace base { |
jwd | 34f77fa | 2016-08-30 22:53:03 | [diff] [blame] | 14 | class FeatureList; |
[email protected] | 64b8652c | 2014-07-16 19:14:28 | [diff] [blame] | 15 | } |
16 | |||||
Kyle Milka | 9ae0cdee | 2017-07-20 20:24:57 | [diff] [blame] | 17 | class ChromeBrowserFieldTrials : public variations::PlatformFieldTrials { |
[email protected] | ae9e12a | 2012-07-31 17:48:12 | [diff] [blame] | 18 | public: |
Ramya Nagarajan | bea45544c | 2019-04-08 19:30:14 | [diff] [blame] | 19 | explicit ChromeBrowserFieldTrials(PrefService* local_state); |
Kyle Milka | 9ae0cdee | 2017-07-20 20:24:57 | [diff] [blame] | 20 | ~ChromeBrowserFieldTrials() override; |
[email protected] | ae9e12a | 2012-07-31 17:48:12 | [diff] [blame] | 21 | |
Kyle Milka | 9ae0cdee | 2017-07-20 20:24:57 | [diff] [blame] | 22 | // variations::PlatformFieldTrials: |
23 | void SetupFieldTrials() override; | ||||
24 | void SetupFeatureControllingFieldTrials( | ||||
25 | bool has_seed, | ||||
26 | base::FeatureList* feature_list) override; | ||||
Matthew Cary | 4f09c14 | 2019-03-06 11:15:56 | [diff] [blame] | 27 | void RegisterSyntheticTrials() override; |
jwd | 34f77fa | 2016-08-30 22:53:03 | [diff] [blame] | 28 | |
[email protected] | ae9e12a | 2012-07-31 17:48:12 | [diff] [blame] | 29 | private: |
[email protected] | bd557d4 | 2012-11-01 15:49:09 | [diff] [blame] | 30 | // Instantiates dynamic trials by querying their state, to ensure they get |
31 | // reported as used. | ||||
32 | void InstantiateDynamicTrials(); | ||||
33 | |||||
Ramya Nagarajan | bea45544c | 2019-04-08 19:30:14 | [diff] [blame] | 34 | // Weak pointer to the local state prefs store. |
35 | PrefService* const local_state_; | ||||
36 | |||||
[email protected] | ae9e12a | 2012-07-31 17:48:12 | [diff] [blame] | 37 | DISALLOW_COPY_AND_ASSIGN(ChromeBrowserFieldTrials); |
38 | }; | ||||
39 | |||||
40 | #endif // CHROME_BROWSER_CHROME_BROWSER_FIELD_TRIALS_H_ |