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

Unified Diff: base/metrics/field_trial.h

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/message_loop/message_loop.cc ('k') | base/metrics/field_trial.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/field_trial.h
diff --git a/base/metrics/field_trial.h b/base/metrics/field_trial.h
index 25ee0c19df0dad90feb632708e1643e46ab9fcbc..e2e543947a10a97595b828c63a432c7710aaab79 100644
--- a/base/metrics/field_trial.h
+++ b/base/metrics/field_trial.h
@@ -291,7 +291,8 @@ class BASE_EXPORT FieldTrial : public RefCounted<FieldTrial> {
class BASE_EXPORT FieldTrialList {
public:
// Specifies whether field trials should be activated (marked as "used"), when
- // created using |CreateTrialsFromString()|.
+ // created using |CreateTrialsFromString()|. Has no effect on trials that are
+ // prefixed with |kActivationMarker|, which will always be activated."
enum FieldTrialActivationMode {
DONT_ACTIVATE_TRIALS,
ACTIVATE_TRIALS,
@@ -302,6 +303,10 @@ class BASE_EXPORT FieldTrialList {
// second process to mimic our state (i.e., provide the same group name).
static const char kPersistentStringSeparator; // Currently a slash.
+ // Define a marker character to be used as a prefix to a trial name on the
+ // command line which forces its activation.
+ static const char kActivationMarker; // Currently an asterisk.
+
// Year that is guaranteed to not be expired when instantiating a field trial
// via |FactoryGetFieldTrial()|. Set to two years from the build date.
static int kNoExpirationYear;
@@ -412,9 +417,10 @@ class BASE_EXPORT FieldTrialList {
// used in a non-browser process, to carry randomly selected state in a
// browser process into this non-browser process, but could also be invoked
// through a command line argument to the browser process. The created field
- // trials are marked as "used" for the purposes of active trial reporting if
- // |mode| is ACTIVATE_TRIALS. Trial names in |ignored_trial_names| are ignored
- // when parsing |prior_trials|.
+ // trials are all marked as "used" for the purposes of active trial reporting
+ // if |mode| is ACTIVATE_TRIALS, otherwise each trial will be marked as "used"
+ // if it is prefixed with |kActivationMarker|. Trial names in
+ // |ignored_trial_names| are ignored when parsing |prior_trials|.
static bool CreateTrialsFromString(
const std::string& prior_trials,
FieldTrialActivationMode mode,
« no previous file with comments | « base/message_loop/message_loop.cc ('k') | base/metrics/field_trial.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698