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

Side by Side Diff: net/tools/quic/test_tools/quic_test_server.cc

Issue 2862563003: Landing Recent QUIC changes until Sat Apr 29 00:22:04 2017 +0000 (Closed)
Patch Set: rebase and fix test bugs detected by swarm bot. Created 3 years, 7 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/tools/quic/quic_spdy_server_stream_base_test.cc ('k') | no next file » | 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) 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 "net/quic/platform/api/quic_ptr_util.h" 7 #include "net/quic/platform/api/quic_ptr_util.h"
8 #include "net/tools/quic/quic_epoll_alarm_factory.h" 8 #include "net/tools/quic/quic_epoll_alarm_factory.h"
9 #include "net/tools/quic/quic_epoll_connection_helper.h" 9 #include "net/tools/quic/quic_epoll_connection_helper.h"
10 #include "net/tools/quic/quic_simple_crypto_server_stream_helper.h" 10 #include "net/tools/quic/quic_simple_crypto_server_stream_helper.h"
(...skipping 20 matching lines...) Expand all
31 connection, 31 connection,
32 visitor, 32 visitor,
33 helper, 33 helper,
34 crypto_config, 34 crypto_config,
35 compressed_certs_cache, 35 compressed_certs_cache,
36 response_cache), 36 response_cache),
37 stream_factory_(stream_factory), 37 stream_factory_(stream_factory),
38 crypto_stream_factory_(crypto_stream_factory) {} 38 crypto_stream_factory_(crypto_stream_factory) {}
39 39
40 QuicSpdyStream* CreateIncomingDynamicStream(QuicStreamId id) override { 40 QuicSpdyStream* CreateIncomingDynamicStream(QuicStreamId id) override {
41 DCHECK(!FLAGS_quic_reloadable_flag_quic_refactor_stream_creation);
41 if (!ShouldCreateIncomingDynamicStream(id)) { 42 if (!ShouldCreateIncomingDynamicStream(id)) {
42 return nullptr; 43 return nullptr;
43 } 44 }
44 if (stream_factory_) { 45 if (stream_factory_) {
45 QuicSpdyStream* stream = 46 QuicSpdyStream* stream =
46 stream_factory_->CreateStream(id, this, response_cache()); 47 stream_factory_->CreateStream(id, this, response_cache());
47 ActivateStream(QuicWrapUnique(stream)); 48 ActivateStream(QuicWrapUnique(stream));
48 return stream; 49 return stream;
49 } 50 }
50 return QuicSimpleServerSession::CreateIncomingDynamicStream(id); 51 return QuicSimpleServerSession::CreateIncomingDynamicStream(id);
51 } 52 }
52 53
54 std::unique_ptr<QuicStream> CreateStream(QuicStreamId id) override {
55 if (stream_factory_) {
56 return QuicWrapUnique<QuicSpdyStream>(
57 stream_factory_->CreateStream(id, this, response_cache()));
58 }
59 return QuicSimpleServerSession::CreateStream(id);
60 }
61
53 QuicCryptoServerStreamBase* CreateQuicCryptoServerStream( 62 QuicCryptoServerStreamBase* CreateQuicCryptoServerStream(
54 const QuicCryptoServerConfig* crypto_config, 63 const QuicCryptoServerConfig* crypto_config,
55 QuicCompressedCertsCache* compressed_certs_cache) override { 64 QuicCompressedCertsCache* compressed_certs_cache) override {
56 if (crypto_stream_factory_) { 65 if (crypto_stream_factory_) {
57 return crypto_stream_factory_->CreateCryptoStream(crypto_config, this); 66 return crypto_stream_factory_->CreateCryptoStream(crypto_config, this);
58 } 67 }
59 return QuicSimpleServerSession::CreateQuicCryptoServerStream( 68 return QuicSimpleServerSession::CreateQuicCryptoServerStream(
60 crypto_config, compressed_certs_cache); 69 crypto_config, compressed_certs_cache);
61 } 70 }
62 71
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 response_cache) {} 211 response_cache) {}
203 212
204 void ImmediateGoAwaySession::OnStreamFrame(const QuicStreamFrame& frame) { 213 void ImmediateGoAwaySession::OnStreamFrame(const QuicStreamFrame& frame) {
205 SendGoAway(QUIC_PEER_GOING_AWAY, ""); 214 SendGoAway(QUIC_PEER_GOING_AWAY, "");
206 QuicSimpleServerSession::OnStreamFrame(frame); 215 QuicSimpleServerSession::OnStreamFrame(frame);
207 } 216 }
208 217
209 } // namespace test 218 } // namespace test
210 219
211 } // namespace net 220 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_spdy_server_stream_base_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698