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

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

Issue 1658993002: Deprecate FLAGS_quic_track_single_retransmission. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@112982932
Patch Set: Created 4 years, 10 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
« no previous file with comments | « net/quic/quic_unacked_packet_map.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 QuicPacketNumber packet_number) { 107 QuicPacketNumber packet_number) {
108 DCHECK(sent_packet_manager->HasRetransmittableFrames(packet_number)); 108 DCHECK(sent_packet_manager->HasRetransmittableFrames(packet_number));
109 if (FLAGS_quic_track_single_retransmission) { 109 if (!sent_packet_manager->HasRetransmittableFrames(packet_number)) {
110 if (!sent_packet_manager->HasRetransmittableFrames(packet_number)) {
111 return false;
112 }
113 for (auto transmission_info : sent_packet_manager->unacked_packets_) {
114 if (transmission_info.retransmission == packet_number) {
115 return true;
116 }
117 }
118 return false; 110 return false;
119 } 111 }
120 return sent_packet_manager->HasRetransmittableFrames(packet_number) && 112 for (auto transmission_info : sent_packet_manager->unacked_packets_) {
121 sent_packet_manager->unacked_packets_.GetTransmissionInfo( 113 if (transmission_info.retransmission == packet_number) {
122 packet_number) 114 return true;
123 .all_transmissions != nullptr; 115 }
116 }
117 return false;
124 } 118 }
125 119
126 // static 120 // static
127 void QuicSentPacketManagerPeer::MarkForRetransmission( 121 void QuicSentPacketManagerPeer::MarkForRetransmission(
128 QuicSentPacketManager* sent_packet_manager, 122 QuicSentPacketManager* sent_packet_manager,
129 QuicPacketNumber packet_number, 123 QuicPacketNumber packet_number,
130 TransmissionType transmission_type) { 124 TransmissionType transmission_type) {
131 sent_packet_manager->MarkForRetransmission(packet_number, transmission_type); 125 sent_packet_manager->MarkForRetransmission(packet_number, transmission_type);
132 } 126 }
133 127
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 165 }
172 166
173 // static 167 // static
174 QuicSustainedBandwidthRecorder& QuicSentPacketManagerPeer::GetBandwidthRecorder( 168 QuicSustainedBandwidthRecorder& QuicSentPacketManagerPeer::GetBandwidthRecorder(
175 QuicSentPacketManager* sent_packet_manager) { 169 QuicSentPacketManager* sent_packet_manager) {
176 return sent_packet_manager->sustained_bandwidth_recorder_; 170 return sent_packet_manager->sustained_bandwidth_recorder_;
177 } 171 }
178 172
179 } // namespace test 173 } // namespace test
180 } // namespace net 174 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_unacked_packet_map.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698