summaryrefslogtreecommitdiffstats
path: root/net/socket/client_socket_factory.cc
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-19 13:33:21 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-19 13:33:21 +0000
commit7ab5bbd128a32d32046201df76b86d370efa65af (patch)
tree69a234c16498a3a27acacc2c4681f783c4bd0975 /net/socket/client_socket_factory.cc
parent0a0d806aa4c534ff999f6bac2503d76d1d38e38d (diff)
downloadchromium_src-7ab5bbd128a32d32046201df76b86d370efa65af.zip
chromium_src-7ab5bbd128a32d32046201df76b86d370efa65af.tar.gz
chromium_src-7ab5bbd128a32d32046201df76b86d370efa65af.tar.bz2
Revert revert 62918 - net: clean up SSLHostInfo construction."
Was reverted in r62922 due to a change landing between the try run and the commit. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63046 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/client_socket_factory.cc')
-rw-r--r--net/socket/client_socket_factory.cc22
1 files changed, 15 insertions, 7 deletions
diff --git a/net/socket/client_socket_factory.cc b/net/socket/client_socket_factory.cc
index d0793cb..a31af007 100644
--- a/net/socket/client_socket_factory.cc
+++ b/net/socket/client_socket_factory.cc
@@ -6,6 +6,7 @@
#include "base/singleton.h"
#include "build/build_config.h"
+#include "net/base/ssl_host_info.h"
#include "net/socket/client_socket_handle.h"
#if defined(OS_WIN)
#include "net/socket/ssl_client_socket_win.h"
@@ -26,13 +27,16 @@ namespace {
SSLClientSocket* DefaultSSLClientSocketFactory(
ClientSocketHandle* transport_socket,
const std::string& hostname,
- const SSLConfig& ssl_config) {
+ const SSLConfig& ssl_config,
+ SSLHostInfo* ssl_host_info) {
+ scoped_ptr<SSLHostInfo> shi(ssl_host_info);
#if defined(OS_WIN)
return new SSLClientSocketWin(transport_socket, hostname, ssl_config);
#elif defined(USE_OPENSSL)
return new SSLClientSocketOpenSSL(transport_socket, hostname, ssl_config);
#elif defined(USE_NSS)
- return new SSLClientSocketNSS(transport_socket, hostname, ssl_config);
+ return new SSLClientSocketNSS(transport_socket, hostname, ssl_config,
+ shi.release());
#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
@@ -40,7 +44,8 @@ SSLClientSocket* DefaultSSLClientSocketFactory(
if (ssl_config.send_client_cert)
return new SSLClientSocketMac(transport_socket, hostname, ssl_config);
- return new SSLClientSocketNSS(transport_socket, hostname, ssl_config);
+ return new SSLClientSocketNSS(transport_socket, hostname, ssl_config,
+ shi.release());
#else
NOTIMPLEMENTED();
return NULL;
@@ -61,8 +66,9 @@ class DefaultClientSocketFactory : public ClientSocketFactory {
virtual SSLClientSocket* CreateSSLClientSocket(
ClientSocketHandle* transport_socket,
const std::string& hostname,
- const SSLConfig& ssl_config) {
- return g_ssl_factory(transport_socket, hostname, ssl_config);
+ const SSLConfig& ssl_config,
+ SSLHostInfo* ssl_host_info) {
+ return g_ssl_factory(transport_socket, hostname, ssl_config, ssl_host_info);
}
};
@@ -83,10 +89,12 @@ void ClientSocketFactory::SetSSLClientSocketFactory(
SSLClientSocket* ClientSocketFactory::CreateSSLClientSocket(
ClientSocket* transport_socket,
const std::string& hostname,
- const SSLConfig& ssl_config) {
+ const SSLConfig& ssl_config,
+ SSLHostInfo* ssl_host_info) {
ClientSocketHandle* socket_handle = new ClientSocketHandle();
socket_handle->set_socket(transport_socket);
- return CreateSSLClientSocket(socket_handle, hostname, ssl_config);
+ return CreateSSLClientSocket(socket_handle, hostname, ssl_config,
+ ssl_host_info);
}
} // namespace net