Chromium Code Reviews| 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); |