Chromium Code Reviews| Index: net/socket/socket_test_util.cc |
| diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc |
| index a14ab2a5d2cd58f9432faa312bf1e522253d3c05..fc31e45b4b5fce4aded6a42fef84e58bc918688d 100644 |
| --- a/net/socket/socket_test_util.cc |
| +++ b/net/socket/socket_test_util.cc |
| @@ -1285,6 +1285,8 @@ MockSSLClientSocket::MockSSLClientSocket( |
| is_npn_state_set_(false), |
| new_npn_value_(false), |
| is_protocol_negotiated_set_(false), |
| + was_spdy_negotiated_(false), |
| + was_spdy_negotiated_set_(false), |
| protocol_negotiated_(kProtoUnknown) { |
| DCHECK(data_); |
| peer_addr_ = data->connect.peer_addr; |
| @@ -1349,6 +1351,22 @@ bool MockSSLClientSocket::GetSSLInfo(SSLInfo* ssl_info) { |
| return true; |
| } |
| +bool MockSSLClientSocket::was_spdy_negotiated() const { |
| + // If the value is set explicitly, use the value. |
| + if (was_spdy_negotiated_set_) |
| + return was_spdy_negotiated_; |
| + // Otherwise derive the value from other information. |
|
mmenke
2013/06/05 00:01:20
Still not following why this is needed - all tests
yhirano
2013/06/06 14:06:43
You are right. Done.
|
| + return WasNpnNegotiated() && |
| + kProtoSPDYMinimumVersion <= GetNegotiatedProtocol() && |
| + GetNegotiatedProtocol() <= kProtoSPDYMaximumVersion; |
| +} |
| + |
| +bool MockSSLClientSocket::set_was_spdy_negotiated(bool negotiated) { |
| + was_spdy_negotiated_set_ = true; |
| + was_spdy_negotiated_ = negotiated; |
| + return was_spdy_negotiated_; |
| +} |
| + |
| void MockSSLClientSocket::GetSSLCertRequestInfo( |
| SSLCertRequestInfo* cert_request_info) { |
| DCHECK(cert_request_info); |