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

Unified Diff: net/socket/socket_test_util.cc

Issue 10690122: Change SpdySession::GetSSLInfo to get the SSLInfo from the underlying socket (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: FIx curvercp Created 8 years, 5 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/socket/socket_test_util.h ('k') | net/socket/socks5_client_socket.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socket_test_util.cc
diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc
index ef6d38c2e6c5c67955e5ebb45140ccfdfc32102a..ff66830230ad73c2efb139795a2f191a7812f667 100644
--- a/net/socket/socket_test_util.cc
+++ b/net/socket/socket_test_util.cc
@@ -704,10 +704,6 @@ const BoundNetLog& MockClientSocket::NetLog() const {
return net_log_;
}
-void MockClientSocket::GetSSLInfo(SSLInfo* ssl_info) {
- NOTREACHED();
-}
-
void MockClientSocket::GetSSLCertRequestInfo(
SSLCertRequestInfo* cert_request_info) {
}
@@ -872,6 +868,14 @@ base::TimeDelta MockTCPClientSocket::GetConnectTimeMicros() const {
return kTestingConnectTimeMicros;
}
+bool MockTCPClientSocket::WasNpnNegotiated() const {
+ return false;
+}
+
+bool MockTCPClientSocket::GetSSLInfo(SSLInfo* ssl_info) {
+ return false;
+}
+
void MockTCPClientSocket::OnReadComplete(const MockRead& data) {
// There must be a read pending.
DCHECK(pending_buf_);
@@ -1071,6 +1075,14 @@ base::TimeDelta DeterministicMockTCPClientSocket::GetConnectTimeMicros() const {
return base::TimeDelta::FromMicroseconds(-1);
}
+bool DeterministicMockTCPClientSocket::WasNpnNegotiated() const {
+ return false;
+}
+
+bool DeterministicMockTCPClientSocket::GetSSLInfo(SSLInfo* ssl_info) {
+ return false;
+}
+
void DeterministicMockTCPClientSocket::OnReadComplete(const MockRead& data) {}
// static
@@ -1158,11 +1170,12 @@ base::TimeDelta MockSSLClientSocket::GetConnectTimeMicros() const {
return base::TimeDelta::FromMicroseconds(-1);
}
-void MockSSLClientSocket::GetSSLInfo(SSLInfo* ssl_info) {
+bool MockSSLClientSocket::GetSSLInfo(SSLInfo* ssl_info) {
ssl_info->Reset();
ssl_info->cert = data_->cert;
ssl_info->client_cert_sent = data_->client_cert_sent;
ssl_info->channel_id_sent = data_->channel_id_sent;
+ return true;
}
void MockSSLClientSocket::GetSSLCertRequestInfo(
@@ -1184,17 +1197,17 @@ SSLClientSocket::NextProtoStatus MockSSLClientSocket::GetNextProto(
return data_->next_proto_status;
}
-bool MockSSLClientSocket::was_npn_negotiated() const {
- if (is_npn_state_set_)
- return new_npn_value_;
- return data_->was_npn_negotiated;
-}
-
bool MockSSLClientSocket::set_was_npn_negotiated(bool negotiated) {
is_npn_state_set_ = true;
return new_npn_value_ = negotiated;
}
+bool MockSSLClientSocket::WasNpnNegotiated() const {
+ if (is_npn_state_set_)
+ return new_npn_value_;
+ return data_->was_npn_negotiated;
+}
+
NextProto MockSSLClientSocket::GetNegotiatedProtocol() const {
if (is_protocol_negotiated_set_)
return protocol_negotiated_;
« no previous file with comments | « net/socket/socket_test_util.h ('k') | net/socket/socks5_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698