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

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
Index: net/http/http_network_layer.cc
===================================================================
--- net/http/http_network_layer.cc (revision 125802)
+++ 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";
@@ -102,6 +102,12 @@
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");
Ryan Hamilton 2012/03/09 19:09:58 Why is spdy/2.1 not in this list?
ramant (doing other things) 2012/03/10 01:14:09 I thought if we enable spdy/3, we will disable spd
+ 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 +116,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);

Powered by Google App Engine
This is Rietveld 408576698