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

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

Issue 2875333002: Landing Recent QUIC changes until Mon May 8 21:42:46 2017 +0000 (Closed)
Patch Set: Created 3 years, 7 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_flags_list.h ('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 afb8eff9e1226af028512e42312728b3fd62e003..9b3b3dc9b9434435623297f20c30076fa30bfc60 100644
--- a/net/quic/core/quic_sent_packet_manager.cc
+++ b/net/quic/core/quic_sent_packet_manager.cc
@@ -117,8 +117,18 @@ void QuicSentPacketManager::SetFromConfig(const QuicConfig& config) {
}
} else if (config.HasClientRequestedIndependentOption(kBYTE, perspective_)) {
SetSendAlgorithm(kCubic);
+ } else if (FLAGS_quic_reloadable_flag_quic_enable_pcc &&
+ config.HasClientRequestedIndependentOption(kTPCC, perspective_)) {
+ SetSendAlgorithm(kPCC);
}
- using_pacing_ = !FLAGS_quic_disable_pacing_for_perf_tests;
+
+ // The PCCSender implements its own version of pacing through the
+ // SendAlgorithm::TimeUntilSend() function. Do not wrap a
+ // PacingSender around it, since wrapping a PacingSender around an
+ // already paced SendAlgorithm produces a DCHECK. TODO(fayang):
+ // Change this if/when the PCCSender uses the PacingSender.
+ using_pacing_ = !FLAGS_quic_disable_pacing_for_perf_tests &&
+ send_algorithm_->GetCongestionControlType() != kPCC;
if (config.HasClientSentConnectionOption(k1CON, perspective_)) {
send_algorithm_->SetNumEmulatedConnections(1);
@@ -796,9 +806,8 @@ const QuicTime::Delta QuicSentPacketManager::GetTailLossProbeDelay() const {
static_cast<int64_t>(0.5 * srtt.ToMilliseconds())));
}
if (!unacked_packets_.HasMultipleInFlightPackets()) {
- return std::max(2 * srtt,
- 1.5 * srtt + QuicTime::Delta::FromMilliseconds(
- kMinRetransmissionTimeMs / 2));
+ return std::max(2 * srtt, 1.5 * srtt + QuicTime::Delta::FromMilliseconds(
+ kMinRetransmissionTimeMs / 2));
}
return QuicTime::Delta::FromMilliseconds(
std::max(kMinTailLossProbeTimeoutMs,
« no previous file with comments | « net/quic/core/quic_flags_list.h ('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