Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/socket/client_socket_factory.h" | 5 #include "net/socket/client_socket_factory.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "net/socket/client_socket_handle.h" | 9 #include "net/socket/client_socket_handle.h" |
| 10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 const SSLConfig& ssl_config, | 86 const SSLConfig& ssl_config, |
| 87 SSLHostInfo* ssl_host_info, | 87 SSLHostInfo* ssl_host_info, |
| 88 CertVerifier* cert_verifier) { | 88 CertVerifier* cert_verifier) { |
| 89 ClientSocketHandle* socket_handle = new ClientSocketHandle(); | 89 ClientSocketHandle* socket_handle = new ClientSocketHandle(); |
| 90 socket_handle->set_socket(transport_socket); | 90 socket_handle->set_socket(transport_socket); |
| 91 return CreateSSLClientSocket(socket_handle, host_and_port, ssl_config, | 91 return CreateSSLClientSocket(socket_handle, host_and_port, ssl_config, |
| 92 ssl_host_info, cert_verifier, | 92 ssl_host_info, cert_verifier, |
| 93 NULL /* DnsCertProvenanceChecker */); | 93 NULL /* DnsCertProvenanceChecker */); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void ClientSocketFactory::ClearSSLSessionCache() { | |
|
wtc
2011/02/24 01:00:14
This should be defined by the DefaultClientSocketF
Ryan Hamilton
2011/02/24 22:38:46
Done.
| |
| 97 #if defined(OS_WIN) | |
| 98 if (!g_use_system_ssl) { | |
| 99 SSLClientSocketNSS::ClearSessionCache(); | |
| 100 } | |
|
wtc
2011/02/24 01:00:14
Nit: don't use curly braces {} around simple one-l
Ryan Hamilton
2011/02/24 22:38:46
Done! Sorry about that! GFE *requires* braces on
| |
| 101 #elif defined(USE_OPENSSL) | |
| 102 // no-op | |
| 103 #elif defined(USE_NSS) | |
| 104 SSLClientSocketNSS::ClearSessionCache(); | |
| 105 #elif defined(OS_MACOSX) | |
| 106 if (!g_use_system_ssl) { | |
| 107 SSLClientSocketNSS::ClearSessionCache(); | |
| 108 } | |
| 109 #else | |
| 110 NOTIMPLEMENTED(); | |
| 111 return NULL; | |
|
wtc
2011/02/24 01:00:14
Bug: remove "return NULL;" because this function r
Ryan Hamilton
2011/02/24 22:38:46
Done.
| |
| 112 #endif | |
| 113 } | |
| 114 | |
| 96 // static | 115 // static |
| 97 ClientSocketFactory* ClientSocketFactory::GetDefaultFactory() { | 116 ClientSocketFactory* ClientSocketFactory::GetDefaultFactory() { |
| 98 return g_default_client_socket_factory.Pointer(); | 117 return g_default_client_socket_factory.Pointer(); |
| 99 } | 118 } |
| 100 | 119 |
| 101 // static | 120 // static |
| 102 void ClientSocketFactory::UseSystemSSL() { | 121 void ClientSocketFactory::UseSystemSSL() { |
| 103 g_use_system_ssl = true; | 122 g_use_system_ssl = true; |
| 104 } | 123 } |
| 105 | 124 |
| 106 } // namespace net | 125 } // namespace net |
| OLD | NEW |