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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 1660533002: Landing Recent QUIC changes until 01/26/2016 18:14 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_protocol.cc ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_sent_packet_manager.cc
diff --git a/net/quic/quic_sent_packet_manager.cc b/net/quic/quic_sent_packet_manager.cc
index e6babd10638674cf04117532af80c1c745efb75c..c8b01dabfcc97b59169b9daeb2110b3e6c4d07c0 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -414,31 +414,11 @@ void QuicSentPacketManager::RecordOneSpuriousRetransmission(
void QuicSentPacketManager::RecordSpuriousRetransmissions(
const TransmissionInfo& info,
QuicPacketNumber acked_packet_number) {
- if (unacked_packets_.track_single_retransmission()) {
- QuicPacketNumber retransmission = info.retransmission;
- while (retransmission != 0) {
- const TransmissionInfo& retransmit_info =
- unacked_packets_.GetTransmissionInfo(retransmission);
- retransmission = retransmit_info.retransmission;
- RecordOneSpuriousRetransmission(retransmit_info);
- }
- return;
- }
- const PacketNumberList* all_transmissions = info.all_transmissions;
- for (PacketNumberList::const_reverse_iterator it =
- all_transmissions->rbegin();
- it != all_transmissions->rend() && *it > acked_packet_number; ++it) {
- // ianswett: Prevents crash in b/20552846.
- if (*it < unacked_packets_.GetLeastUnacked() ||
- *it > unacked_packets_.largest_sent_packet()) {
- QUIC_BUG << "Retransmission out of range:" << *it
- << " least unacked:" << unacked_packets_.GetLeastUnacked()
- << " largest sent:" << unacked_packets_.largest_sent_packet();
- return;
- }
+ QuicPacketNumber retransmission = info.retransmission;
+ while (retransmission != 0) {
const TransmissionInfo& retransmit_info =
- unacked_packets_.GetTransmissionInfo(*it);
-
+ unacked_packets_.GetTransmissionInfo(retransmission);
+ retransmission = retransmit_info.retransmission;
RecordOneSpuriousRetransmission(retransmit_info);
}
}
@@ -480,19 +460,13 @@ PendingRetransmission QuicSentPacketManager::NextPendingRetransmission() {
QuicPacketNumber QuicSentPacketManager::GetNewestRetransmission(
QuicPacketNumber packet_number,
const TransmissionInfo& transmission_info) const {
- if (unacked_packets_.track_single_retransmission()) {
- QuicPacketNumber retransmission = transmission_info.retransmission;
- while (retransmission != 0) {
- packet_number = retransmission;
- retransmission =
- unacked_packets_.GetTransmissionInfo(retransmission).retransmission;
- }
- return packet_number;
- } else {
- return transmission_info.all_transmissions == nullptr
- ? packet_number
- : *transmission_info.all_transmissions->rbegin();
+ QuicPacketNumber retransmission = transmission_info.retransmission;
+ while (retransmission != 0) {
+ packet_number = retransmission;
+ retransmission =
+ unacked_packets_.GetTransmissionInfo(retransmission).retransmission;
}
+ return packet_number;
}
void QuicSentPacketManager::MarkPacketNotRetransmittable(
@@ -707,10 +681,7 @@ void QuicSentPacketManager::RetransmitRtoPackets() {
}
// Abandon non-retransmittable data that's in flight to ensure it doesn't
// fill up the congestion window.
- const bool has_retransmissions =
- unacked_packets_.track_single_retransmission()
- ? it->retransmission != 0
- : it->all_transmissions != nullptr;
+ const bool has_retransmissions = it->retransmission != 0;
if (it->retransmittable_frames.empty() && it->in_flight &&
!has_retransmissions) {
// Log only for non-retransmittable data.
« no previous file with comments | « net/quic/quic_protocol.cc ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698