Chromium Code Reviews| Index: net/socket/ssl_client_socket_pool.cc |
| diff --git a/net/socket/ssl_client_socket_pool.cc b/net/socket/ssl_client_socket_pool.cc |
| index e6c770c6d8bc9f6afbd6a9ecad2dd8c8049c33e8..53b3d59c4e295318dafa27163668ec4d052c69a0 100644 |
| --- a/net/socket/ssl_client_socket_pool.cc |
| +++ b/net/socket/ssl_client_socket_pool.cc |
| @@ -329,33 +329,10 @@ int SSLConnectJob::DoSSLConnectComplete(int result) { |
| connect_timing_.ssl_end = base::TimeTicks::Now(); |
| - SSLClientSocket::NextProtoStatus status = |
| - SSLClientSocket::kNextProtoUnsupported; |
| - std::string proto; |
| - // GetNextProto will fail and and trigger a NOTREACHED if we pass in a socket |
| - // that hasn't had SSL_ImportFD called on it. If we get a certificate error |
| - // here, then we know that we called SSL_ImportFD. |
| - if (result == OK || IsCertificateError(result)) { |
| - status = ssl_socket_->GetNextProto(&proto); |
| - ssl_socket_->RecordNegotiationExtension(); |
| - } |
| - |
| - // If we want spdy over npn, make sure it succeeded. |
|
Ryan Sleevi
2015/04/17 19:19:30
Kinda sad to lose this comment?
davidben
2015/04/17 19:43:11
Oh. Yeah, that comment was attached to the wrong b
|
| - if (status == SSLClientSocket::kNextProtoNegotiated) { |
| - ssl_socket_->set_was_npn_negotiated(true); |
| - NextProto protocol_negotiated = |
| - SSLClientSocket::NextProtoFromString(proto); |
| - ssl_socket_->set_protocol_negotiated(protocol_negotiated); |
| - // If we negotiated a SPDY version, it must have been present in |
| - // SSLConfig::next_protos. |
| - // TODO(mbelshe): Verify this. |
| - if (protocol_negotiated >= kProtoSPDYMinimumVersion && |
| - protocol_negotiated <= kProtoSPDYMaximumVersion) { |
| - ssl_socket_->set_was_spdy_negotiated(true); |
| - } |
| - } |
| - if (params_->want_spdy_over_npn() && !ssl_socket_->was_spdy_negotiated()) |
| + if (params_->want_spdy_over_npn() && |
| + !NextProtoIsSPDY(ssl_socket_->GetNegotiatedProtocol())) { |
| return ERR_NPN_NEGOTIATION_FAILED; |
| + } |
| if (result == OK || |
| ssl_socket_->IgnoreCertError(result, params_->load_flags())) { |