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 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "net/base/net_api.h" | 12 #include "net/base/net_export.h" |
13 #include "net/base/net_log.h" | 13 #include "net/base/net_log.h" |
14 #include "net/base/rand_callback.h" | 14 #include "net/base/rand_callback.h" |
15 #include "net/udp/datagram_socket.h" | 15 #include "net/udp/datagram_socket.h" |
16 | 16 |
17 namespace net { | 17 namespace net { |
18 | 18 |
19 class AddressList; | 19 class AddressList; |
20 class CertVerifier; | 20 class CertVerifier; |
21 class ClientSocketHandle; | 21 class ClientSocketHandle; |
22 class DatagramClientSocket; | 22 class DatagramClientSocket; |
23 class DnsCertProvenanceChecker; | 23 class DnsCertProvenanceChecker; |
24 class HostPortPair; | 24 class HostPortPair; |
25 class SSLClientSocket; | 25 class SSLClientSocket; |
26 struct SSLClientSocketContext; | 26 struct SSLClientSocketContext; |
27 struct SSLConfig; | 27 struct SSLConfig; |
28 class SSLHostInfo; | 28 class SSLHostInfo; |
29 class StreamSocket; | 29 class StreamSocket; |
30 | 30 |
31 // An interface used to instantiate StreamSocket objects. Used to facilitate | 31 // An interface used to instantiate StreamSocket objects. Used to facilitate |
32 // testing code with mock socket implementations. | 32 // testing code with mock socket implementations. |
33 class NET_API ClientSocketFactory { | 33 class NET_EXPORT ClientSocketFactory { |
34 public: | 34 public: |
35 virtual ~ClientSocketFactory() {} | 35 virtual ~ClientSocketFactory() {} |
36 | 36 |
37 // |source| is the NetLog::Source for the entity trying to create the socket, | 37 // |source| is the NetLog::Source for the entity trying to create the socket, |
38 // if it has one. | 38 // if it has one. |
39 virtual DatagramClientSocket* CreateDatagramClientSocket( | 39 virtual DatagramClientSocket* CreateDatagramClientSocket( |
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; |
(...skipping 24 matching lines...) Expand all Loading... |
68 // Returns the default ClientSocketFactory. | 68 // Returns the default ClientSocketFactory. |
69 static ClientSocketFactory* GetDefaultFactory(); | 69 static ClientSocketFactory* GetDefaultFactory(); |
70 | 70 |
71 // Instructs the default ClientSocketFactory to use the system SSL library. | 71 // Instructs the default ClientSocketFactory to use the system SSL library. |
72 static void UseSystemSSL(); | 72 static void UseSystemSSL(); |
73 }; | 73 }; |
74 | 74 |
75 } // namespace net | 75 } // namespace net |
76 | 76 |
77 #endif // NET_SOCKET_CLIENT_SOCKET_FACTORY_H_ | 77 #endif // NET_SOCKET_CLIENT_SOCKET_FACTORY_H_ |
OLD | NEW |