summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-02 22:50:07 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-02 22:50:07 +0000
commiteab00b0e4e18a9fe934e7fe0ad3d9df9ff483f5c (patch)
tree0af80759f8f0641ead54225e73d6d6bca2f7e6a6 /base
parent05a1e555b47f5e6363f37792da047a956ed6633e (diff)
downloadchromium_src-eab00b0e4e18a9fe934e7fe0ad3d9df9ff483f5c.zip
chromium_src-eab00b0e4e18a9fe934e7fe0ad3d9df9ff483f5c.tar.gz
chromium_src-eab00b0e4e18a9fe934e7fe0ad3d9df9ff483f5c.tar.bz2
Improve comments in FieldTrial class.
tbr=mbelshe Review URL: http://codereview.chromium.org/28334 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10743 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/field_trial.h20
1 files changed, 7 insertions, 13 deletions
diff --git a/base/field_trial.h b/base/field_trial.h
index 0d6806f..e0dedaa1 100644
--- a/base/field_trial.h
+++ b/base/field_trial.h
@@ -33,20 +33,14 @@
// // Note, FieldTrials are reference counted, and persist automagically until
// // process teardown, courtesy of their automatic registration in
// // FieldTrialList.
-// trial = new FieldTrial("MemoryExperiment", 1000);
-// group1 = trial->AppendGroup("_high_mem", 20); // 2% this _high_mem group.
-// group2 = trial->AppendGroup("_low_mem", 20); // 2% this _low_mem group.
+// scoped_refptr<FieldTrial> trial = new FieldTrial("MemoryExperiment", 1000);
+// int group1 = trial->AppendGroup("_high_mem", 20); // 2% this _high_mem group.
+// int group2 = trial->AppendGroup("_low_mem", 20); // 2% this _low_mem group.
// // Take action depending of which group we randomly land in.
-// switch (trial->group()) {
-// case group1:
-// ... do something
-// break;
-// case group2:
-// ....
-// break;
-// default:
-// ...
-// }
+// if (trial->group() == group1)
+// SetMemoryModel(HIGH); // Sample setting of browser state.
+// else if (trial->group() == group2)
+// SetMemoryModel(LOW); // Sample alternate setting.
// We then modify any histograms we wish to correlate with our experiment to
// have slighly different names, depending on what group the trial instance