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

Unified Diff: net/http/http_network_layer.cc

Issue 9618002: SPDY - integration of spdy/3 code. (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 | « net/base/net_test_suite.cc ('k') | net/http/http_network_transaction_spdy21_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_layer.cc
===================================================================
--- net/http/http_network_layer.cc (revision 126086)
+++ net/http/http_network_layer.cc (working copy)
@@ -46,7 +46,7 @@
static const char kExclude[] = "exclude"; // Hosts to exclude
static const char kDisableCompression[] = "no-compress";
static const char kDisableAltProtocols[] = "no-alt-protocols";
- static const char kEnableVersionOne[] = "v1";
+ static const char kEnableVersionThree[] = "v3";
static const char kForceAltProtocols[] = "force-alt-protocols";
static const char kSingleDomain[] = "single-domain";
@@ -84,10 +84,12 @@
if (option == kOff) {
HttpStreamFactory::set_spdy_enabled(false);
} else if (option == kDisableSSL) {
+ SpdySession::set_default_protocol(SSLClientSocket::kProtoSPDY2);
SpdySession::SetSSLMode(false); // Disable SSL
HttpStreamFactory::set_force_spdy_over_ssl(false);
HttpStreamFactory::set_force_spdy_always(true);
} else if (option == kSSL) {
+ SpdySession::set_default_protocol(SSLClientSocket::kProtoSPDY2);
HttpStreamFactory::set_force_spdy_over_ssl(true);
HttpStreamFactory::set_force_spdy_always(true);
} else if (option == kDisablePing) {
@@ -102,6 +104,13 @@
next_protos.push_back("http/1.1");
next_protos.push_back("spdy/2");
HttpStreamFactory::SetNextProtos(next_protos);
+ } else if (option == kEnableVersionThree) {
+ std::vector<std::string> 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");
+ HttpStreamFactory::SetNextProtos(next_protos);
} else if (option == kEnableNpnHttpOnly) {
// Avoid alternate protocol in this case. Otherwise, browser will try SSL
// and then fallback to http. This introduces extra load.
@@ -110,13 +119,6 @@
next_protos.push_back("http/1.1");
next_protos.push_back("http1.1");
HttpStreamFactory::SetNextProtos(next_protos);
- } else if (option == kEnableVersionOne) {
- spdy::SpdyFramer::set_protocol_version(1);
- std::vector<std::string> next_protos;
- // This is a temporary hack to pretend we support version 1.
- next_protos.push_back("http/1.1");
- next_protos.push_back("spdy/1");
- HttpStreamFactory::SetNextProtos(next_protos);
} else if (option == kDisableAltProtocols) {
use_alt_protocols = false;
HttpStreamFactory::set_use_alternate_protocols(false);
« no previous file with comments | « net/base/net_test_suite.cc ('k') | net/http/http_network_transaction_spdy21_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698