Chromium Code Reviews| Index: net/http/http_stream_factory.cc |
| diff --git a/net/http/http_stream_factory.cc b/net/http/http_stream_factory.cc |
| index 855be1161a673b02642ba512b8708512302a66b6..edcb88c0357ec562d5979872766cbb713631cb44 100644 |
| --- a/net/http/http_stream_factory.cc |
| +++ b/net/http/http_stream_factory.cc |
| @@ -180,6 +180,17 @@ void HttpStreamFactory::EnableNpnSpdy31() { |
| } |
| // static |
| +void HttpStreamFactory::EnableNpnSpdy4a1() { |
| + 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"); |
|
Ryan Hamilton
2013/04/10 23:07:53
We could also consider adding spdy/3.1 in this lis
akalin
2013/04/10 23:20:04
Done.
|
| + next_protos.push_back("spdy/4a1"); |
| + SetNextProtos(next_protos); |
| +} |
| + |
| +// static |
| void HttpStreamFactory::SetNextProtos(const std::vector<std::string>& value) { |
| if (!next_protos_) |
| next_protos_ = new std::vector<std::string>; |
| @@ -200,6 +211,8 @@ void HttpStreamFactory::SetNextProtos(const std::vector<std::string>& value) { |
| enabled_protocols_[NPN_SPDY_3] = true; |
| } else if (value[i] == "spdy/3.1") { |
| enabled_protocols_[NPN_SPDY_3_1] = true; |
| + } else if (value[i] == "spdy/4a1") { |
| + enabled_protocols_[NPN_SPDY_4a1] = true; |
| } else if (value[i] == "quic") { |
| enabled_protocols_[QUIC] = true; |
| } |