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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 354523004: Allow QUIC pacing and time-based loss detection to be enabled via (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « no previous file | 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 806297e357554e4631f12ad8c00b7b07f949af20..0150320e482a73bcc50134e5348842473a9ae74f 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -90,11 +90,17 @@ void QuicSentPacketManager::SetFromConfig(const QuicConfig& config) {
send_algorithm_.reset(
SendAlgorithmInterface::Create(clock_, &rtt_stats_, kTCPBBR, stats_));
}
- if (config.congestion_feedback() == kPACE) {
+ if (config.congestion_feedback() == kPACE ||
+ (config.HasReceivedCongestionOptions() &&
+ ContainsQuicTag(config.ReceivedCongestionOptions(), kPACE))) {
MaybeEnablePacing();
}
- if (config.HasReceivedLossDetection() &&
- config.ReceivedLossDetection() == kTIME) {
+ // TODO(ianswett): Remove the "HasReceivedLossDetection" branch once
+ // the CongestionOptions code is live everywhere.
+ if ((config.HasReceivedLossDetection() &&
+ config.ReceivedLossDetection() == kTIME) ||
+ (config.HasReceivedCongestionOptions() &&
+ ContainsQuicTag(config.ReceivedCongestionOptions(), kTIME))) {
loss_algorithm_.reset(LossDetectionInterface::Create(kTime));
}
send_algorithm_->SetFromConfig(config, is_server_);
« no previous file with comments | « no previous file | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698