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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 2036193002: Allow overriding variation parameter via chrome://flags. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build deps #2 Created 4 years, 6 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 | « chrome/browser/about_flags_unittest.cc ('k') | components/flags_ui/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 3d200cec6f6d192c01bd6a73b2825f2c93a07a4b..c64ee2e1c17ea09ac65a3da5d69d106a9f625e8f 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -720,6 +720,11 @@ void ChromeBrowserMainParts::SetupMetricsAndFieldTrials() {
metrics->AddSyntheticTrialObserver(provider);
}
+ // Associate parameters chosen in about:flags and create trial/group for them.
+ flags_ui::PrefServiceFlagsStorage flags_storage(
+ g_browser_process->local_state());
+ about_flags::RegisterAllFeatureVariationParameters(&flags_storage);
+
std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList);
feature_list->InitializeFromCommandLine(
command_line->GetSwitchValueASCII(switches::kEnableFeatures),
@@ -972,9 +977,9 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
{
TRACE_EVENT0("startup",
"ChromeBrowserMainParts::PreCreateThreadsImpl:ConvertFlags");
- flags_ui::PrefServiceFlagsStorage flags_storage_(
+ flags_ui::PrefServiceFlagsStorage flags_storage(
g_browser_process->local_state());
- about_flags::ConvertFlagsToSwitches(&flags_storage_,
+ about_flags::ConvertFlagsToSwitches(&flags_storage,
base::CommandLine::ForCurrentProcess(),
flags_ui::kAddSentinels);
}
« no previous file with comments | « chrome/browser/about_flags_unittest.cc ('k') | components/flags_ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698