summaryrefslogtreecommitdiffstats
path: root/net/socket/client_socket_factory.h
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-03 02:09:36 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-03 02:09:36 +0000
commitabe48d303fe241d38e30df64cc6c4ea197be61d9 (patch)
treebd865297c541bf8408c9eeaa1361b823f24bd3bf /net/socket/client_socket_factory.h
parent591703a67c02301d57201c7e6962b7eea1360541 (diff)
downloadchromium_src-abe48d303fe241d38e30df64cc6c4ea197be61d9.zip
chromium_src-abe48d303fe241d38e30df64cc6c4ea197be61d9.tar.gz
chromium_src-abe48d303fe241d38e30df64cc6c4ea197be61d9.tar.bz2
Use NSS instead of the system SSL library for SSL if
the --use-nss-for-ssl or --use-flip command-line switch is specified. R=mark,mbelshe BUG=28744 TEST=Run chrome.exe with and without --use-nss-for-ssl. SSL should work in both cases. Review URL: http://codereview.chromium.org/555186 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37931 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/client_socket_factory.h')
-rw-r--r--net/socket/client_socket_factory.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/net/socket/client_socket_factory.h b/net/socket/client_socket_factory.h
index 6f4ff17..988cf97 100644
--- a/net/socket/client_socket_factory.h
+++ b/net/socket/client_socket_factory.h
@@ -14,6 +14,18 @@ class ClientSocket;
class SSLClientSocket;
struct SSLConfig;
+// Callback function to create new SSLClientSocket objects.
+typedef SSLClientSocket* (*SSLClientSocketFactory)(
+ ClientSocket* transport_socket,
+ const std::string& hostname,
+ const SSLConfig& ssl_config);
+
+// Creates SSLClientSocketNSS objects.
+SSLClientSocket* SSLClientSocketNSSFactory(
+ ClientSocket* transport_socket,
+ const std::string& hostname,
+ const SSLConfig& ssl_config);
+
// An interface used to instantiate ClientSocket objects. Used to facilitate
// testing code with mock socket implementations.
class ClientSocketFactory {
@@ -30,6 +42,10 @@ class ClientSocketFactory {
// Returns the default ClientSocketFactory.
static ClientSocketFactory* GetDefaultFactory();
+
+ // Instructs the default ClientSocketFactory to use |factory| to create
+ // SSLClientSocket objects.
+ static void SetSSLClientSocketFactory(SSLClientSocketFactory factory);
};
} // namespace net