Chromium Code Reviews| Index: chrome/browser/browser_main.cc |
| =================================================================== |
| --- chrome/browser/browser_main.cc (revision 72523) |
| +++ chrome/browser/browser_main.cc (working copy) |
| @@ -195,14 +195,6 @@ |
| if (parsed_command_line().HasSwitch(switches::kEnableBenchmarking)) |
| base::FieldTrial::EnableBenchmarking(); |
|
cbentzel
2011/01/25 22:51:41
Why didn't this move to SetupFieldTrials? Did it n
dominich
2011/01/25 22:59:26
My first thought was that it isn't enabled through
|
| - // 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 @@ |
| 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 @@ |
| about_flags::ConvertFlagsToSwitches(local_state, |
| CommandLine::ForCurrentProcess()); |
| + // Now the command line has been mutated based on about:flags, we can run some |
| + // field trials |
|
Nico
2011/01/25 22:58:07
Nit "." at end of comment
|
| + 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 @@ |
| } |
| #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; |