[email protected] | 87bfa3f | 2010-09-30 14:54:56 | [diff] [blame] | 1 | // Copyright (c) 2010 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_HTTP_HTTP_NETWORK_SESSION_PEER_H_ | ||||
6 | #define NET_HTTP_HTTP_NETWORK_SESSION_PEER_H_ | ||||
7 | #pragma once | ||||
8 | |||||
[email protected] | 5322a7f | 2011-02-11 20:44:42 | [diff] [blame] | 9 | #include "base/ref_counted.h" |
[email protected] | 87bfa3f | 2010-09-30 14:54:56 | [diff] [blame] | 10 | |
11 | namespace net { | ||||
12 | |||||
[email protected] | 5322a7f | 2011-02-11 20:44:42 | [diff] [blame] | 13 | class HostPortPair; |
14 | class HttpNetworkSession; | ||||
15 | class HttpProxyClientSocketPool; | ||||
[email protected] | 102e27c | 2011-02-23 01:01:31 | [diff] [blame^] | 16 | class HttpStreamFactory; |
[email protected] | 5322a7f | 2011-02-11 20:44:42 | [diff] [blame] | 17 | class ProxyService; |
18 | class SOCKSClientSocketPool; | ||||
19 | class SSLClientSocketPool; | ||||
20 | class TCPClientSocketPool; | ||||
21 | |||||
[email protected] | 87bfa3f | 2010-09-30 14:54:56 | [diff] [blame] | 22 | class HttpNetworkSessionPeer { |
23 | public: | ||||
24 | explicit HttpNetworkSessionPeer( | ||||
[email protected] | 5322a7f | 2011-02-11 20:44:42 | [diff] [blame] | 25 | const scoped_refptr<HttpNetworkSession>& session); |
26 | ~HttpNetworkSessionPeer(); | ||||
[email protected] | 87bfa3f | 2010-09-30 14:54:56 | [diff] [blame] | 27 | |
[email protected] | 5322a7f | 2011-02-11 20:44:42 | [diff] [blame] | 28 | void SetTCPSocketPool(TCPClientSocketPool* pool); |
[email protected] | 87bfa3f | 2010-09-30 14:54:56 | [diff] [blame] | 29 | |
30 | void SetSocketPoolForSOCKSProxy( | ||||
31 | const HostPortPair& socks_proxy, | ||||
[email protected] | 5322a7f | 2011-02-11 20:44:42 | [diff] [blame] | 32 | SOCKSClientSocketPool* pool); |
[email protected] | 87bfa3f | 2010-09-30 14:54:56 | [diff] [blame] | 33 | |
34 | void SetSocketPoolForHTTPProxy( | ||||
35 | const HostPortPair& http_proxy, | ||||
[email protected] | 5322a7f | 2011-02-11 20:44:42 | [diff] [blame] | 36 | HttpProxyClientSocketPool* pool); |
[email protected] | 87bfa3f | 2010-09-30 14:54:56 | [diff] [blame] | 37 | |
[email protected] | 5322a7f | 2011-02-11 20:44:42 | [diff] [blame] | 38 | void SetSSLSocketPool(SSLClientSocketPool* pool); |
[email protected] | 87bfa3f | 2010-09-30 14:54:56 | [diff] [blame] | 39 | |
40 | void SetSocketPoolForSSLWithProxy( | ||||
41 | const HostPortPair& proxy_host, | ||||
[email protected] | 5322a7f | 2011-02-11 20:44:42 | [diff] [blame] | 42 | SSLClientSocketPool* pool); |
[email protected] | 87bfa3f | 2010-09-30 14:54:56 | [diff] [blame] | 43 | |
[email protected] | 5322a7f | 2011-02-11 20:44:42 | [diff] [blame] | 44 | void SetProxyService(ProxyService* proxy_service); |
[email protected] | 87bfa3f | 2010-09-30 14:54:56 | [diff] [blame] | 45 | |
[email protected] | 102e27c | 2011-02-23 01:01:31 | [diff] [blame^] | 46 | void SetHttpStreamFactory(HttpStreamFactory* http_stream_factory); |
47 | |||||
[email protected] | 87bfa3f | 2010-09-30 14:54:56 | [diff] [blame] | 48 | private: |
49 | const scoped_refptr<HttpNetworkSession> session_; | ||||
50 | |||||
51 | DISALLOW_COPY_AND_ASSIGN(HttpNetworkSessionPeer); | ||||
52 | }; | ||||
53 | |||||
54 | } // namespace net | ||||
55 | |||||
56 | #endif // NET_HTTP_HTTP_NETWORK_SESSION_PEER_H_ |