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

Unified Diff: base/metrics/field_trial.cc

Issue 10382018: Added a SetForced method to allow forcing a new set of group bucketting. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Initial Created 8 years, 8 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
« no previous file with comments | « base/metrics/field_trial.h ('k') | base/metrics/field_trial_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/field_trial.cc
diff --git a/base/metrics/field_trial.cc b/base/metrics/field_trial.cc
index 245f2bf02a6a6e07c4ff0f625c91397f2c04a657..c0e31933550e1b4863d2f12ccfb6a164e1233640 100644
--- a/base/metrics/field_trial.cc
+++ b/base/metrics/field_trial.cc
@@ -170,6 +170,18 @@ void FieldTrial::EnableBenchmarking() {
enable_benchmarking_ = true;
}
+void FieldTrial::SetForced() {
+ DCHECK(!forced_);
+ // Explicit forcing should only be for cases where we dynamically want to
+ // change the bucketting into groups, so there must have been at least one
jar (doing other things) 2012/05/05 00:32:26 I'm not clear what "change the buketting into grou
MAD 2012/05/07 13:48:09 Done.
+ // non-default group appended.
+ DCHECK_GT(next_group_number_, kDefaultGroupNumber + 1);
+
+ // And we must finalize the group choice before we mark ourselves as forced.
+ group();
+ forced_ = true;
+}
+
FieldTrial::~FieldTrial() {}
void FieldTrial::SetGroupChoice(const std::string& name, int number) {
« no previous file with comments | « base/metrics/field_trial.h ('k') | base/metrics/field_trial_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698