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

Unified Diff: base/feature_list.h

Issue 1941963002: Add variations params api to get params from features. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « base/BUILD.gn ('k') | base/feature_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/feature_list.h
diff --git a/base/feature_list.h b/base/feature_list.h
index 44aeb4b88b7e531eb3b402724578789e471dc1ad..2a47427fb268e6d63cba9005fb31727ed326aa2f 100644
--- a/base/feature_list.h
+++ b/base/feature_list.h
@@ -141,6 +141,10 @@ class BASE_EXPORT FeatureList {
// struct, which is checked in builds with DCHECKs enabled.
static bool IsEnabled(const Feature& feature);
+ // Returns the field trial associated with the given |feature|. Must only be
+ // called after the singleton instance has been registered via SetInstance().
+ static FieldTrial* GetFieldTrial(const Feature& feature);
+
// Splits a comma-separated string containing feature names into a vector.
static std::vector<std::string> SplitFeatureListString(
const std::string& input);
@@ -200,6 +204,12 @@ class BASE_EXPORT FeatureList {
// Requires the FeatureList to have already been fully initialized.
bool IsFeatureEnabled(const Feature& feature);
+ // Returns the field trial associated with the given |feature|. This is
+ // invoked by the public FeatureList::GetFieldTrial() static function on the
+ // global singleton. Requires the FeatureList to have already been fully
+ // initialized.
+ base::FieldTrial* GetAssociatedFieldTrial(const Feature& feature);
+
// For each feature name in comma-separated list of strings |feature_list|,
// registers an override with the specified |overridden_state|. Also, will
// associate an optional named field trial if the entry is of the format
« no previous file with comments | « base/BUILD.gn ('k') | base/feature_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698