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

Unified Diff: base/metrics/field_trial.h

Issue 2546653002: Store and retrieve features from shared memory (Closed)
Patch Set: add comment Created 4 years 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/feature_list_unittest.cc ('k') | 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 01bb35c1ddeea7f7a177b29d12753165ead6b8b7..7fedb375ae43ecebdafc941fcdcd257ff6faf57a 100644
--- a/base/metrics/field_trial.h
+++ b/base/metrics/field_trial.h
@@ -65,6 +65,7 @@
#include "base/base_export.h"
#include "base/command_line.h"
+#include "base/feature_list.h"
#include "base/files/file.h"
#include "base/gtest_prod_util.h"
#include "base/macros.h"
@@ -508,6 +509,14 @@ class BASE_EXPORT FieldTrialList {
const char* field_trial_handle_switch,
int fd_key);
+ // Creates base::Feature overrides from the command line by first trying to
+ // use shared memory and then falling back to the command line if it fails.
+ static void CreateFeaturesFromCommandLine(
+ const base::CommandLine& command_line,
+ const char* enable_features_switch,
+ const char* disable_features_switch,
+ FeatureList* feature_list);
+
#if defined(OS_WIN)
// On Windows, we need to explicitly pass down any handles to be inherited.
// This function adds the shared memory handle to field trial state to the
@@ -527,6 +536,8 @@ class BASE_EXPORT FieldTrialList {
// Needs the |field_trial_handle_switch| argument to be passed in since base/
// can't depend on content/.
static void CopyFieldTrialStateToFlags(const char* field_trial_handle_switch,
+ const char* enable_features_switch,
+ const char* disable_features_switch,
base::CommandLine* cmd_line);
// Create a FieldTrial with the given |name| and using 100% probability for
« no previous file with comments | « base/feature_list_unittest.cc ('k') | base/metrics/field_trial.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698