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 826ccc8a2ff6ef9f27e7226c30091e58b957fef1..64ebf28ce06432dd30d6a8243355f70bd3a4970d 100644 |
--- a/net/socket/ssl_client_socket_pool.cc |
+++ b/net/socket/ssl_client_socket_pool.cc |
@@ -301,12 +301,11 @@ int SSLConnectJob::DoSSLConnectComplete(int result) { |
NextProto protocol_negotiated = |
SSLClientSocket::NextProtoFromString(proto); |
ssl_socket_->set_protocol_negotiated(protocol_negotiated); |
- // If we negotiated either version of SPDY, we must have |
- // advertised it, so allow it. |
- // TODO(mbelshe): verify it was a protocol we advertised? |
- if (protocol_negotiated == kProtoSPDY1 || |
- protocol_negotiated == kProtoSPDY2 || |
- protocol_negotiated == kProtoSPDY3) { |
+ // 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); |
} |
} |