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

Unified Diff: net/socket/client_socket_factory.cc

Issue 2870030: Implement SSLClientSocketPool. (Closed)
Patch Set: Rebase and fix mac compile error Created 10 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
Index: net/socket/client_socket_factory.cc
diff --git a/net/socket/client_socket_factory.cc b/net/socket/client_socket_factory.cc
index db819db953368eb77269c4d63f580d0b8c1daaa0..fbccfcb2f9cd889a42b03416433d0c98057c9476 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/socket/client_socket_handle.h"
#if defined(OS_WIN)
#include "net/socket/ssl_client_socket_win.h"
#elif defined(USE_NSS)
@@ -21,7 +22,7 @@ namespace net {
namespace {
SSLClientSocket* DefaultSSLClientSocketFactory(
- ClientSocket* transport_socket,
+ ClientSocketHandle* transport_socket,
const std::string& hostname,
const SSLConfig& ssl_config) {
#if defined(OS_WIN)
@@ -52,7 +53,7 @@ class DefaultClientSocketFactory : public ClientSocketFactory {
}
virtual SSLClientSocket* CreateSSLClientSocket(
- ClientSocket* transport_socket,
+ ClientSocketHandle* transport_socket,
const std::string& hostname,
const SSLConfig& ssl_config) {
return g_ssl_factory(transport_socket, hostname, ssl_config);
@@ -72,4 +73,14 @@ void ClientSocketFactory::SetSSLClientSocketFactory(
g_ssl_factory = factory;
}
+// Deprecated function (http://crbug.com/37810) that takes a ClientSocket.
+SSLClientSocket* ClientSocketFactory::CreateSSLClientSocket(
+ ClientSocket* transport_socket,
+ const std::string& hostname,
+ const SSLConfig& ssl_config) {
+ ClientSocketHandle* socket_handle = new ClientSocketHandle();
+ socket_handle->set_socket(transport_socket);
+ return CreateSSLClientSocket(socket_handle, hostname, ssl_config);
+}
+
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698