From 3231b619a191e753e8b64c2061a1d5e2c99aa8b7 Mon Sep 17 00:00:00 2001 From: "rtenneti@chromium.org" Date: Fri, 23 Mar 2012 05:57:54 +0000 Subject: SPDY - Added enabling of SPDY/3 and SPDY flow control to about:flags. Added command line switches --enable-spdy3 to enable SPDY/3 and --enable-spdy-flow-control to enable flow control (SPDY/2.1). Added Field Trials for SPDY/2.1 and SPDY/3. The FieldTrials are enabled when SPDY/3 and flow control command line options are not chosen. Removed --use-spdy=v3 and --use-spdy=flow-control options. BUG=118440,119205 R=willchan TEST=Netowrk unit tests and browser tests. Enable SPDY/3 in about:flags and see in chrome://net-internals that SPDY/2, SPDY/2.1 and SPDY/3 are displayed as the protocols supported. Enable SPDY FLow Control in about:flags and see in chrome://net-internals that SPDY/2 and SPDY/2.1 are displayed as the protocols supported. Review URL: http://codereview.chromium.org/9766021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128420 0039d316-1c4b-4281-b951-d872f2087c98 --- net/http/http_stream_factory.cc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'net/http/http_stream_factory.cc') diff --git a/net/http/http_stream_factory.cc b/net/http/http_stream_factory.cc index dda9951..dee1874 100644 --- a/net/http/http_stream_factory.cc +++ b/net/http/http_stream_factory.cc @@ -149,6 +149,25 @@ bool HttpStreamFactory::HasSpdyExclusion(const HostPortPair& endpoint) { } // static +void HttpStreamFactory::EnableFlowControl() { + std::vector next_protos; + next_protos.push_back("http/1.1"); + next_protos.push_back("spdy/2"); + next_protos.push_back("spdy/2.1"); + SetNextProtos(next_protos); +} + +// static +void HttpStreamFactory::EnableSPDY3() { + std::vector next_protos; + next_protos.push_back("http/1.1"); + next_protos.push_back("spdy/2"); + next_protos.push_back("spdy/2.1"); + next_protos.push_back("spdy/3"); + SetNextProtos(next_protos); +} + +// static void HttpStreamFactory::SetNextProtos(const std::vector& value) { if (!next_protos_) next_protos_ = new std::vector; -- cgit v1.1