1 // Copyright 2012 The Chromium Authors 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 8 #include <memory> 9 10 #include "base/memory/raw_ptr.h" 11 #include "net/base/net_export.h" 12 13 namespace net { 14 15 class ClientSocketPoolManager; 16 class HttpStreamFactory; 17 class HttpNetworkSession; 18 struct HttpNetworkSessionParams; 19 20 class NET_EXPORT_PRIVATE HttpNetworkSessionPeer { 21 public: 22 // |session| should outlive the HttpNetworkSessionPeer. 23 explicit HttpNetworkSessionPeer(HttpNetworkSession* session); 24 25 HttpNetworkSessionPeer(const HttpNetworkSessionPeer&) = delete; 26 HttpNetworkSessionPeer& operator=(const HttpNetworkSessionPeer&) = delete; 27 28 ~HttpNetworkSessionPeer(); 29 30 void SetClientSocketPoolManager( 31 std::unique_ptr<ClientSocketPoolManager> socket_pool_manager); 32 33 void SetHttpStreamFactory( 34 std::unique_ptr<HttpStreamFactory> http_stream_factory); 35 36 HttpNetworkSessionParams* params(); 37 38 private: 39 const raw_ptr<HttpNetworkSession> session_; 40 }; 41 42 } // namespace net 43 44 #endif // NET_HTTP_HTTP_NETWORK_SESSION_PEER_H_ 45