OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/tools/quic/quic_client_session.h" | 5 #include "net/tools/quic/quic_client_session.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "net/log/net_log_with_source.h" | 9 #include "net/log/net_log_with_source.h" |
10 #include "net/quic/chromium/crypto/proof_verifier_chromium.h" | 10 #include "net/quic/chromium/crypto/proof_verifier_chromium.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 QuicCryptoClientConfig* crypto_config, | 24 QuicCryptoClientConfig* crypto_config, |
25 QuicClientPushPromiseIndex* push_promise_index) | 25 QuicClientPushPromiseIndex* push_promise_index) |
26 : QuicClientSessionBase(connection, push_promise_index, config), | 26 : QuicClientSessionBase(connection, push_promise_index, config), |
27 server_id_(server_id), | 27 server_id_(server_id), |
28 crypto_config_(crypto_config), | 28 crypto_config_(crypto_config), |
29 respect_goaway_(true) {} | 29 respect_goaway_(true) {} |
30 | 30 |
31 QuicClientSession::~QuicClientSession() {} | 31 QuicClientSession::~QuicClientSession() {} |
32 | 32 |
33 void QuicClientSession::Initialize() { | 33 void QuicClientSession::Initialize() { |
34 crypto_stream_.reset(CreateQuicCryptoStream()); | 34 crypto_stream_ = CreateQuicCryptoStream(); |
35 QuicClientSessionBase::Initialize(); | 35 QuicClientSessionBase::Initialize(); |
36 } | 36 } |
37 | 37 |
38 void QuicClientSession::OnProofValid( | 38 void QuicClientSession::OnProofValid( |
39 const QuicCryptoClientConfig::CachedState& /*cached*/) {} | 39 const QuicCryptoClientConfig::CachedState& /*cached*/) {} |
40 | 40 |
41 void QuicClientSession::OnProofVerifyDetailsAvailable( | 41 void QuicClientSession::OnProofVerifyDetailsAvailable( |
42 const ProofVerifyDetails& /*verify_details*/) {} | 42 const ProofVerifyDetails& /*verify_details*/) {} |
43 | 43 |
44 bool QuicClientSession::ShouldCreateOutgoingDynamicStream() { | 44 bool QuicClientSession::ShouldCreateOutgoingDynamicStream() { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 QuicStreamId id) { | 117 QuicStreamId id) { |
118 if (!ShouldCreateIncomingDynamicStream(id)) { | 118 if (!ShouldCreateIncomingDynamicStream(id)) { |
119 return nullptr; | 119 return nullptr; |
120 } | 120 } |
121 QuicSpdyStream* stream = new QuicSpdyClientStream(id, this); | 121 QuicSpdyStream* stream = new QuicSpdyClientStream(id, this); |
122 stream->CloseWriteSide(); | 122 stream->CloseWriteSide(); |
123 ActivateStream(base::WrapUnique(stream)); | 123 ActivateStream(base::WrapUnique(stream)); |
124 return stream; | 124 return stream; |
125 } | 125 } |
126 | 126 |
127 QuicCryptoClientStreamBase* QuicClientSession::CreateQuicCryptoStream() { | 127 std::unique_ptr<QuicCryptoClientStreamBase> |
128 return new QuicCryptoClientStream( | 128 QuicClientSession::CreateQuicCryptoStream() { |
| 129 return base::MakeUnique<QuicCryptoClientStream>( |
129 server_id_, this, new ProofVerifyContextChromium(0, NetLogWithSource()), | 130 server_id_, this, new ProofVerifyContextChromium(0, NetLogWithSource()), |
130 crypto_config_, this); | 131 crypto_config_, this); |
131 } | 132 } |
132 | 133 |
133 bool QuicClientSession::IsAuthorized(const string& authority) { | 134 bool QuicClientSession::IsAuthorized(const string& authority) { |
134 return true; | 135 return true; |
135 } | 136 } |
136 | 137 |
137 } // namespace net | 138 } // namespace net |
OLD | NEW |