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

Unified Diff: base/feature_list.h

Issue 1408783002: Support base::Feature entries in chrome://flags. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 years, 2 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/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 0f91a3efa877fb009b631cfeaebd3c39ac104f83..acdfe54592afbb5ee07fdc550cca25dd0b64c1c0 100644
--- a/base/feature_list.h
+++ b/base/feature_list.h
@@ -7,6 +7,7 @@
#include <map>
#include <string>
+#include <vector>
#include "base/base_export.h"
#include "base/basictypes.h"
@@ -44,7 +45,7 @@ struct BASE_EXPORT Feature {
// The basic use case is for any feature that can be toggled (e.g. through
// command-line or an experiment) to have a defined Feature struct, e.g.:
//
-// struct base::Feature kMyGreatFeature {
+// const base::Feature kMyGreatFeature {
// "MyGreatFeature", base::FEATURE_ENABLED_BY_DEFAULT
// };
//
@@ -122,6 +123,10 @@ class BASE_EXPORT FeatureList {
// struct, which is checked in builds with DCHECKs enabled.
static bool IsEnabled(const Feature& feature);
+ // Splits a comma-separated string containing feature names into a vector.
+ static std::vector<std::string> SplitFeatureListString(
+ const std::string& input);
+
// Returns the singleton instance of FeatureList. Will return null until an
// instance is registered via SetInstance().
static FeatureList* GetInstance();
« no previous file with comments | « no previous file | base/feature_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698