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

Unified Diff: net/http/http_stream_factory.cc

Issue 25977005: [SPDY] Do not advertise SPDY/2 by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 2 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 | « net/http/http_stream_factory.h ('k') | net/http/http_stream_factory_impl_request_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory.cc
diff --git a/net/http/http_stream_factory.cc b/net/http/http_stream_factory.cc
index 31d102fde0ba143468713d3b061baa6574a9b89d..fdd830ef1790ade6765726edacb294d8dc0bada6 100644
--- a/net/http/http_stream_factory.cc
+++ b/net/http/http_stream_factory.cc
@@ -157,16 +157,6 @@ bool HttpStreamFactory::HasSpdyExclusion(const HostPortPair& endpoint) {
}
// static
-void HttpStreamFactory::EnableNpnSpdy() {
- set_use_alternate_protocols(true);
- std::vector<NextProto> next_protos;
- next_protos.push_back(kProtoHTTP11);
- next_protos.push_back(kProtoQUIC1SPDY3);
- next_protos.push_back(kProtoSPDY2);
- SetNextProtos(next_protos);
-}
-
-// static
void HttpStreamFactory::EnableNpnHttpOnly() {
// Avoid alternate protocol in this case. Otherwise, browser will try SSL
// and then fallback to http. This introduces extra load.
@@ -182,7 +172,6 @@ void HttpStreamFactory::EnableNpnSpdy3() {
std::vector<NextProto> next_protos;
next_protos.push_back(kProtoHTTP11);
next_protos.push_back(kProtoQUIC1SPDY3);
- next_protos.push_back(kProtoSPDY2);
next_protos.push_back(kProtoSPDY3);
SetNextProtos(next_protos);
}
@@ -193,7 +182,18 @@ void HttpStreamFactory::EnableNpnSpdy31() {
std::vector<NextProto> next_protos;
next_protos.push_back(kProtoHTTP11);
next_protos.push_back(kProtoQUIC1SPDY3);
- next_protos.push_back(kProtoSPDY2);
+ next_protos.push_back(kProtoSPDY3);
+ next_protos.push_back(kProtoSPDY31);
+ SetNextProtos(next_protos);
+}
+
+// static
+void HttpStreamFactory::EnableNpnSpdy31WithSpdy2() {
+ set_use_alternate_protocols(true);
+ std::vector<NextProto> next_protos;
+ next_protos.push_back(kProtoHTTP11);
+ next_protos.push_back(kProtoQUIC1SPDY3);
+ next_protos.push_back(kProtoDeprecatedSPDY2);
next_protos.push_back(kProtoSPDY3);
next_protos.push_back(kProtoSPDY31);
SetNextProtos(next_protos);
@@ -205,7 +205,6 @@ void HttpStreamFactory::EnableNpnSpdy4a2() {
std::vector<NextProto> next_protos;
next_protos.push_back(kProtoHTTP11);
next_protos.push_back(kProtoQUIC1SPDY3);
- next_protos.push_back(kProtoSPDY2);
next_protos.push_back(kProtoSPDY3);
next_protos.push_back(kProtoSPDY31);
next_protos.push_back(kProtoSPDY4a2);
@@ -218,7 +217,6 @@ void HttpStreamFactory::EnableNpnHttp2Draft04() {
std::vector<NextProto> next_protos;
next_protos.push_back(kProtoHTTP11);
next_protos.push_back(kProtoQUIC1SPDY3);
- next_protos.push_back(kProtoSPDY2);
next_protos.push_back(kProtoSPDY3);
next_protos.push_back(kProtoSPDY31);
next_protos.push_back(kProtoSPDY4a2);
« no previous file with comments | « net/http/http_stream_factory.h ('k') | net/http/http_stream_factory_impl_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698