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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 17945002: Make --force-fieldtrials not activate them in the browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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
Index: chrome/browser/chrome_browser_main.cc
===================================================================
--- chrome/browser/chrome_browser_main.cc (revision 209705)
+++ chrome/browser/chrome_browser_main.cc (working copy)
@@ -610,11 +610,13 @@
// Ensure any field trials specified on the command line are initialized.
// Also stop the metrics service so that we don't pollute UMA.
if (command_line->HasSwitch(switches::kForceFieldTrials)) {
- std::string persistent = command_line->GetSwitchValueASCII(
- switches::kForceFieldTrials);
- bool ret = base::FieldTrialList::CreateTrialsFromString(persistent);
- CHECK(ret) << "Invalid --" << switches::kForceFieldTrials <<
- " list specified.";
+ // Create field trials without activating them, so that this behaves in a
+ // consistent manner with field trials created from the server.
+ bool result = base::FieldTrialList::CreateTrialsFromString(
+ command_line->GetSwitchValueASCII(switches::kForceFieldTrials),
+ base::FieldTrialList::DONT_ACTIVATE_TRIALS);
+ CHECK(result) << "Invalid --" << switches::kForceFieldTrials
+ << " list specified.";
}
chrome_variations::VariationsService* variations_service =
« no previous file with comments | « base/metrics/field_trial_unittest.cc ('k') | chrome/browser/extensions/api/metrics_private/metrics_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698