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

Side by Side Diff: base/metrics/field_trial.h

Issue 23710041: Fix inconsistent FieldTrial group assignment due to float errors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/metrics/field_trial.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // FieldTrial is a class for handling details of statistical experiments 5 // FieldTrial is a class for handling details of statistical experiments
6 // performed by actual users in the field (i.e., in a shipped or beta product). 6 // performed by actual users in the field (i.e., in a shipped or beta product).
7 // All code is called exclusively on the UI thread currently. 7 // All code is called exclusively on the UI thread currently.
8 // 8 //
9 // The simplest example is an experiment to see whether one of two options 9 // The simplest example is an experiment to see whether one of two options
10 // produces "better" results across our user population. In that scenario, UMA 10 // produces "better" results across our user population. In that scenario, UMA
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, ActiveGroupsNotFinalized); 166 FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, ActiveGroupsNotFinalized);
167 FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, Save); 167 FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, Save);
168 FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, DuplicateRestore); 168 FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, DuplicateRestore);
169 FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, HashClientId); 169 FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, HashClientId);
170 FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, HashClientIdIsUniform); 170 FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, HashClientIdIsUniform);
171 FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, NameGroupIds); 171 FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, NameGroupIds);
172 FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, SetForcedTurnFeatureOff); 172 FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, SetForcedTurnFeatureOff);
173 FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, SetForcedTurnFeatureOn); 173 FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, SetForcedTurnFeatureOn);
174 FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, SetForcedChangeDefault_Default); 174 FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, SetForcedChangeDefault_Default);
175 FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, SetForcedChangeDefault_NonDefault); 175 FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, SetForcedChangeDefault_NonDefault);
176 FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, FloatBoundariesGiveEqualGroupSizes);
177 FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, DoesNotSurpassTotalProbability);
176 178
177 friend class base::FieldTrialList; 179 friend class base::FieldTrialList;
178 180
179 friend class RefCounted<FieldTrial>; 181 friend class RefCounted<FieldTrial>;
180 182
181 // This is the group number of the 'default' group when a choice wasn't forced 183 // This is the group number of the 'default' group when a choice wasn't forced
182 // by a call to FieldTrialList::CreateFieldTrial. It is kept private so that 184 // by a call to FieldTrialList::CreateFieldTrial. It is kept private so that
183 // consumers don't use it by mistake in cases where the group was forced. 185 // consumers don't use it by mistake in cases where the group was forced.
184 static const int kDefaultGroupNumber; 186 static const int kDefaultGroupNumber;
185 187
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 452
451 // List of observers to be notified when a group is selected for a FieldTrial. 453 // List of observers to be notified when a group is selected for a FieldTrial.
452 scoped_refptr<ObserverListThreadSafe<Observer> > observer_list_; 454 scoped_refptr<ObserverListThreadSafe<Observer> > observer_list_;
453 455
454 DISALLOW_COPY_AND_ASSIGN(FieldTrialList); 456 DISALLOW_COPY_AND_ASSIGN(FieldTrialList);
455 }; 457 };
456 458
457 } // namespace base 459 } // namespace base
458 460
459 #endif // BASE_METRICS_FIELD_TRIAL_H_ 461 #endif // BASE_METRICS_FIELD_TRIAL_H_
OLDNEW
« no previous file with comments | « no previous file | base/metrics/field_trial.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698