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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
97 ClientSocketFactory* ClientSocketFactory::GetDefaultFactory() { | 97 ClientSocketFactory* ClientSocketFactory::GetDefaultFactory() { |
98 return g_default_client_socket_factory.Pointer(); | 98 return g_default_client_socket_factory.Pointer(); |
99 } | 99 } |
100 | 100 |
101 // static | 101 // static |
102 void ClientSocketFactory::SetSSLClientSocketFactory( | 102 void ClientSocketFactory::SetSSLClientSocketFactory( |
103 SSLClientSocketFactory factory) { | 103 SSLClientSocketFactory factory) { |
104 g_ssl_factory = factory; | 104 g_ssl_factory = factory; |
105 } | 105 } |
106 | 106 |
107 void ClientSocketFactory::DefaultClearSSLSessionCache() { | |
108 #if defined(OS_WIN) | |
109 // no-op | |
110 #elif defined(USE_OPENSSL) | |
111 // no-op | |
112 #elif defined(USE_NSS) | |
113 return SSLClientSocketNSS::ClearSessionCache(); | |
114 #elif defined(OS_MACOSX) | |
115 return SSLClientSocketNSS::ClearSessionCache(); | |
wtc
2011/02/15 20:50:40
For OS_WIN and OS_MACOSX, this function should cal
Ryan Hamilton
2011/02/16 17:44:40
You're right, of course. However, I notice a very
wtc
2011/02/23 01:17:34
Yes. The USE_OPENSSL build option is intended for
| |
116 #else | |
117 NOTIMPLEMENTED(); | |
118 #endif | |
119 } | |
120 | |
121 void (*g_clear_ssl_session_cache)() = | |
122 ClientSocketFactory::DefaultClearSSLSessionCache; | |
123 | |
124 void ClientSocketFactory::ClearSSLSessionCache() { | |
125 g_clear_ssl_session_cache(); | |
126 } | |
127 | |
128 void ClientSocketFactory::SetClearSSLSessionCache(void (*clear)()) { | |
129 g_clear_ssl_session_cache = clear; | |
130 } | |
131 | |
107 } // namespace net | 132 } // namespace net |
OLD | NEW |