OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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/test_tools/quic_test_server.h" | 5 #include "net/tools/quic/test_tools/quic_test_server.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 "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "net/tools/quic/quic_simple_server_stream.h" | 27 #include "net/tools/quic/quic_simple_server_stream.h" |
28 | 28 |
29 namespace net { | 29 namespace net { |
30 namespace test { | 30 namespace test { |
31 | 31 |
32 class CustomStreamSession : public QuicSimpleServerSession { | 32 class CustomStreamSession : public QuicSimpleServerSession { |
33 public: | 33 public: |
34 CustomStreamSession( | 34 CustomStreamSession( |
35 const QuicConfig& config, | 35 const QuicConfig& config, |
36 QuicConnection* connection, | 36 QuicConnection* connection, |
37 QuicServerSessionBase::Visitor* visitor, | 37 QuicSession::Visitor* visitor, |
38 QuicCryptoServerStream::Helper* helper, | 38 QuicCryptoServerStream::Helper* helper, |
39 const QuicCryptoServerConfig* crypto_config, | 39 const QuicCryptoServerConfig* crypto_config, |
40 QuicCompressedCertsCache* compressed_certs_cache, | 40 QuicCompressedCertsCache* compressed_certs_cache, |
41 QuicTestServer::StreamFactory* factory, | 41 QuicTestServer::StreamFactory* factory, |
42 QuicTestServer::CryptoStreamFactory* crypto_stream_factory) | 42 QuicTestServer::CryptoStreamFactory* crypto_stream_factory) |
43 : QuicSimpleServerSession(config, | 43 : QuicSimpleServerSession(config, |
44 connection, | 44 connection, |
45 visitor, | 45 visitor, |
46 helper, | 46 helper, |
47 crypto_config, | 47 crypto_config, |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 void QuicTestServer::SetCryptoStreamFactory(CryptoStreamFactory* factory) { | 184 void QuicTestServer::SetCryptoStreamFactory(CryptoStreamFactory* factory) { |
185 static_cast<QuicTestDispatcher*>(dispatcher()) | 185 static_cast<QuicTestDispatcher*>(dispatcher()) |
186 ->SetCryptoStreamFactory(factory); | 186 ->SetCryptoStreamFactory(factory); |
187 } | 187 } |
188 | 188 |
189 /////////////////////////// TEST SESSIONS /////////////////////////////// | 189 /////////////////////////// TEST SESSIONS /////////////////////////////// |
190 | 190 |
191 ImmediateGoAwaySession::ImmediateGoAwaySession( | 191 ImmediateGoAwaySession::ImmediateGoAwaySession( |
192 const QuicConfig& config, | 192 const QuicConfig& config, |
193 QuicConnection* connection, | 193 QuicConnection* connection, |
194 QuicServerSessionBase::Visitor* visitor, | 194 QuicSession::Visitor* visitor, |
195 QuicCryptoServerStream::Helper* helper, | 195 QuicCryptoServerStream::Helper* helper, |
196 const QuicCryptoServerConfig* crypto_config, | 196 const QuicCryptoServerConfig* crypto_config, |
197 QuicCompressedCertsCache* compressed_certs_cache) | 197 QuicCompressedCertsCache* compressed_certs_cache) |
198 : QuicSimpleServerSession(config, | 198 : QuicSimpleServerSession(config, |
199 connection, | 199 connection, |
200 visitor, | 200 visitor, |
201 helper, | 201 helper, |
202 crypto_config, | 202 crypto_config, |
203 compressed_certs_cache) {} | 203 compressed_certs_cache) {} |
204 | 204 |
205 void ImmediateGoAwaySession::OnStreamFrame(const QuicStreamFrame& frame) { | 205 void ImmediateGoAwaySession::OnStreamFrame(const QuicStreamFrame& frame) { |
206 SendGoAway(QUIC_PEER_GOING_AWAY, ""); | 206 SendGoAway(QUIC_PEER_GOING_AWAY, ""); |
207 QuicSimpleServerSession::OnStreamFrame(frame); | 207 QuicSimpleServerSession::OnStreamFrame(frame); |
208 } | 208 } |
209 | 209 |
210 } // namespace test | 210 } // namespace test |
211 } // namespace net | 211 } // namespace net |
OLD | NEW |