summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/browser_main.cc')
-rw-r--r--chrome/browser/browser_main.cc26
1 files changed, 16 insertions, 10 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index cb05347..df290e3 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -195,14 +195,6 @@ void BrowserMainParts::EarlyInitialization() {
if (parsed_command_line().HasSwitch(switches::kEnableBenchmarking))
base::FieldTrial::EnableBenchmarking();
- // Note: make sure to call ConnectionFieldTrial() before
- // ProxyConnectionsFieldTrial().
- ConnectionFieldTrial();
- SocketTimeoutFieldTrial();
- ProxyConnectionsFieldTrial();
- SpdyFieldTrial();
- PrefetchFieldTrial();
- ConnectBackupJobsFieldTrial();
InitializeSSL();
if (parsed_command_line().HasSwitch(switches::kEnableDNSSECCerts))
@@ -225,6 +217,18 @@ void BrowserMainParts::EarlyInitialization() {
PostEarlyInitialization();
}
+// This will be called after the command-line has been mutated by about:flags
+void BrowserMainParts::SetupFieldTrials() {
+ // Note: make sure to call ConnectionFieldTrial() before
+ // ProxyConnectionsFieldTrial().
+ ConnectionFieldTrial();
+ SocketTimeoutFieldTrial();
+ ProxyConnectionsFieldTrial();
+ PrefetchFieldTrial();
+ SpdyFieldTrial();
+ ConnectBackupJobsFieldTrial();
+}
+
// This is an A/B test for the maximum number of persistent connections per
// host. Currently Chrome, Firefox, and IE8 have this value set at 6. Safari
// uses 4, and Fasterfox (a plugin for Firefox that supposedly configures it to
@@ -1251,6 +1255,10 @@ int BrowserMain(const MainFunctionParams& parameters) {
about_flags::ConvertFlagsToSwitches(local_state,
CommandLine::ForCurrentProcess());
+ // Now the command line has been mutated based on about:flags, we can run some
+ // field trials
+ parts->SetupFieldTrials();
+
// Now that all preferences have been registered, set the install date
// for the uninstall metrics if this is our first run. This only actually
// gets used if the user has metrics reporting enabled at uninstall time.
@@ -1398,8 +1406,6 @@ int BrowserMain(const MainFunctionParams& parameters) {
}
#endif
- // Modifies the current command line based on active experiments on
- // about:flags.
Profile* profile = CreateProfile(parameters, user_data_dir);
if (!profile)
return ResultCodes::NORMAL_EXIT;