Index: chrome/browser/chrome_browser_main.cc |
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc |
index 4e3f70b6bccd60abbf34d0f88202de66df3ae95c..87ec5c0c462e513212928d1725d657302f2aab6f 100644 |
--- a/chrome/browser/chrome_browser_main.cc |
+++ b/chrome/browser/chrome_browser_main.cc |
@@ -13,6 +13,7 @@ |
#include "base/command_line.h" |
#include "base/debug/crash_logging.h" |
#include "base/debug/debugger.h" |
+#include "base/feature_list.h" |
#include "base/files/file_path.h" |
#include "base/files/file_util.h" |
#include "base/metrics/field_trial.h" |
@@ -684,11 +685,20 @@ void ChromeBrowserMainParts::SetupMetricsAndFieldTrials() { |
<< " list specified."; |
metrics->AddSyntheticTrialObserver(provider); |
} |
+ |
+ scoped_ptr<base::FeatureList> feature_list(new base::FeatureList); |
+ feature_list->InitializeFromCommandLine( |
+ command_line->GetSwitchValueASCII(switches::kEnableFeatures), |
+ command_line->GetSwitchValueASCII(switches::kDisableFeatures)); |
+ |
variations::VariationsService* variations_service = |
browser_process_->variations_service(); |
if (variations_service) |
variations_service->CreateTrialsFromSeed(); |
+ // TODO(asvitkine): Pass |feature_list| to CreateTrialsFromSeed() above. |
+ base::FeatureList::SetInstance(feature_list.Pass()); |
+ |
// This must be called after |local_state_| is initialized. |
browser_field_trials_.SetupFieldTrials(); |