| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef NET_BASE_CLIENT_SOCKET_FACTORY_H_ | |
| 6 #define NET_BASE_CLIENT_SOCKET_FACTORY_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 namespace net { | |
| 11 | |
| 12 class AddressList; | |
| 13 class ClientSocket; | |
| 14 class SSLClientSocket; | |
| 15 struct SSLConfig; | |
| 16 | |
| 17 // An interface used to instantiate ClientSocket objects. Used to facilitate | |
| 18 // testing code with mock socket implementations. | |
| 19 class ClientSocketFactory { | |
| 20 public: | |
| 21 virtual ~ClientSocketFactory() {} | |
| 22 | |
| 23 virtual ClientSocket* CreateTCPClientSocket( | |
| 24 const AddressList& addresses) = 0; | |
| 25 | |
| 26 virtual SSLClientSocket* CreateSSLClientSocket( | |
| 27 ClientSocket* transport_socket, | |
| 28 const std::string& hostname, | |
| 29 const SSLConfig& ssl_config) = 0; | |
| 30 | |
| 31 // Returns the default ClientSocketFactory. | |
| 32 static ClientSocketFactory* GetDefaultFactory(); | |
| 33 }; | |
| 34 | |
| 35 } // namespace net | |
| 36 | |
| 37 #endif // NET_BASE_CLIENT_SOCKET_FACTORY_H_ | |
| OLD | NEW |