summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-27 22:30:46 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-27 22:30:46 +0000
commitbca09b99821e2a20c8123398646fb4e7fa052944 (patch)
treee54276e70bffe980d04b2e49778237ede2d939b0 /net
parent369a348a2e662a056266918ff65e79f7d81653cf (diff)
downloadchromium_src-bca09b99821e2a20c8123398646fb4e7fa052944.zip
chromium_src-bca09b99821e2a20c8123398646fb4e7fa052944.tar.gz
chromium_src-bca09b99821e2a20c8123398646fb4e7fa052944.tar.bz2
[SPDY] Add switch and about:flags entry to enable SPDY/4a2
BUG=230124 R=darin@chromium.org, rch@chromium.org Review URL: https://codereview.chromium.org/17764006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209012 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/http/http_stream_factory.cc12
-rw-r--r--net/http/http_stream_factory.h4
2 files changed, 16 insertions, 0 deletions
diff --git a/net/http/http_stream_factory.cc b/net/http/http_stream_factory.cc
index 0dbd296..1c707f2 100644
--- a/net/http/http_stream_factory.cc
+++ b/net/http/http_stream_factory.cc
@@ -183,6 +183,18 @@ void HttpStreamFactory::EnableNpnSpdy31() {
}
// static
+void HttpStreamFactory::EnableNpnSpdy4a2() {
+ set_use_alternate_protocols(true);
+ std::vector<std::string> next_protos;
+ next_protos.push_back("http/1.1");
+ next_protos.push_back("spdy/2");
+ next_protos.push_back("spdy/3");
+ next_protos.push_back("spdy/3.1");
+ next_protos.push_back("spdy/4a2");
+ SetNextProtos(next_protos);
+}
+
+// static
void HttpStreamFactory::SetNextProtos(const std::vector<std::string>& value) {
if (!next_protos_)
next_protos_ = new std::vector<std::string>;
diff --git a/net/http/http_stream_factory.h b/net/http/http_stream_factory.h
index 3fa31b8..bef3b5d 100644
--- a/net/http/http_stream_factory.h
+++ b/net/http/http_stream_factory.h
@@ -274,6 +274,10 @@ class NET_EXPORT HttpStreamFactory {
// supported via NPN or Alternate-Protocol.
static void EnableNpnSpdy31();
+ // Sets http/1.1, quic, spdy/2, spdy/3, spdy/3.1, and spdy/4a2 as
+ // the protocols supported via NPN or Alternate-Protocol.
+ static void EnableNpnSpdy4a2();
+
// Sets the protocols supported by NPN (next protocol negotiation) during the
// SSL handshake as well as by HTTP Alternate-Protocol.
static void SetNextProtos(const std::vector<std::string>& value);