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

Unified Diff: net/socket/socket_test_util.cc

Issue 3747003: net: clean up SSLHostInfo construction. (Closed)
Patch Set: ... Created 10 years, 2 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/ssl_client_socket_nss.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 414d3954d027a9c0fd37c76feb3fc55203425f7c..e409e63fb58531b30db6612ca0551080a789ca82 100644
--- a/net/socket/socket_test_util.cc
+++ b/net/socket/socket_test_util.cc
@@ -467,6 +467,7 @@ MockSSLClientSocket::MockSSLClientSocket(
net::ClientSocketHandle* transport_socket,
const std::string& hostname,
const net::SSLConfig& ssl_config,
+ SSLHostInfo* ssl_host_info,
net::SSLSocketDataProvider* data)
: MockClientSocket(transport_socket->socket()->NetLog().net_log()),
transport_(transport_socket),
@@ -474,6 +475,7 @@ MockSSLClientSocket::MockSSLClientSocket(
is_npn_state_set_(false),
new_npn_value_(false) {
DCHECK(data_);
+ delete ssl_host_info; // we take ownership but don't use it.
}
MockSSLClientSocket::~MockSSLClientSocket() {
@@ -977,10 +979,11 @@ ClientSocket* MockClientSocketFactory::CreateTCPClientSocket(
SSLClientSocket* MockClientSocketFactory::CreateSSLClientSocket(
ClientSocketHandle* transport_socket,
const std::string& hostname,
- const SSLConfig& ssl_config) {
+ const SSLConfig& ssl_config,
+ SSLHostInfo* ssl_host_info) {
MockSSLClientSocket* socket =
new MockSSLClientSocket(transport_socket, hostname, ssl_config,
- mock_ssl_data_.GetNext());
+ ssl_host_info, mock_ssl_data_.GetNext());
ssl_client_sockets_.push_back(socket);
return socket;
}
@@ -1021,10 +1024,11 @@ ClientSocket* DeterministicMockClientSocketFactory::CreateTCPClientSocket(
SSLClientSocket* DeterministicMockClientSocketFactory::CreateSSLClientSocket(
ClientSocketHandle* transport_socket,
const std::string& hostname,
- const SSLConfig& ssl_config) {
+ const SSLConfig& ssl_config,
+ SSLHostInfo* ssl_host_info) {
MockSSLClientSocket* socket =
new MockSSLClientSocket(transport_socket, hostname, ssl_config,
- mock_ssl_data_.GetNext());
+ ssl_host_info, mock_ssl_data_.GetNext());
ssl_client_sockets_.push_back(socket);
return socket;
}
« no previous file with comments | « net/socket/socket_test_util.h ('k') | net/socket/ssl_client_socket_nss.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698