quic_crypto_client_stream_factory.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Copyright (c) 2013 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_QUIC_QUIC_CRYPTO_CLIENT_STREAM_FACTORY_H_
  5. #define NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_FACTORY_H_
  6. #include <memory>
  7. #include "net/base/net_export.h"
  8. #include "net/third_party/quiche/src/quiche/quic/core/quic_server_id.h"
  9. namespace quic {
  10. class ProofVerifyContext;
  11. } // namespace quic
  12. namespace net {
  13. class QuicChromiumClientSession;
  14. } // namespace net
  15. namespace quic {
  16. class QuicCryptoClientConfig;
  17. class QuicCryptoClientStream;
  18. } // namespace quic
  19. namespace net {
  20. // An interface used to instantiate quic::QuicCryptoClientStream objects. Used
  21. // to facilitate testing code with mock implementations.
  22. class NET_EXPORT QuicCryptoClientStreamFactory {
  23. public:
  24. virtual ~QuicCryptoClientStreamFactory() = default;
  25. virtual std::unique_ptr<quic::QuicCryptoClientStream>
  26. CreateQuicCryptoClientStream(
  27. const quic::QuicServerId& server_id,
  28. QuicChromiumClientSession* session,
  29. std::unique_ptr<quic::ProofVerifyContext> proof_verify_context,
  30. quic::QuicCryptoClientConfig* crypto_config) = 0;
  31. static QuicCryptoClientStreamFactory* GetDefaultFactory();
  32. };
  33. } // namespace net
  34. #endif // NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_FACTORY_H_