| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_HTTP_HTTP_NETWORK_SESSION_PEER_H_ | 5 #ifndef NET_HTTP_HTTP_NETWORK_SESSION_PEER_H_ |
| 6 #define NET_HTTP_HTTP_NETWORK_SESSION_PEER_H_ | 6 #define NET_HTTP_HTTP_NETWORK_SESSION_PEER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "net/base/net_export.h" | 12 #include "net/base/net_export.h" |
| 13 | 13 |
| 14 namespace net { | 14 namespace net { |
| 15 | 15 |
| 16 class ClientSocketPoolManager; | 16 class ClientSocketPoolManager; |
| 17 class HttpNetworkSession; | 17 class HttpNetworkSession; |
| 18 class HttpStreamFactory; | 18 class HttpStreamFactory; |
| 19 class NetworkThrottleManager; | 19 class NetworkThrottleManager; |
| 20 class ProxyService; | |
| 21 | 20 |
| 22 class NET_EXPORT_PRIVATE HttpNetworkSessionPeer { | 21 class NET_EXPORT_PRIVATE HttpNetworkSessionPeer { |
| 23 public: | 22 public: |
| 24 // |session| should outlive the HttpNetworkSessionPeer. | 23 // |session| should outlive the HttpNetworkSessionPeer. |
| 25 explicit HttpNetworkSessionPeer(HttpNetworkSession* session); | 24 explicit HttpNetworkSessionPeer(HttpNetworkSession* session); |
| 26 ~HttpNetworkSessionPeer(); | 25 ~HttpNetworkSessionPeer(); |
| 27 | 26 |
| 28 void SetClientSocketPoolManager( | 27 void SetClientSocketPoolManager( |
| 29 std::unique_ptr<ClientSocketPoolManager> socket_pool_manager); | 28 std::unique_ptr<ClientSocketPoolManager> socket_pool_manager); |
| 30 | 29 |
| 31 void SetHttpStreamFactory( | 30 void SetHttpStreamFactory( |
| 32 std::unique_ptr<HttpStreamFactory> http_stream_factory); | 31 std::unique_ptr<HttpStreamFactory> http_stream_factory); |
| 33 void SetHttpStreamFactoryForWebSocket( | 32 void SetHttpStreamFactoryForWebSocket( |
| 34 std::unique_ptr<HttpStreamFactory> http_stream_factory_for_websocket); | 33 std::unique_ptr<HttpStreamFactory> http_stream_factory_for_websocket); |
| 35 | 34 |
| 36 void SetNetworkStreamThrottler( | 35 void SetNetworkStreamThrottler( |
| 37 std::unique_ptr<NetworkThrottleManager> network_throttle_manager); | 36 std::unique_ptr<NetworkThrottleManager> network_throttle_manager); |
| 38 | 37 |
| 39 private: | 38 private: |
| 40 HttpNetworkSession* const session_; | 39 HttpNetworkSession* const session_; |
| 41 | 40 |
| 42 DISALLOW_COPY_AND_ASSIGN(HttpNetworkSessionPeer); | 41 DISALLOW_COPY_AND_ASSIGN(HttpNetworkSessionPeer); |
| 43 }; | 42 }; |
| 44 | 43 |
| 45 } // namespace net | 44 } // namespace net |
| 46 | 45 |
| 47 #endif // NET_HTTP_HTTP_NETWORK_SESSION_PEER_H_ | 46 #endif // NET_HTTP_HTTP_NETWORK_SESSION_PEER_H_ |
| OLD | NEW |