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

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

Issue 2856243003: Revert of Landing Recent QUIC changes until Sat Apr 29 00:22:04 2017 +0000 (Closed)
Patch Set: 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);
42 if (!ShouldCreateIncomingDynamicStream(id)) { 41 if (!ShouldCreateIncomingDynamicStream(id)) {
43 return nullptr; 42 return nullptr;
44 } 43 }
45 if (stream_factory_) { 44 if (stream_factory_) {
46 QuicSpdyStream* stream = 45 QuicSpdyStream* stream =
47 stream_factory_->CreateStream(id, this, response_cache()); 46 stream_factory_->CreateStream(id, this, response_cache());
48 ActivateStream(QuicWrapUnique(stream)); 47 ActivateStream(QuicWrapUnique(stream));
49 return stream; 48 return stream;
50 } 49 }
51 return QuicSimpleServerSession::CreateIncomingDynamicStream(id); 50 return QuicSimpleServerSession::CreateIncomingDynamicStream(id);
52 } 51 }
53 52
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
62 QuicCryptoServerStreamBase* CreateQuicCryptoServerStream( 53 QuicCryptoServerStreamBase* CreateQuicCryptoServerStream(
63 const QuicCryptoServerConfig* crypto_config, 54 const QuicCryptoServerConfig* crypto_config,
64 QuicCompressedCertsCache* compressed_certs_cache) override { 55 QuicCompressedCertsCache* compressed_certs_cache) override {
65 if (crypto_stream_factory_) { 56 if (crypto_stream_factory_) {
66 return crypto_stream_factory_->CreateCryptoStream(crypto_config, this); 57 return crypto_stream_factory_->CreateCryptoStream(crypto_config, this);
67 } 58 }
68 return QuicSimpleServerSession::CreateQuicCryptoServerStream( 59 return QuicSimpleServerSession::CreateQuicCryptoServerStream(
69 crypto_config, compressed_certs_cache); 60 crypto_config, compressed_certs_cache);
70 } 61 }
71 62
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 response_cache) {} 202 response_cache) {}
212 203
213 void ImmediateGoAwaySession::OnStreamFrame(const QuicStreamFrame& frame) { 204 void ImmediateGoAwaySession::OnStreamFrame(const QuicStreamFrame& frame) {
214 SendGoAway(QUIC_PEER_GOING_AWAY, ""); 205 SendGoAway(QUIC_PEER_GOING_AWAY, "");
215 QuicSimpleServerSession::OnStreamFrame(frame); 206 QuicSimpleServerSession::OnStreamFrame(frame);
216 } 207 }
217 208
218 } // namespace test 209 } // namespace test
219 210
220 } // namespace net 211 } // 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