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

Unified Diff: base/metrics/field_trial.h

Issue 17945002: Make --force-fieldtrials not activate them in the browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 6 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 | « no previous file | 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
===================================================================
--- base/metrics/field_trial.h (revision 209705)
+++ base/metrics/field_trial.h (working copy)
@@ -295,6 +295,13 @@
// Only one instance of this class exists.
class BASE_EXPORT FieldTrialList {
public:
+ // Specifies whether field trials should be activated (marked as "used"), when
+ // created using |CreateTrialsFromString()|.
+ enum FieldTrialActivationMode {
+ DONT_ACTIVATE_TRIALS,
+ ACTIVATE_TRIALS,
+ };
+
// Define a separator character to use when creating a persistent form of an
// instance. This is intended for use as a command line argument, passed to a
// second process to mimic our state (i.e., provide the same group name).
@@ -392,8 +399,10 @@
// 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.
- static bool CreateTrialsFromString(const std::string& prior_trials);
+ // trials are marked as "used" for the purposes of active trial reporting if
+ // |mode| is ACTIVATE_TRIALS.
+ static bool CreateTrialsFromString(const std::string& prior_trials,
+ FieldTrialActivationMode mode);
// Create a FieldTrial with the given |name| and using 100% probability for
// the FieldTrial, force FieldTrial to have the same group string as
« 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