blob: 4b22f76cbaafc713af6888219d1ee038cbd6a715 [file] [log] [blame]
[email protected]ae9e12a2012-07-31 17:48:121// 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
avie4d7b6f2015-12-26 00:59:188#include "base/macros.h"
[email protected]ae9e12a2012-07-31 17:48:129
[email protected]64b8652c2014-07-16 19:14:2810namespace base {
jwd34f77fa2016-08-30 22:53:0311class FeatureList;
[email protected]64b8652c2014-07-16 19:14:2812}
13
[email protected]ae9e12a2012-07-31 17:48:1214class ChromeBrowserFieldTrials {
15 public:
drogerbbb48562016-12-07 13:35:3116 ChromeBrowserFieldTrials();
[email protected]ae9e12a2012-07-31 17:48:1217 ~ChromeBrowserFieldTrials();
18
isherman292673a2015-03-31 22:04:2919 void SetupFieldTrials();
[email protected]ae9e12a2012-07-31 17:48:1220
jwd34f77fa2016-08-30 22:53:0321 // 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]ae9e12a2012-07-31 17:48:1230 private:
[email protected]bd557d42012-11-01 15:49:0931 // Instantiates dynamic trials by querying their state, to ensure they get
32 // reported as used.
33 void InstantiateDynamicTrials();
34
[email protected]ae9e12a2012-07-31 17:48:1235 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserFieldTrials);
36};
37
38#endif // CHROME_BROWSER_CHROME_BROWSER_FIELD_TRIALS_H_