Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: net/quic/quic_crypto_client_stream_factory.cc

Issue 1665743003: Refactor QuicCryptoClientStream to use QuicSession directly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@113297234
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/quic_crypto_client_stream.cc ('k') | net/quic/test_tools/mock_crypto_client_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_crypto_client_stream_factory.h" 5 #include "net/quic/quic_crypto_client_stream_factory.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "net/quic/crypto/proof_verifier_chromium.h" 8 #include "net/quic/crypto/proof_verifier_chromium.h"
9 #include "net/quic/quic_chromium_client_session.h" 9 #include "net/quic/quic_chromium_client_session.h"
10 #include "net/quic/quic_crypto_client_stream.h" 10 #include "net/quic/quic_crypto_client_stream.h"
11 11
12 namespace net { 12 namespace net {
13 13
14 namespace { 14 namespace {
15 15
16 class DefaultCryptoStreamFactory : public QuicCryptoClientStreamFactory { 16 class DefaultCryptoStreamFactory : public QuicCryptoClientStreamFactory {
17 public: 17 public:
18 QuicCryptoClientStream* CreateQuicCryptoClientStream( 18 QuicCryptoClientStream* CreateQuicCryptoClientStream(
19 const QuicServerId& server_id, 19 const QuicServerId& server_id,
20 QuicChromiumClientSession* session, 20 QuicChromiumClientSession* session,
21 scoped_ptr<ProofVerifyContext> proof_verify_context, 21 scoped_ptr<ProofVerifyContext> proof_verify_context,
22 QuicCryptoClientConfig* crypto_config) override { 22 QuicCryptoClientConfig* crypto_config) override {
23 return new QuicCryptoClientStream( 23 return new QuicCryptoClientStream(server_id, session,
24 server_id, session, proof_verify_context.release(), crypto_config); 24 proof_verify_context.release(),
25 crypto_config, session);
25 } 26 }
26 }; 27 };
27 28
28 static base::LazyInstance<DefaultCryptoStreamFactory>::Leaky 29 static base::LazyInstance<DefaultCryptoStreamFactory>::Leaky
29 g_default_crypto_stream_factory = LAZY_INSTANCE_INITIALIZER; 30 g_default_crypto_stream_factory = LAZY_INSTANCE_INITIALIZER;
30 31
31 } // namespace 32 } // namespace
32 33
33 // static 34 // static
34 QuicCryptoClientStreamFactory* 35 QuicCryptoClientStreamFactory*
35 QuicCryptoClientStreamFactory::GetDefaultFactory() { 36 QuicCryptoClientStreamFactory::GetDefaultFactory() {
36 return g_default_crypto_stream_factory.Pointer(); 37 return g_default_crypto_stream_factory.Pointer();
37 } 38 }
38 39
39 } // namespace net 40 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_crypto_client_stream.cc ('k') | net/quic/test_tools/mock_crypto_client_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698