http_network_session_peer.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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
  3. // found in the LICENSE file.
  4. #ifndef NET_HTTP_HTTP_NETWORK_SESSION_PEER_H_
  5. #define NET_HTTP_HTTP_NETWORK_SESSION_PEER_H_
  6. #include <memory>
  7. #include "base/memory/raw_ptr.h"
  8. #include "base/memory/ref_counted.h"
  9. #include "net/base/net_export.h"
  10. namespace net {
  11. class ClientSocketPoolManager;
  12. class HttpStreamFactory;
  13. class HttpNetworkSession;
  14. struct HttpNetworkSessionParams;
  15. class NET_EXPORT_PRIVATE HttpNetworkSessionPeer {
  16. public:
  17. // |session| should outlive the HttpNetworkSessionPeer.
  18. explicit HttpNetworkSessionPeer(HttpNetworkSession* session);
  19. HttpNetworkSessionPeer(const HttpNetworkSessionPeer&) = delete;
  20. HttpNetworkSessionPeer& operator=(const HttpNetworkSessionPeer&) = delete;
  21. ~HttpNetworkSessionPeer();
  22. void SetClientSocketPoolManager(
  23. std::unique_ptr<ClientSocketPoolManager> socket_pool_manager);
  24. void SetHttpStreamFactory(
  25. std::unique_ptr<HttpStreamFactory> http_stream_factory);
  26. HttpNetworkSessionParams* params();
  27. private:
  28. const raw_ptr<HttpNetworkSession> session_;
  29. };
  30. } // namespace net
  31. #endif // NET_HTTP_HTTP_NETWORK_SESSION_PEER_H_