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

Unified Diff: base/metrics/field_trial.h

Issue 1366673002: Introduce a new FieldTrialList::IsTrialActive() API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nit. Created 5 years, 3 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
diff --git a/base/metrics/field_trial.h b/base/metrics/field_trial.h
index 93521288b7af4386a2a370b8b8e8658c852a6c20..4b35c1958dc41103e0b5c0fd0753e38553f412b6 100644
--- a/base/metrics/field_trial.h
+++ b/base/metrics/field_trial.h
@@ -396,22 +396,25 @@ class BASE_EXPORT FieldTrialList {
uint32 randomization_seed,
int* default_group_number);
- // The Find() method can be used to test to see if a named Trial was already
+ // The Find() method can be used to test to see if a named trial was already
// registered, or to retrieve a pointer to it from the global map.
- static FieldTrial* Find(const std::string& name);
+ static FieldTrial* Find(const std::string& trial_name);
// Returns the group number chosen for the named trial, or
// FieldTrial::kNotFinalized if the trial does not exist.
- static int FindValue(const std::string& name);
+ static int FindValue(const std::string& trial_name);
// Returns the group name chosen for the named trial, or the empty string if
// the trial does not exist. The first call of this function on a given field
// trial will mark it as active, so that its state will be reported with usage
// metrics, crashes, etc.
- static std::string FindFullName(const std::string& name);
+ static std::string FindFullName(const std::string& trial_name);
// Returns true if the named trial has been registered.
- static bool TrialExists(const std::string& name);
+ static bool TrialExists(const std::string& trial_name);
+
+ // Returns true if the named trial exists and has been activated.
+ static bool IsTrialActive(const std::string& trial_name);
// Creates a persistent representation of active FieldTrial instances for
// resurrection in another process. This allows randomization to be done in
« 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