OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_BROWSER_CHROME_BROWSER_FIELD_TRIALS_H_ | 5 #ifndef CHROME_BROWSER_CHROME_BROWSER_FIELD_TRIALS_H_ |
6 #define CHROME_BROWSER_CHROME_BROWSER_FIELD_TRIALS_H_ | 6 #define CHROME_BROWSER_CHROME_BROWSER_FIELD_TRIALS_H_ |
7 | 7 |
8 #include "base/command_line.h" | |
9 #include "base/macros.h" | 8 #include "base/macros.h" |
10 | 9 |
11 namespace base { | 10 namespace base { |
12 class FeatureList; | 11 class FeatureList; |
13 } | 12 } |
14 | 13 |
15 class ChromeBrowserFieldTrials { | 14 class ChromeBrowserFieldTrials { |
16 public: | 15 public: |
17 explicit ChromeBrowserFieldTrials(const base::CommandLine& command_line); | 16 ChromeBrowserFieldTrials(); |
18 ~ChromeBrowserFieldTrials(); | 17 ~ChromeBrowserFieldTrials(); |
19 | 18 |
20 void SetupFieldTrials(); | 19 void SetupFieldTrials(); |
21 | 20 |
22 // Create field trials that will control feature list features. This should be | 21 // Create field trials that will control feature list features. This should be |
23 // called during the same timing window as | 22 // called during the same timing window as |
24 // FeatureList::AssociateReportingFieldTrial. |has_seed| indicates that the | 23 // FeatureList::AssociateReportingFieldTrial. |has_seed| indicates that the |
25 // variations service used a seed to create field trials. This can be used to | 24 // variations service used a seed to create field trials. This can be used to |
26 // prevent associating a field trial with a feature that you expect to be | 25 // prevent associating a field trial with a feature that you expect to be |
27 // controlled by the variations seed. | 26 // controlled by the variations seed. |
28 void SetupFeatureControllingFieldTrials(bool has_seed, | 27 void SetupFeatureControllingFieldTrials(bool has_seed, |
29 base::FeatureList* feature_list); | 28 base::FeatureList* feature_list); |
30 | 29 |
31 private: | 30 private: |
32 // Instantiates dynamic trials by querying their state, to ensure they get | 31 // Instantiates dynamic trials by querying their state, to ensure they get |
33 // reported as used. | 32 // reported as used. |
34 void InstantiateDynamicTrials(); | 33 void InstantiateDynamicTrials(); |
35 | 34 |
36 const base::CommandLine& parsed_command_line_; | |
37 | |
38 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserFieldTrials); | 35 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserFieldTrials); |
39 }; | 36 }; |
40 | 37 |
41 #endif // CHROME_BROWSER_CHROME_BROWSER_FIELD_TRIALS_H_ | 38 #endif // CHROME_BROWSER_CHROME_BROWSER_FIELD_TRIALS_H_ |
OLD | NEW |