From eab00b0e4e18a9fe934e7fe0ad3d9df9ff483f5c Mon Sep 17 00:00:00 2001 From: "jar@chromium.org" Date: Mon, 2 Mar 2009 22:50:07 +0000 Subject: 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 --- base/field_trial.h | 20 +++++++------------- 1 file 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 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 -- cgit v1.1