Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(692)

Unified Diff: chrome/browser/instant/instant_field_trial.h

Issue 7337007: Introduce a field trial for Instant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698