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

Side by Side Diff: net/quic/test_tools/quic_connection_peer.cc

Issue 1424653008: Make QUIC stateless rejects work in the face of packet loss by storing the SREJ packet(s) in the Qu… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@106432163
Patch Set: Created 5 years, 1 month 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/quic/quic_crypto_server_stream.cc ('k') | net/tools/quic/end_to_end_test.cc » ('j') | 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) 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/quic/test_tools/quic_connection_peer.h" 5 #include "net/quic/test_tools/quic_connection_peer.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "net/quic/congestion_control/send_algorithm_interface.h" 8 #include "net/quic/congestion_control/send_algorithm_interface.h"
9 #include "net/quic/quic_connection.h" 9 #include "net/quic/quic_connection.h"
10 #include "net/quic/quic_packet_writer.h" 10 #include "net/quic/quic_packet_writer.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 } 212 }
213 213
214 // static 214 // static
215 void QuicConnectionPeer::CloseConnection(QuicConnection* connection) { 215 void QuicConnectionPeer::CloseConnection(QuicConnection* connection) {
216 connection->connected_ = false; 216 connection->connected_ = false;
217 } 217 }
218 218
219 // static 219 // static
220 QuicEncryptedPacket* QuicConnectionPeer::GetConnectionClosePacket( 220 QuicEncryptedPacket* QuicConnectionPeer::GetConnectionClosePacket(
221 QuicConnection* connection) { 221 QuicConnection* connection) {
222 return connection->connection_close_packet_.get(); 222 if (connection->termination_packets_ == nullptr ||
223 connection->termination_packets_->empty()) {
224 return nullptr;
225 }
226 return (*connection->termination_packets_)[0];
223 } 227 }
224 228
225 // static 229 // static
226 QuicPacketHeader* QuicConnectionPeer::GetLastHeader( 230 QuicPacketHeader* QuicConnectionPeer::GetLastHeader(
227 QuicConnection* connection) { 231 QuicConnection* connection) {
228 return &connection->last_header_; 232 return &connection->last_header_;
229 } 233 }
230 234
231 // static 235 // static
232 void QuicConnectionPeer::SetPacketNumberOfLastSentPacket( 236 void QuicConnectionPeer::SetPacketNumberOfLastSentPacket(
(...skipping 20 matching lines...) Expand all
253 } 257 }
254 258
255 // static 259 // static
256 void QuicConnectionPeer::SetNextMtuProbeAt(QuicConnection* connection, 260 void QuicConnectionPeer::SetNextMtuProbeAt(QuicConnection* connection,
257 QuicPacketNumber number) { 261 QuicPacketNumber number) {
258 connection->next_mtu_probe_at_ = number; 262 connection->next_mtu_probe_at_ = number;
259 } 263 }
260 264
261 } // namespace test 265 } // namespace test
262 } // namespace net 266 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_crypto_server_stream.cc ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698