Index: base/metrics/field_trial.h |
diff --git a/base/metrics/field_trial.h b/base/metrics/field_trial.h |
index 5a4375ee65ed1510b00b7062b0adae735ab3d794..163a5f0c472b194c43d482eb90d2c434ab9f5922 100644 |
--- a/base/metrics/field_trial.h |
+++ b/base/metrics/field_trial.h |
@@ -289,6 +289,11 @@ class BASE_EXPORT FieldTrial : public RefCounted<FieldTrial> { |
// Only one instance of this class exists. |
class BASE_EXPORT FieldTrialList { |
public: |
+ // A callback that returns true if |name| describes a field trial that should |
+ // be accepted by the method it was passed to. |
+ typedef base::Callback<bool(const std::string& name)> |
Alexei Svitkine (slow)
2014/02/11 22:44:02
The header for this should probably be included.
gab
2014/02/11 22:53:55
Done.
|
+ IsAcceptedFieldTrialCallback; |
+ |
// Specifies whether field trials should be activated (marked as "used"), when |
// created using |CreateTrialsFromString()|. |
enum FieldTrialActivationMode { |
@@ -412,9 +417,12 @@ class BASE_EXPORT FieldTrialList { |
// 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. |
- static bool CreateTrialsFromString(const std::string& prior_trials, |
- FieldTrialActivationMode mode); |
+ // |mode| is ACTIVATE_TRIALS. If |is_accepted_callback| is not null: field |
+ // trials for which |is_accepted_callback| returns false are ignored. |
+ static bool CreateTrialsFromString( |
+ const std::string& prior_trials, |
+ FieldTrialActivationMode mode, |
+ const IsAcceptedFieldTrialCallback& is_accepted_callback); |
// Create a FieldTrial with the given |name| and using 100% probability for |
// the FieldTrial, force FieldTrial to have the same group string as |