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

Unified Diff: chrome/browser/browser_main.cc

Issue 6354023: Added a function to BrowserMainParts that is called after about_flags has con... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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/browser_main.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « chrome/browser/browser_main.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698