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

Unified Diff: net/quic/core/congestion_control/general_loss_algorithm.cc

Issue 2236973002: Landing Recent QUIC changes until 4AM, Aug 7, 2016 UTC-4 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: flip quic_sequencer_buffer_retire_block_in_time to true Created 4 years, 4 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
Index: net/quic/core/congestion_control/general_loss_algorithm.cc
diff --git a/net/quic/core/congestion_control/general_loss_algorithm.cc b/net/quic/core/congestion_control/general_loss_algorithm.cc
index 428c4e8db79bb17c4ceabae7f06153ae02e5e1de..319087bc868aa3f8c1381f2dc1d146dd4e694846 100644
--- a/net/quic/core/congestion_control/general_loss_algorithm.cc
+++ b/net/quic/core/congestion_control/general_loss_algorithm.cc
@@ -27,15 +27,15 @@ static const int kDefaultAdaptiveLossDelayShift = 4;
} // namespace
GeneralLossAlgorithm::GeneralLossAlgorithm()
- : loss_type_(kNack),
- loss_detection_timeout_(QuicTime::Zero()),
+ : loss_detection_timeout_(QuicTime::Zero()),
largest_sent_on_spurious_retransmit_(0),
+ loss_type_(kNack),
reordering_shift_(kDefaultLossDelayShift) {}
GeneralLossAlgorithm::GeneralLossAlgorithm(LossDetectionType loss_type)
- : loss_type_(loss_type),
- loss_detection_timeout_(QuicTime::Zero()),
+ : loss_detection_timeout_(QuicTime::Zero()),
largest_sent_on_spurious_retransmit_(0),
+ loss_type_(loss_type),
reordering_shift_(loss_type == kAdaptiveTime
? kDefaultAdaptiveLossDelayShift
: kDefaultLossDelayShift) {}
@@ -45,10 +45,12 @@ LossDetectionType GeneralLossAlgorithm::GetLossDetectionType() const {
}
void GeneralLossAlgorithm::SetLossDetectionType(LossDetectionType loss_type) {
+ loss_detection_timeout_ = QuicTime::Zero();
+ largest_sent_on_spurious_retransmit_ = 0;
loss_type_ = loss_type;
- if (loss_type_ == kAdaptiveTime) {
- reordering_shift_ = kDefaultAdaptiveLossDelayShift;
- }
+ reordering_shift_ = loss_type == kAdaptiveTime
+ ? kDefaultAdaptiveLossDelayShift
+ : kDefaultLossDelayShift;
}
// Uses nack counts to decide when packets are lost.
« no previous file with comments | « net/quic/core/congestion_control/general_loss_algorithm.h ('k') | net/quic/core/congestion_control/pacing_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698