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

Unified Diff: net/socket/socket_test_util.cc

Issue 384873002: This CL changes the lifespan of SSLConnectJobMessengers so that they are created only when needed, (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@useloop
Patch Set: Rebase, fixed issue where messenger field wasn't set to NULL after deletion Created 6 years, 4 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
Index: net/socket/socket_test_util.cc
diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc
index 3498c13428d26ee04ff61c04387ecf3b5a946eec..1068b88df9ec97b024d3ee91b7e044cfe9c221cc 100644
--- a/net/socket/socket_test_util.cc
+++ b/net/socket/socket_test_util.cc
@@ -764,6 +764,11 @@ const BoundNetLog& MockClientSocket::NetLog() const {
return net_log_;
}
+std::string MockClientSocket::GetSessionCacheKey() const {
+ NOTREACHED();
wtc 2014/08/12 14:51:00 Nit: use NOTIMPLEMENTED() instead, to match the ot
mshelley 2014/08/12 21:47:00 Done.
+ return std::string();
+}
+
bool MockClientSocket::InSessionCache() const {
NOTIMPLEMENTED();
return false;
@@ -1327,6 +1332,7 @@ MockSSLClientSocket::MockSSLClientSocket(
new_npn_value_(false),
is_protocol_negotiated_set_(false),
protocol_negotiated_(kProtoUnknown),
+ host_port_pair_(host_port_pair),
next_connect_state_(STATE_NONE),
reached_connect_(false),
weak_factory_(this) {
@@ -1389,6 +1395,12 @@ bool MockSSLClientSocket::GetSSLInfo(SSLInfo* ssl_info) {
return true;
}
+std::string MockSSLClientSocket::GetSessionCacheKey() const {
+ // For the purposes of these tests, |host_and_port| will serve as the
+ // cache key.
+ return host_port_pair_.ToString();
+}
+
bool MockSSLClientSocket::InSessionCache() const {
return data_->is_in_session_cache;
}

Powered by Google App Engine
This is Rietveld 408576698