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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 } | 78 } |
79 | 79 |
80 // static | 80 // static |
81 void QuicSentPacketManagerPeer::SetLossAlgorithm( | 81 void QuicSentPacketManagerPeer::SetLossAlgorithm( |
82 QuicSentPacketManager* sent_packet_manager, | 82 QuicSentPacketManager* sent_packet_manager, |
83 LossDetectionInterface* loss_detector) { | 83 LossDetectionInterface* loss_detector) { |
84 sent_packet_manager->loss_algorithm_.reset(loss_detector); | 84 sent_packet_manager->loss_algorithm_.reset(loss_detector); |
85 } | 85 } |
86 | 86 |
87 // static | 87 // static |
88 RttStats* QuicSentPacketManagerPeer::GetRttStats( | |
89 QuicSentPacketManager* sent_packet_manager) { | |
90 return &sent_packet_manager->rtt_stats_; | |
91 } | |
92 | |
93 // static | |
94 bool QuicSentPacketManagerPeer::HasPendingPackets( | 88 bool QuicSentPacketManagerPeer::HasPendingPackets( |
95 const QuicSentPacketManager* sent_packet_manager) { | 89 const QuicSentPacketManager* sent_packet_manager) { |
96 return sent_packet_manager->unacked_packets_.HasInFlightPackets(); | 90 return sent_packet_manager->unacked_packets_.HasInFlightPackets(); |
97 } | 91 } |
98 | 92 |
99 // static | 93 // static |
100 QuicTime QuicSentPacketManagerPeer::GetSentTime( | 94 QuicTime QuicSentPacketManagerPeer::GetSentTime( |
101 const QuicSentPacketManager* sent_packet_manager, | 95 const QuicSentPacketManager* sent_packet_manager, |
102 QuicPacketNumber packet_number) { | 96 QuicPacketNumber packet_number) { |
103 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... |
185 } | 179 } |
186 | 180 |
187 // static | 181 // static |
188 QuicSustainedBandwidthRecorder& QuicSentPacketManagerPeer::GetBandwidthRecorder( | 182 QuicSustainedBandwidthRecorder& QuicSentPacketManagerPeer::GetBandwidthRecorder( |
189 QuicSentPacketManager* sent_packet_manager) { | 183 QuicSentPacketManager* sent_packet_manager) { |
190 return sent_packet_manager->sustained_bandwidth_recorder_; | 184 return sent_packet_manager->sustained_bandwidth_recorder_; |
191 } | 185 } |
192 | 186 |
193 } // namespace test | 187 } // namespace test |
194 } // namespace net | 188 } // namespace net |
OLD | NEW |