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

Unified Diff: net/socket/client_socket_factory.cc

Issue 3174004: Pass both hostname and port into SSLClientSocket (Closed)
Patch Set: Created 10 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
« no previous file with comments | « net/socket/client_socket_factory.h ('k') | net/socket/socket_test_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/client_socket_factory.cc
diff --git a/net/socket/client_socket_factory.cc b/net/socket/client_socket_factory.cc
index fbccfcb2f9cd889a42b03416433d0c98057c9476..6db53e063fa7009c8ed9f2eb5346105f335d1755 100644
--- a/net/socket/client_socket_factory.cc
+++ b/net/socket/client_socket_factory.cc
@@ -23,20 +23,20 @@ namespace {
SSLClientSocket* DefaultSSLClientSocketFactory(
ClientSocketHandle* transport_socket,
- const std::string& hostname,
+ const HostPortPair& host_port_pair,
const SSLConfig& ssl_config) {
#if defined(OS_WIN)
- return new SSLClientSocketWin(transport_socket, hostname, ssl_config);
+ return new SSLClientSocketWin(transport_socket, host_port_pair, ssl_config);
#elif defined(USE_NSS)
- return new SSLClientSocketNSS(transport_socket, hostname, ssl_config);
+ return new SSLClientSocketNSS(transport_socket, host_port_pair, ssl_config);
#elif defined(OS_MACOSX)
// TODO(wtc): SSLClientSocketNSS can't do SSL client authentication using
// Mac OS X CDSA/CSSM yet (http://crbug.com/45369), so fall back on
// SSLClientSocketMac.
if (ssl_config.client_cert)
- return new SSLClientSocketMac(transport_socket, hostname, ssl_config);
+ return new SSLClientSocketMac(transport_socket, host_port_pair, ssl_config);
- return new SSLClientSocketNSS(transport_socket, hostname, ssl_config);
+ return new SSLClientSocketNSS(transport_socket, host_port_pair, ssl_config);
#else
NOTIMPLEMENTED();
return NULL;
@@ -54,9 +54,9 @@ class DefaultClientSocketFactory : public ClientSocketFactory {
virtual SSLClientSocket* CreateSSLClientSocket(
ClientSocketHandle* transport_socket,
- const std::string& hostname,
+ const HostPortPair& host_port_pair,
const SSLConfig& ssl_config) {
- return g_ssl_factory(transport_socket, hostname, ssl_config);
+ return g_ssl_factory(transport_socket, host_port_pair, ssl_config);
}
};
@@ -76,11 +76,11 @@ void ClientSocketFactory::SetSSLClientSocketFactory(
// Deprecated function (http://crbug.com/37810) that takes a ClientSocket.
SSLClientSocket* ClientSocketFactory::CreateSSLClientSocket(
ClientSocket* transport_socket,
- const std::string& hostname,
+ const HostPortPair& host_port_pair,
const SSLConfig& ssl_config) {
ClientSocketHandle* socket_handle = new ClientSocketHandle();
socket_handle->set_socket(transport_socket);
- return CreateSSLClientSocket(socket_handle, hostname, ssl_config);
+ return CreateSSLClientSocket(socket_handle, host_port_pair, ssl_config);
}
} // namespace net
« no previous file with comments | « net/socket/client_socket_factory.h ('k') | net/socket/socket_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698