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/core/congestion_control/loss_detection_interface.h" | 8 #include "net/quic/core/congestion_control/loss_detection_interface.h" |
9 #include "net/quic/core/congestion_control/send_algorithm_interface.h" | 9 #include "net/quic/core/congestion_control/send_algorithm_interface.h" |
10 #include "net/quic/core/quic_flags.h" | 10 #include "net/quic/core/quic_flags.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 void QuicSentPacketManagerPeer::SetSendAlgorithm( | 68 void QuicSentPacketManagerPeer::SetSendAlgorithm( |
69 QuicSentPacketManager* sent_packet_manager, | 69 QuicSentPacketManager* sent_packet_manager, |
70 SendAlgorithmInterface* send_algorithm) { | 70 SendAlgorithmInterface* send_algorithm) { |
71 sent_packet_manager->send_algorithm_.reset(send_algorithm); | 71 sent_packet_manager->send_algorithm_.reset(send_algorithm); |
72 sent_packet_manager->using_inline_pacing_ = false; | 72 sent_packet_manager->using_inline_pacing_ = false; |
73 } | 73 } |
74 | 74 |
75 // static | 75 // static |
76 const LossDetectionInterface* QuicSentPacketManagerPeer::GetLossAlgorithm( | 76 const LossDetectionInterface* QuicSentPacketManagerPeer::GetLossAlgorithm( |
77 QuicSentPacketManager* sent_packet_manager) { | 77 QuicSentPacketManager* sent_packet_manager) { |
78 return sent_packet_manager->loss_algorithm_.get(); | 78 return sent_packet_manager->loss_algorithm_; |
79 } | 79 } |
80 | 80 |
81 // static | 81 // static |
82 void QuicSentPacketManagerPeer::SetLossAlgorithm( | 82 void QuicSentPacketManagerPeer::SetLossAlgorithm( |
83 QuicSentPacketManager* sent_packet_manager, | 83 QuicSentPacketManager* sent_packet_manager, |
84 LossDetectionInterface* loss_detector) { | 84 LossDetectionInterface* loss_detector) { |
85 sent_packet_manager->loss_algorithm_.reset(loss_detector); | 85 sent_packet_manager->loss_algorithm_ = loss_detector; |
86 } | 86 } |
87 | 87 |
88 // static | 88 // static |
89 bool QuicSentPacketManagerPeer::HasPendingPackets( | 89 bool QuicSentPacketManagerPeer::HasPendingPackets( |
90 const QuicSentPacketManager* sent_packet_manager) { | 90 const QuicSentPacketManager* sent_packet_manager) { |
91 return sent_packet_manager->unacked_packets_.HasInFlightPackets(); | 91 return sent_packet_manager->unacked_packets_.HasInFlightPackets(); |
92 } | 92 } |
93 | 93 |
94 // static | 94 // static |
95 QuicTime QuicSentPacketManagerPeer::GetSentTime( | 95 QuicTime QuicSentPacketManagerPeer::GetSentTime( |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 // static | 203 // static |
204 bool QuicSentPacketManagerPeer::HasRetransmittableFrames( | 204 bool QuicSentPacketManagerPeer::HasRetransmittableFrames( |
205 QuicSentPacketManager* sent_packet_manager, | 205 QuicSentPacketManager* sent_packet_manager, |
206 QuicPacketNumber packet_number) { | 206 QuicPacketNumber packet_number) { |
207 return sent_packet_manager->unacked_packets_.HasRetransmittableFrames( | 207 return sent_packet_manager->unacked_packets_.HasRetransmittableFrames( |
208 packet_number); | 208 packet_number); |
209 } | 209 } |
210 | 210 |
211 } // namespace test | 211 } // namespace test |
212 } // namespace net | 212 } // namespace net |
OLD | NEW |