| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef NET_SOCKET_CLIENT_SOCKET_FACTORY_H_ | 5 #ifndef NET_SOCKET_CLIENT_SOCKET_FACTORY_H_ |
| 6 #define NET_SOCKET_CLIENT_SOCKET_FACTORY_H_ | 6 #define NET_SOCKET_CLIENT_SOCKET_FACTORY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 DatagramSocket::BindType bind_type, | 40 DatagramSocket::BindType bind_type, |
| 41 const RandIntCallback& rand_int_cb, | 41 const RandIntCallback& rand_int_cb, |
| 42 NetLog* net_log, | 42 NetLog* net_log, |
| 43 const NetLog::Source& source) = 0; | 43 const NetLog::Source& source) = 0; |
| 44 | 44 |
| 45 virtual StreamSocket* CreateTransportClientSocket( | 45 virtual StreamSocket* CreateTransportClientSocket( |
| 46 const AddressList& addresses, | 46 const AddressList& addresses, |
| 47 NetLog* net_log, | 47 NetLog* net_log, |
| 48 const NetLog::Source& source) = 0; | 48 const NetLog::Source& source) = 0; |
| 49 | 49 |
| 50 // It is allowed to pass in a |transport_socket| that is not obtained from a |
| 51 // socket pool. The caller could create a ClientSocketHandle directly and call |
| 52 // set_socket() on it to set a valid StreamSocket instance. |
| 50 virtual SSLClientSocket* CreateSSLClientSocket( | 53 virtual SSLClientSocket* CreateSSLClientSocket( |
| 51 ClientSocketHandle* transport_socket, | 54 ClientSocketHandle* transport_socket, |
| 52 const HostPortPair& host_and_port, | 55 const HostPortPair& host_and_port, |
| 53 const SSLConfig& ssl_config, | 56 const SSLConfig& ssl_config, |
| 54 SSLHostInfo* ssl_host_info, | 57 SSLHostInfo* ssl_host_info, |
| 55 const SSLClientSocketContext& context) = 0; | 58 const SSLClientSocketContext& context) = 0; |
| 56 | 59 |
| 57 // Deprecated function (http://crbug.com/37810) that takes a StreamSocket. | 60 // Deprecated function (http://crbug.com/37810) that takes a StreamSocket. |
| 58 virtual SSLClientSocket* CreateSSLClientSocket( | 61 virtual SSLClientSocket* CreateSSLClientSocket( |
| 59 StreamSocket* transport_socket, | 62 StreamSocket* transport_socket, |
| 60 const HostPortPair& host_and_port, | 63 const HostPortPair& host_and_port, |
| 61 const SSLConfig& ssl_config, | 64 const SSLConfig& ssl_config, |
| 62 SSLHostInfo* ssl_host_info, | 65 SSLHostInfo* ssl_host_info, |
| 63 const SSLClientSocketContext& context); | 66 const SSLClientSocketContext& context); |
| 64 | 67 |
| 65 // Clears cache used for SSL session resumption. | 68 // Clears cache used for SSL session resumption. |
| 66 virtual void ClearSSLSessionCache() = 0; | 69 virtual void ClearSSLSessionCache() = 0; |
| 67 | 70 |
| 68 // Returns the default ClientSocketFactory. | 71 // Returns the default ClientSocketFactory. |
| 69 static ClientSocketFactory* GetDefaultFactory(); | 72 static ClientSocketFactory* GetDefaultFactory(); |
| 70 | 73 |
| 71 // Instructs the default ClientSocketFactory to use the system SSL library. | 74 // Instructs the default ClientSocketFactory to use the system SSL library. |
| 72 static void UseSystemSSL(); | 75 static void UseSystemSSL(); |
| 73 }; | 76 }; |
| 74 | 77 |
| 75 } // namespace net | 78 } // namespace net |
| 76 | 79 |
| 77 #endif // NET_SOCKET_CLIENT_SOCKET_FACTORY_H_ | 80 #endif // NET_SOCKET_CLIENT_SOCKET_FACTORY_H_ |
| OLD | NEW |