| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_BASE_CLIENT_SOCKET_FACTORY_H_ | 5 #ifndef NET_BASE_CLIENT_SOCKET_FACTORY_H_ |
| 6 #define NET_BASE_CLIENT_SOCKET_FACTORY_H_ | 6 #define NET_BASE_CLIENT_SOCKET_FACTORY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "build/build_config.h" |
| 11 |
| 10 namespace net { | 12 namespace net { |
| 11 | 13 |
| 12 class AddressList; | 14 class AddressList; |
| 13 class ClientSocket; | 15 class ClientSocket; |
| 14 | 16 |
| 15 // An interface used to instantiate ClientSocket objects. Used to facilitate | 17 // An interface used to instantiate ClientSocket objects. Used to facilitate |
| 16 // testing code with mock socket implementations. | 18 // testing code with mock socket implementations. |
| 17 class ClientSocketFactory { | 19 class ClientSocketFactory { |
| 18 public: | 20 public: |
| 19 virtual ~ClientSocketFactory() {} | 21 virtual ~ClientSocketFactory() {} |
| 20 | 22 |
| 21 virtual ClientSocket* CreateTCPClientSocket( | 23 virtual ClientSocket* CreateTCPClientSocket( |
| 22 const AddressList& addresses) = 0; | 24 const AddressList& addresses) = 0; |
| 23 | 25 |
| 26 // TODO(port): Enable when ssl_client socket is ported. |
| 27 #if defined(OS_WIN) |
| 24 virtual ClientSocket* CreateSSLClientSocket( | 28 virtual ClientSocket* CreateSSLClientSocket( |
| 25 ClientSocket* transport_socket, | 29 ClientSocket* transport_socket, |
| 26 const std::string& hostname) = 0; | 30 const std::string& hostname) = 0; |
| 31 #endif |
| 27 | 32 |
| 28 // Returns the default ClientSocketFactory. | 33 // Returns the default ClientSocketFactory. |
| 29 static ClientSocketFactory* GetDefaultFactory(); | 34 static ClientSocketFactory* GetDefaultFactory(); |
| 30 }; | 35 }; |
| 31 | 36 |
| 32 } // namespace net | 37 } // namespace net |
| 33 | 38 |
| 34 #endif // NET_BASE_CLIENT_SOCKET_FACTORY_H_ | 39 #endif // NET_BASE_CLIENT_SOCKET_FACTORY_H_ |
| 35 | 40 |
| OLD | NEW |