OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_sent_packet_manager_peer.h" | 5 #include "net/quic/test_tools/quic_sent_packet_manager_peer.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "net/quic/congestion_control/loss_detection_interface.h" | 8 #include "net/quic/congestion_control/loss_detection_interface.h" |
9 #include "net/quic/congestion_control/send_algorithm_interface.h" | 9 #include "net/quic/congestion_control/send_algorithm_interface.h" |
10 #include "net/quic/quic_flags.h" | 10 #include "net/quic/quic_flags.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 return sent_packet_manager->enable_half_rtt_tail_loss_probe_; | 33 return sent_packet_manager->enable_half_rtt_tail_loss_probe_; |
34 } | 34 } |
35 | 35 |
36 // static | 36 // static |
37 bool QuicSentPacketManagerPeer::GetUseNewRto( | 37 bool QuicSentPacketManagerPeer::GetUseNewRto( |
38 QuicSentPacketManager* sent_packet_manager) { | 38 QuicSentPacketManager* sent_packet_manager) { |
39 return sent_packet_manager->use_new_rto_; | 39 return sent_packet_manager->use_new_rto_; |
40 } | 40 } |
41 | 41 |
42 // static | 42 // static |
| 43 bool QuicSentPacketManagerPeer::GetUndoRetransmits( |
| 44 QuicSentPacketManager* sent_packet_manager) { |
| 45 return sent_packet_manager->undo_pending_retransmits_; |
| 46 } |
| 47 |
| 48 // static |
43 QuicByteCount QuicSentPacketManagerPeer::GetReceiveWindow( | 49 QuicByteCount QuicSentPacketManagerPeer::GetReceiveWindow( |
44 QuicSentPacketManager* sent_packet_manager) { | 50 QuicSentPacketManager* sent_packet_manager) { |
45 return sent_packet_manager->receive_buffer_bytes_; | 51 return sent_packet_manager->receive_buffer_bytes_; |
46 } | 52 } |
47 | 53 |
48 // static | 54 // static |
49 void QuicSentPacketManagerPeer::SetPerspective( | 55 void QuicSentPacketManagerPeer::SetPerspective( |
50 QuicSentPacketManager* sent_packet_manager, | 56 QuicSentPacketManager* sent_packet_manager, |
51 Perspective perspective) { | 57 Perspective perspective) { |
52 sent_packet_manager->perspective_ = perspective; | 58 sent_packet_manager->perspective_ = perspective; |
(...skipping 19 matching lines...) Expand all Loading... |
72 } | 78 } |
73 | 79 |
74 // static | 80 // static |
75 void QuicSentPacketManagerPeer::SetLossAlgorithm( | 81 void QuicSentPacketManagerPeer::SetLossAlgorithm( |
76 QuicSentPacketManager* sent_packet_manager, | 82 QuicSentPacketManager* sent_packet_manager, |
77 LossDetectionInterface* loss_detector) { | 83 LossDetectionInterface* loss_detector) { |
78 sent_packet_manager->loss_algorithm_.reset(loss_detector); | 84 sent_packet_manager->loss_algorithm_.reset(loss_detector); |
79 } | 85 } |
80 | 86 |
81 // static | 87 // static |
82 RttStats* QuicSentPacketManagerPeer::GetRttStats( | |
83 QuicSentPacketManager* sent_packet_manager) { | |
84 return &sent_packet_manager->rtt_stats_; | |
85 } | |
86 | |
87 // static | |
88 bool QuicSentPacketManagerPeer::HasPendingPackets( | 88 bool QuicSentPacketManagerPeer::HasPendingPackets( |
89 const QuicSentPacketManager* sent_packet_manager) { | 89 const QuicSentPacketManager* sent_packet_manager) { |
90 return sent_packet_manager->unacked_packets_.HasInFlightPackets(); | 90 return sent_packet_manager->unacked_packets_.HasInFlightPackets(); |
91 } | 91 } |
92 | 92 |
93 // static | 93 // static |
94 QuicTime QuicSentPacketManagerPeer::GetSentTime( | 94 QuicTime QuicSentPacketManagerPeer::GetSentTime( |
95 const QuicSentPacketManager* sent_packet_manager, | 95 const QuicSentPacketManager* sent_packet_manager, |
96 QuicPacketNumber packet_number) { | 96 QuicPacketNumber packet_number) { |
97 DCHECK(sent_packet_manager->unacked_packets_.IsUnacked(packet_number)); | 97 DCHECK(sent_packet_manager->unacked_packets_.IsUnacked(packet_number)); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 } | 179 } |
180 | 180 |
181 // static | 181 // static |
182 QuicSustainedBandwidthRecorder& QuicSentPacketManagerPeer::GetBandwidthRecorder( | 182 QuicSustainedBandwidthRecorder& QuicSentPacketManagerPeer::GetBandwidthRecorder( |
183 QuicSentPacketManager* sent_packet_manager) { | 183 QuicSentPacketManager* sent_packet_manager) { |
184 return sent_packet_manager->sustained_bandwidth_recorder_; | 184 return sent_packet_manager->sustained_bandwidth_recorder_; |
185 } | 185 } |
186 | 186 |
187 } // namespace test | 187 } // namespace test |
188 } // namespace net | 188 } // namespace net |
OLD | NEW |