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

Unified Diff: net/http/http_network_session.cc

Issue 1387363004: Disable HTTP/2 over NPN (with OpenSSL). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re: #7. Created 5 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_network_session.h ('k') | net/http/http_network_transaction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_session.cc
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc
index 777d721e7a229a784a07bb42c42b2e9770d45a58..d843e01f853f50dc460739789103a8ba5eb48f32 100644
--- a/net/http/http_network_session.cc
+++ b/net/http/http_network_session.cc
@@ -320,11 +320,20 @@ bool HttpNetworkSession::IsProtocolEnabled(AlternateProtocol protocol) const {
protocol - ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION];
}
-void HttpNetworkSession::GetNextProtos(NextProtoVector* next_protos) const {
+void HttpNetworkSession::GetAlpnProtos(NextProtoVector* alpn_protos) const {
if (HttpStreamFactory::spdy_enabled()) {
- *next_protos = next_protos_;
+ *alpn_protos = next_protos_;
} else {
- next_protos->clear();
+ alpn_protos->clear();
+ }
+}
+
+void HttpNetworkSession::GetNpnProtos(NextProtoVector* npn_protos) const {
+ if (HttpStreamFactory::spdy_enabled()) {
+ *npn_protos = next_protos_;
+ DisableHTTP2(npn_protos);
+ } else {
+ npn_protos->clear();
}
}
« no previous file with comments | « net/http/http_network_session.h ('k') | net/http/http_network_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698