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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 9766021: SPDY - Added enabling of SPDY/3 to about:flags. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
===================================================================
--- chrome/browser/chrome_browser_main.cc (revision 127896)
+++ chrome/browser/chrome_browser_main.cc (working copy)
@@ -825,6 +825,35 @@
if (value > 0)
net::SpdySession::set_max_concurrent_streams(value);
}
+
+ if (parsed_command_line().HasSwitch(switches::kEnableSpdy3)) {
+ net::HttpStreamFactory::EnableSPDY3();
+ } else if (parsed_command_line().HasSwitch(
+ switches::kEnableSpdyFlowControl)) {
+ net::HttpStreamFactory::EnableFlowControl();
+ } else {
+ const base::FieldTrial::Probability kSpdyDivisor = 100;
+ base::FieldTrial::Probability flow_control_probability = 5;
+ base::FieldTrial::Probability spdy3_probability = 5;
+
+ // After October 30, 2012 builds, it will always be in default group
+ // (disable_spdy_protocol_test).
+ scoped_refptr<base::FieldTrial> trial(
+ new base::FieldTrial(
+ "SpdyProtocolTest", kSpdyDivisor, "disable_spdy_protocol_test",
+ 2012, 10, 30));
Ryan Hamilton 2012/03/22 16:30:21 October seems like a long time from now, so this i
ramant (doing other things) 2012/03/22 16:38:24 Just to be on safe side, set the probability to 0.
+
+ int spdy3_grp = trial->AppendGroup("spdy3", spdy3_probability);
+ int flow_control_grp = trial->AppendGroup(
+ "flow_control", flow_control_probability);
+
+ int trial_grp = trial->group();
+ if (trial_grp == spdy3_grp) {
+ net::HttpStreamFactory::EnableSPDY3();
+ } else if (trial_grp == flow_control_grp) {
+ net::HttpStreamFactory::EnableFlowControl();
+ }
+ }
}
// If --socket-reuse-policy is not specified, run an A/B test for choosing the
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698