test_quic_crypto_client_config_handle.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2019 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_TEST_QUIC_CRYPTO_CLIENT_CONFIG_HANDLE_H_
  5. #define NET_QUIC_TEST_QUIC_CRYPTO_CLIENT_CONFIG_HANDLE_H_
  6. #include "base/memory/raw_ptr.h"
  7. #include "net/quic/quic_crypto_client_config_handle.h"
  8. namespace quic {
  9. class QuicCryptoClientConfig;
  10. } // namespace quic
  11. namespace net {
  12. // Test implementation of QuicCryptoClientConfigHandle. Wraps a passed in
  13. // QuicCryptoClientConfig and returns it as needed. Does nothing on destruction.
  14. class TestQuicCryptoClientConfigHandle : public QuicCryptoClientConfigHandle {
  15. public:
  16. explicit TestQuicCryptoClientConfigHandle(
  17. quic::QuicCryptoClientConfig* crypto_config);
  18. TestQuicCryptoClientConfigHandle& operator=(
  19. const TestQuicCryptoClientConfigHandle&) = delete;
  20. ~TestQuicCryptoClientConfigHandle() override;
  21. quic::QuicCryptoClientConfig* GetConfig() const override;
  22. private:
  23. const raw_ptr<quic::QuicCryptoClientConfig> crypto_config_;
  24. };
  25. } // namespace net
  26. #endif // NET_QUIC_TEST_QUIC_CRYPTO_CLIENT_CONFIG_HANDLE_H_