blob: 9823ac51b884b663a3ce367f2f1c72a4d126097b [file] [log] [blame]
license.botbf09a502008-08-24 00:55:551// 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.
initial.commit586acc5fe2008-07-26 22:42:524
5#ifndef NET_BASE_CLIENT_SOCKET_FACTORY_H_
6#define NET_BASE_CLIENT_SOCKET_FACTORY_H_
7
8#include <string>
9
10namespace net {
11
12class AddressList;
13class ClientSocket;
14
15// An interface used to instantiate ClientSocket objects. Used to facilitate
16// testing code with mock socket implementations.
17class ClientSocketFactory {
18 public:
[email protected]836dff32008-08-05 23:15:3619 virtual ~ClientSocketFactory() {}
20
initial.commit586acc5fe2008-07-26 22:42:5221 virtual ClientSocket* CreateTCPClientSocket(
22 const AddressList& addresses) = 0;
23
24 virtual ClientSocket* CreateSSLClientSocket(
25 ClientSocket* transport_socket,
26 const std::string& hostname) = 0;
27
28 // Returns the default ClientSocketFactory.
29 static ClientSocketFactory* GetDefaultFactory();
30};
31
32} // namespace net
33
34#endif // NET_BASE_CLIENT_SOCKET_FACTORY_H_
license.botbf09a502008-08-24 00:55:5535