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

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

Issue 2179713004: Deprecate FLAGS_quic_always_write_queued_retransmissions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@128171703
Patch Set: Created 4 years, 5 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 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 return sent_packet_manager->unacked_packets_.GetTransmissionInfo( 99 return sent_packet_manager->unacked_packets_.GetTransmissionInfo(
100 packet_number) 100 packet_number)
101 .sent_time; 101 .sent_time;
102 } 102 }
103 103
104 // static 104 // static
105 bool QuicSentPacketManagerPeer::IsRetransmission( 105 bool QuicSentPacketManagerPeer::IsRetransmission(
106 QuicSentPacketManager* sent_packet_manager, 106 QuicSentPacketManager* sent_packet_manager,
107 QuicPathId path_id, 107 QuicPathId path_id,
108 QuicPacketNumber packet_number) { 108 QuicPacketNumber packet_number) {
109 DCHECK(sent_packet_manager->HasRetransmittableFrames(path_id, packet_number)); 109 DCHECK(HasRetransmittableFrames(sent_packet_manager, packet_number));
110 if (!sent_packet_manager->HasRetransmittableFrames(path_id, packet_number)) { 110 if (!HasRetransmittableFrames(sent_packet_manager, packet_number)) {
111 return false; 111 return false;
112 } 112 }
113 for (auto transmission_info : sent_packet_manager->unacked_packets_) { 113 for (auto transmission_info : sent_packet_manager->unacked_packets_) {
114 if (transmission_info.retransmission == packet_number) { 114 if (transmission_info.retransmission == packet_number) {
115 return true; 115 return true;
116 } 116 }
117 } 117 }
118 return false; 118 return false;
119 } 119 }
120 120
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 QuicSentPacketManager* sent_packet_manager) { 185 QuicSentPacketManager* sent_packet_manager) {
186 return sent_packet_manager->sustained_bandwidth_recorder_; 186 return sent_packet_manager->sustained_bandwidth_recorder_;
187 } 187 }
188 188
189 // static 189 // static
190 bool QuicSentPacketManagerPeer::UsingPacing( 190 bool QuicSentPacketManagerPeer::UsingPacing(
191 const QuicSentPacketManager* sent_packet_manager) { 191 const QuicSentPacketManager* sent_packet_manager) {
192 return sent_packet_manager->using_pacing_; 192 return sent_packet_manager->using_pacing_;
193 } 193 }
194 194
195 // static
196 bool QuicSentPacketManagerPeer::IsUnacked(
197 QuicSentPacketManager* sent_packet_manager,
198 QuicPacketNumber packet_number) {
199 return sent_packet_manager->unacked_packets_.IsUnacked(packet_number);
200 }
201
202 // static
203 bool QuicSentPacketManagerPeer::HasRetransmittableFrames(
204 QuicSentPacketManager* sent_packet_manager,
205 QuicPacketNumber packet_number) {
206 return sent_packet_manager->unacked_packets_.HasRetransmittableFrames(
207 packet_number);
208 }
209
195 } // namespace test 210 } // namespace test
196 } // namespace net 211 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_sent_packet_manager_peer.h ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698