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