Chromium Code Reviews| Index: chrome/browser/instant/instant_field_trial.h |
| diff --git a/chrome/browser/instant/instant_field_trial.h b/chrome/browser/instant/instant_field_trial.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..bb4a20a1803a9e210421ddbe1ec9a43d18e3dc54 |
| --- /dev/null |
| +++ b/chrome/browser/instant/instant_field_trial.h |
| @@ -0,0 +1,31 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_INSTANT_INSTANT_FIELD_TRIAL_H_ |
| +#define CHROME_BROWSER_INSTANT_INSTANT_FIELD_TRIAL_H_ |
| + |
| +#include <string> |
| + |
| +class Profile; |
| + |
| +namespace instant_field_trial { |
| + |
| +// Sets up the Instant field trial (creates groups, registers the field trial |
| +// with the global FieldTrialList and selects the user into one of the groups). |
| +// MUST NOT BE CALLED MORE THAN ONCE. |
| +void Init(); |
| + |
| +// Returns true if the user is part of the field trial experiment group. |
|
sky
2011/07/12 00:37:50
Why do we need both IsExperiment and IsControl. Is
sreeram
2011/07/12 03:36:18
We need to be able to distinguish among these stat
|
| +bool IsExperiment(Profile* profile); |
| + |
| +// Returns true if the user is part of the field trial control group. |
| +bool IsControl(Profile* profile); |
| + |
| +// Returns a string that identifies the group the user has been selected into. |
| +// Useful to split histograms by field trial groups. |
| +std::string GetGroupName(Profile* profile); |
| + |
| +} // namespace instant_field_trial |
| + |
| +#endif // CHROME_BROWSER_INSTANT_INSTANT_FIELD_TRIAL_H_ |