| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2016 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 | |
| 5 #include "net/quic/quic_crypto_client_stream_factory.h" | |
| 6 | |
| 7 #include "base/lazy_instance.h" | |
| 8 #include "net/quic/chromium/crypto/proof_verifier_chromium.h" | |
| 9 #include "net/quic/chromium/quic_chromium_client_session.h" | |
| 10 #include "net/quic/quic_crypto_client_stream.h" | |
| 11 | |
| 12 namespace net { | |
| 13 | |
| 14 namespace { | |
| 15 | |
| 16 class DefaultCryptoStreamFactory : public QuicCryptoClientStreamFactory { | |
| 17 public: | |
| 18 QuicCryptoClientStream* CreateQuicCryptoClientStream( | |
| 19 const QuicServerId& server_id, | |
| 20 QuicChromiumClientSession* session, | |
| 21 std::unique_ptr<ProofVerifyContext> proof_verify_context, | |
| 22 QuicCryptoClientConfig* crypto_config) override { | |
| 23 return new QuicCryptoClientStream(server_id, session, | |
| 24 proof_verify_context.release(), | |
| 25 crypto_config, session); | |
| 26 } | |
| 27 }; | |
| 28 | |
| 29 static base::LazyInstance<DefaultCryptoStreamFactory>::Leaky | |
| 30 g_default_crypto_stream_factory = LAZY_INSTANCE_INITIALIZER; | |
| 31 | |
| 32 } // namespace | |
| 33 | |
| 34 // static | |
| 35 QuicCryptoClientStreamFactory* | |
| 36 QuicCryptoClientStreamFactory::GetDefaultFactory() { | |
| 37 return g_default_crypto_stream_factory.Pointer(); | |
| 38 } | |
| 39 | |
| 40 } // namespace net | |
| OLD | NEW |