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

Unified Diff: net/http/http_stream_factory_impl_job.cc

Issue 1097773003: Clean up NPN/ALPN-related SSLClientSocket bits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rsleevi comment Created 5 years, 8 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_proxy_client_socket_pool.cc ('k') | net/socket/next_proto.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl_job.cc
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index 4ce799e8135cfe7d7a8db0808af86314a751577d..b394792f7c7bdb6ed58ed8f4d3cd5bfd0ea383b5 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -948,9 +948,8 @@ int HttpStreamFactoryImpl::Job::DoInitConnectionComplete(int result) {
if (ssl_started && (result == OK || IsCertificateError(result))) {
if (using_quic_ && result == OK) {
was_npn_negotiated_ = true;
- NextProto protocol_negotiated =
+ protocol_negotiated_ =
SSLClientSocket::NextProtoFromString("quic/1+spdy/3");
- protocol_negotiated_ = protocol_negotiated;
} else {
SSLClientSocket* ssl_socket =
static_cast<SSLClientSocket*>(connection_->socket());
@@ -959,14 +958,12 @@ int HttpStreamFactoryImpl::Job::DoInitConnectionComplete(int result) {
std::string proto;
SSLClientSocket::NextProtoStatus status =
ssl_socket->GetNextProto(&proto);
- NextProto protocol_negotiated =
- SSLClientSocket::NextProtoFromString(proto);
- protocol_negotiated_ = protocol_negotiated;
+ protocol_negotiated_ = SSLClientSocket::NextProtoFromString(proto);
net_log_.AddEvent(
NetLog::TYPE_HTTP_STREAM_REQUEST_PROTO,
base::Bind(&NetLogHttpStreamProtoCallback,
status, &proto));
- if (ssl_socket->was_spdy_negotiated())
+ if (NextProtoIsSPDY(protocol_negotiated_))
SwitchToSpdyMode();
}
}
« no previous file with comments | « net/http/http_proxy_client_socket_pool.cc ('k') | net/socket/next_proto.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698