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

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

Issue 8510027: base: export GetBuildTime (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 1 month 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 | « base/build_time_unittest.cc ('k') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 friend class base::FieldTrialList; 178 friend class base::FieldTrialList;
179 179
180 friend class RefCounted<FieldTrial>; 180 friend class RefCounted<FieldTrial>;
181 181
182 virtual ~FieldTrial(); 182 virtual ~FieldTrial();
183 183
184 // Returns the group_name. A winner need not have been chosen. 184 // Returns the group_name. A winner need not have been chosen.
185 std::string group_name_internal() const { return group_name_; } 185 std::string group_name_internal() const { return group_name_; }
186 186
187 // Get build time.
188 static Time GetBuildTime();
189
190 // Calculates a uniformly-distributed double between [0.0, 1.0) given 187 // Calculates a uniformly-distributed double between [0.0, 1.0) given
191 // a |client_id| and a |trial_name| (the latter is used as salt to avoid 188 // a |client_id| and a |trial_name| (the latter is used as salt to avoid
192 // separate one-time randomized trials from all having the same results). 189 // separate one-time randomized trials from all having the same results).
193 static double HashClientId(const std::string& client_id, 190 static double HashClientId(const std::string& client_id,
194 const std::string& trial_name); 191 const std::string& trial_name);
195 192
196 // The name of the field trial, as can be found via the FieldTrialList. 193 // The name of the field trial, as can be found via the FieldTrialList.
197 const std::string name_; 194 const std::string name_;
198 195
199 // The maximum sum of all probabilities supplied, which corresponds to 100%. 196 // The maximum sum of all probabilities supplied, which corresponds to 100%.
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 379
383 // List of observers to be notified when a group is selected for a FieldTrial. 380 // List of observers to be notified when a group is selected for a FieldTrial.
384 ObserverList<Observer> observer_list_; 381 ObserverList<Observer> observer_list_;
385 382
386 DISALLOW_COPY_AND_ASSIGN(FieldTrialList); 383 DISALLOW_COPY_AND_ASSIGN(FieldTrialList);
387 }; 384 };
388 385
389 } // namespace base 386 } // namespace base
390 387
391 #endif // BASE_METRICS_FIELD_TRIAL_H_ 388 #endif // BASE_METRICS_FIELD_TRIAL_H_
OLDNEW
« no previous file with comments | « base/build_time_unittest.cc ('k') | base/metrics/field_trial.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698