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_); |