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

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

Issue 2228783004: Fix memory corruption from SetMaxPacingRate by inlining PacingSender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@129351671
Patch Set: git pull from upper stream Created 4 years, 4 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
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/core/congestion_control/send_algorithm_interface.h" 8 #include "net/quic/core/congestion_control/send_algorithm_interface.h"
9 #include "net/quic/core/quic_multipath_sent_packet_manager.h" 9 #include "net/quic/core/quic_multipath_sent_packet_manager.h"
10 #include "net/quic/core/quic_packet_writer.h" 10 #include "net/quic/core/quic_packet_writer.h"
11 #include "net/quic/core/quic_received_packet_manager.h" 11 #include "net/quic/core/quic_received_packet_manager.h"
12 #include "net/quic/test_tools/quic_framer_peer.h" 12 #include "net/quic/test_tools/quic_framer_peer.h"
13 #include "net/quic/test_tools/quic_packet_generator_peer.h" 13 #include "net/quic/test_tools/quic_packet_generator_peer.h"
14 #include "net/quic/test_tools/quic_sent_packet_manager_peer.h" 14 #include "net/quic/test_tools/quic_sent_packet_manager_peer.h"
15 15
16 namespace net { 16 namespace net {
17 namespace test { 17 namespace test {
18 18
19 // static 19 // static
20 void QuicConnectionPeer::SendAck(QuicConnection* connection) { 20 void QuicConnectionPeer::SendAck(QuicConnection* connection) {
21 connection->SendAck(); 21 connection->SendAck();
22 } 22 }
23 23
24 // static 24 // static
25 void QuicConnectionPeer::SetSendAlgorithm( 25 void QuicConnectionPeer::SetSendAlgorithm(
26 QuicConnection* connection, 26 QuicConnection* connection,
27 QuicPathId path_id, 27 QuicPathId path_id,
28 SendAlgorithmInterface* send_algorithm) { 28 SendAlgorithmInterface* send_algorithm) {
29 GetSentPacketManager(connection, path_id) 29 GetSentPacketManager(connection, path_id)->SetSendAlgorithm(send_algorithm);
30 ->send_algorithm_.reset(send_algorithm);
31 } 30 }
32 31
33 // static 32 // static
34 void QuicConnectionPeer::SetLossAlgorithm( 33 void QuicConnectionPeer::SetLossAlgorithm(
35 QuicConnection* connection, 34 QuicConnection* connection,
36 QuicPathId path_id, 35 QuicPathId path_id,
37 LossDetectionInterface* loss_algorithm) { 36 LossDetectionInterface* loss_algorithm) {
38 GetSentPacketManager(connection, path_id)->loss_algorithm_ = loss_algorithm; 37 GetSentPacketManager(connection, path_id)->loss_algorithm_ = loss_algorithm;
39 } 38 }
40 39
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 bool QuicConnectionPeer::HasRetransmittableFrames( 303 bool QuicConnectionPeer::HasRetransmittableFrames(
305 QuicConnection* connection, 304 QuicConnection* connection,
306 QuicPathId path_id, 305 QuicPathId path_id,
307 QuicPacketNumber packet_number) { 306 QuicPacketNumber packet_number) {
308 return QuicSentPacketManagerPeer::HasRetransmittableFrames( 307 return QuicSentPacketManagerPeer::HasRetransmittableFrames(
309 GetSentPacketManager(connection, path_id), packet_number); 308 GetSentPacketManager(connection, path_id), packet_number);
310 } 309 }
311 310
312 } // namespace test 311 } // namespace test
313 } // namespace net 312 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_session_test.cc ('k') | net/quic/test_tools/quic_sent_packet_manager_peer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698