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

Unified Diff: net/quic/core/quic_sent_packet_manager.cc

Issue 2322233004: Landing Recent QUIC changes until Sun Sep 4 03:41:00 (Closed)
Patch Set: Remove simulation files from the build. Created 4 years, 3 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/core/quic_protocol_test.cc ('k') | net/quic/core/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/core/quic_sent_packet_manager.cc
diff --git a/net/quic/core/quic_sent_packet_manager.cc b/net/quic/core/quic_sent_packet_manager.cc
index 8cb4117a99a335c12fd47f7259d3e36f68c629a7..5a97b1e8c12a3f6217a44502a4bfdbff584613e5 100644
--- a/net/quic/core/quic_sent_packet_manager.cc
+++ b/net/quic/core/quic_sent_packet_manager.cc
@@ -148,8 +148,7 @@ void QuicSentPacketManager::SetFromConfig(const QuicConfig& config) {
ContainsQuicTag(config.ReceivedConnectionOptions(), kATIM)) {
general_loss_algorithm_.SetLossDetectionType(kAdaptiveTime);
}
- if (FLAGS_quic_loss_recovery_use_largest_acked &&
- config.HasClientSentConnectionOption(kUNDO, perspective_)) {
+ if (config.HasClientSentConnectionOption(kUNDO, perspective_)) {
undo_pending_retransmits_ = true;
}
send_algorithm_->SetFromConfig(config, perspective_);
@@ -305,8 +304,8 @@ void QuicSentPacketManager::HandleAckForSentPackets(
// packet, then inform the caller.
if (it->in_flight) {
packets_acked_.push_back(std::make_pair(packet_number, it->bytes_sent));
- } else if (FLAGS_quic_loss_recovery_use_largest_acked &&
- !it->is_unackable) {
+ } else if (!it->is_unackable) {
+ // Packets are marked unackable after they've been acked once.
largest_newly_acked_ = packet_number;
}
MarkPacketHandled(packet_number, &(*it), ack_delay_time);
@@ -514,9 +513,7 @@ void QuicSentPacketManager::MarkPacketHandled(QuicPacketNumber packet_number,
}
unacked_packets_.RemoveFromInFlight(info);
unacked_packets_.RemoveRetransmittability(info);
- if (FLAGS_quic_loss_recovery_use_largest_acked) {
- info->is_unackable = true;
- }
+ info->is_unackable = true;
}
bool QuicSentPacketManager::HasUnackedPackets() const {
@@ -699,13 +696,13 @@ QuicSentPacketManager::GetRetransmissionMode() const {
}
void QuicSentPacketManager::InvokeLossDetection(QuicTime time) {
- if (FLAGS_quic_loss_recovery_use_largest_acked && !packets_acked_.empty()) {
+ if (!packets_acked_.empty()) {
DCHECK_LE(packets_acked_.front().first, packets_acked_.back().first);
largest_newly_acked_ = packets_acked_.back().first;
}
loss_algorithm_->DetectLosses(unacked_packets_, time, rtt_stats_,
largest_newly_acked_, &packets_lost_);
- for (const pair<QuicPacketNumber, QuicByteCount>& pair : packets_lost_) {
+ for (const auto& pair : packets_lost_) {
++stats_->packets_lost;
if (debug_delegate_ != nullptr) {
debug_delegate_->OnPacketLoss(pair.first, LOSS_RETRANSMISSION, time);
« no previous file with comments | « net/quic/core/quic_protocol_test.cc ('k') | net/quic/core/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698