[email protected] | a4605c5 | 2012-03-03 01:12:10 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 87bfa3f | 2010-09-30 14:54:56 | [diff] [blame] | 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_ | ||||
[email protected] | 87bfa3f | 2010-09-30 14:54:56 | [diff] [blame] | 7 | |
danakj | 1fd259a0 | 2016-04-16 03:17:09 | [diff] [blame] | 8 | #include <memory> |
9 | |||||
Avi Drissman | 13fc893 | 2015-12-20 04:40:46 | [diff] [blame] | 10 | #include "base/macros.h" |
[email protected] | 3b63f8f4 | 2011-03-28 01:54:15 | [diff] [blame] | 11 | #include "base/memory/ref_counted.h" |
[email protected] | 172da1b | 2011-08-12 15:52:26 | [diff] [blame] | 12 | #include "net/base/net_export.h" |
Yixin Wang | 10f477ed | 2017-11-21 04:20:20 | [diff] [blame] | 13 | #include "net/http/http_network_session.h" |
[email protected] | 87bfa3f | 2010-09-30 14:54:56 | [diff] [blame] | 14 | |
15 | namespace net { | ||||
16 | |||||
[email protected] | a42dbd14 | 2011-11-17 16:42:02 | [diff] [blame] | 17 | class ClientSocketPoolManager; |
[email protected] | 102e27c | 2011-02-23 01:01:31 | [diff] [blame] | 18 | class HttpStreamFactory; |
[email protected] | 5322a7f | 2011-02-11 20:44:42 | [diff] [blame] | 19 | |
[email protected] | 172da1b | 2011-08-12 15:52:26 | [diff] [blame] | 20 | class NET_EXPORT_PRIVATE HttpNetworkSessionPeer { |
[email protected] | 87bfa3f | 2010-09-30 14:54:56 | [diff] [blame] | 21 | public: |
mmenke | e65e7af | 2015-10-13 17:16:42 | [diff] [blame] | 22 | // |session| should outlive the HttpNetworkSessionPeer. |
23 | explicit HttpNetworkSessionPeer(HttpNetworkSession* session); | ||||
[email protected] | 5322a7f | 2011-02-11 20:44:42 | [diff] [blame] | 24 | ~HttpNetworkSessionPeer(); |
[email protected] | 87bfa3f | 2010-09-30 14:54:56 | [diff] [blame] | 25 | |
[email protected] | a42dbd14 | 2011-11-17 16:42:02 | [diff] [blame] | 26 | void SetClientSocketPoolManager( |
danakj | 1fd259a0 | 2016-04-16 03:17:09 | [diff] [blame] | 27 | std::unique_ptr<ClientSocketPoolManager> socket_pool_manager); |
[email protected] | 87bfa3f | 2010-09-30 14:54:56 | [diff] [blame] | 28 | |
danakj | 1fd259a0 | 2016-04-16 03:17:09 | [diff] [blame] | 29 | void SetHttpStreamFactory( |
30 | std::unique_ptr<HttpStreamFactory> http_stream_factory); | ||||
[email protected] | 102e27c | 2011-02-23 01:01:31 | [diff] [blame] | 31 | |
Yixin Wang | 10f477ed | 2017-11-21 04:20:20 | [diff] [blame] | 32 | HttpNetworkSession::Params* params(); |
33 | |||||
[email protected] | 87bfa3f | 2010-09-30 14:54:56 | [diff] [blame] | 34 | private: |
mmenke | e65e7af | 2015-10-13 17:16:42 | [diff] [blame] | 35 | HttpNetworkSession* const session_; |
[email protected] | 87bfa3f | 2010-09-30 14:54:56 | [diff] [blame] | 36 | |
37 | DISALLOW_COPY_AND_ASSIGN(HttpNetworkSessionPeer); | ||||
38 | }; | ||||
39 | |||||
40 | } // namespace net | ||||
41 | |||||
42 | #endif // NET_HTTP_HTTP_NETWORK_SESSION_PEER_H_ |