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

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

Issue 2100863003: Disable QUIC v29 and earlier. Protected by FLAGS_quic_disable_pre_30. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@home
Patch Set: Fixing compile error on android. Created 4 years, 5 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_dispatcher.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 "base/logging.h" 7 #include "base/logging.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/synchronization/lock.h" 9 #include "base/synchronization/lock.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 QuicServerSessionBase* CreateQuicSession(QuicConnectionId id, 97 QuicServerSessionBase* CreateQuicSession(QuicConnectionId id,
98 const IPEndPoint& client) override { 98 const IPEndPoint& client) override {
99 base::AutoLock lock(factory_lock_); 99 base::AutoLock lock(factory_lock_);
100 if (session_factory_ == nullptr && stream_factory_ == nullptr && 100 if (session_factory_ == nullptr && stream_factory_ == nullptr &&
101 crypto_stream_factory_ == nullptr) { 101 crypto_stream_factory_ == nullptr) {
102 return QuicDispatcher::CreateQuicSession(id, client); 102 return QuicDispatcher::CreateQuicSession(id, client);
103 } 103 }
104 QuicConnection* connection = new QuicConnection( 104 QuicConnection* connection = new QuicConnection(
105 id, client, helper(), alarm_factory(), CreatePerConnectionWriter(), 105 id, client, helper(), alarm_factory(), CreatePerConnectionWriter(),
106 /* owns_writer= */ true, Perspective::IS_SERVER, supported_versions()); 106 /* owns_writer= */ true, Perspective::IS_SERVER,
107 GetSupportedVersions());
107 108
108 QuicServerSessionBase* session = nullptr; 109 QuicServerSessionBase* session = nullptr;
109 if (stream_factory_ != nullptr || crypto_stream_factory_ != nullptr) { 110 if (stream_factory_ != nullptr || crypto_stream_factory_ != nullptr) {
110 session = new CustomStreamSession( 111 session = new CustomStreamSession(
111 config(), connection, this, session_helper(), crypto_config(), 112 config(), connection, this, session_helper(), crypto_config(),
112 compressed_certs_cache(), stream_factory_, crypto_stream_factory_); 113 compressed_certs_cache(), stream_factory_, crypto_stream_factory_);
113 } else { 114 } else {
114 session = session_factory_->CreateSession( 115 session = session_factory_->CreateSession(
115 config(), connection, this, session_helper(), crypto_config(), 116 config(), connection, this, session_helper(), crypto_config(),
116 compressed_certs_cache()); 117 compressed_certs_cache());
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 crypto_config, 201 crypto_config,
201 compressed_certs_cache) {} 202 compressed_certs_cache) {}
202 203
203 void ImmediateGoAwaySession::OnStreamFrame(const QuicStreamFrame& frame) { 204 void ImmediateGoAwaySession::OnStreamFrame(const QuicStreamFrame& frame) {
204 SendGoAway(QUIC_PEER_GOING_AWAY, ""); 205 SendGoAway(QUIC_PEER_GOING_AWAY, "");
205 QuicSimpleServerSession::OnStreamFrame(frame); 206 QuicSimpleServerSession::OnStreamFrame(frame);
206 } 207 }
207 208
208 } // namespace test 209 } // namespace test
209 } // namespace net 210 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_dispatcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698