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