summaryrefslogtreecommitdiff
path: root/chromium/net/third_party/quiche/src/quic/core/congestion_control/send_algorithm_interface.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/net/third_party/quiche/src/quic/core/congestion_control/send_algorithm_interface.cc')
-rw-r--r--chromium/net/third_party/quiche/src/quic/core/congestion_control/send_algorithm_interface.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/chromium/net/third_party/quiche/src/quic/core/congestion_control/send_algorithm_interface.cc b/chromium/net/third_party/quiche/src/quic/core/congestion_control/send_algorithm_interface.cc
index 83529c6e76c..d7b2eca3c74 100644
--- a/chromium/net/third_party/quiche/src/quic/core/congestion_control/send_algorithm_interface.cc
+++ b/chromium/net/third_party/quiche/src/quic/core/congestion_control/send_algorithm_interface.cc
@@ -4,10 +4,10 @@
#include "net/third_party/quiche/src/quic/core/congestion_control/send_algorithm_interface.h"
+#include "net/third_party/quiche/src/quic/core/congestion_control/bbr2_sender.h"
#include "net/third_party/quiche/src/quic/core/congestion_control/bbr_sender.h"
#include "net/third_party/quiche/src/quic/core/congestion_control/tcp_cubic_sender_bytes.h"
#include "net/third_party/quiche/src/quic/core/quic_packets.h"
-#include "net/third_party/quiche/src/quic/platform/api/quic_bbr2_sender.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_bug_tracker.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_fallthrough.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_flag_utils.h"
@@ -26,7 +26,8 @@ SendAlgorithmInterface* SendAlgorithmInterface::Create(
CongestionControlType congestion_control_type,
QuicRandom* random,
QuicConnectionStats* stats,
- QuicPacketCount initial_congestion_window) {
+ QuicPacketCount initial_congestion_window,
+ SendAlgorithmInterface* old_send_algorithm) {
QuicPacketCount max_congestion_window =
GetQuicFlag(FLAGS_quic_max_congestion_window);
switch (congestion_control_type) {
@@ -36,9 +37,13 @@ SendAlgorithmInterface* SendAlgorithmInterface::Create(
initial_congestion_window, max_congestion_window,
random, stats);
case kBBRv2:
- return new QuicBbr2Sender(clock->ApproximateNow(), rtt_stats,
- unacked_packets, initial_congestion_window,
- max_congestion_window, random, stats);
+ return new Bbr2Sender(
+ clock->ApproximateNow(), rtt_stats, unacked_packets,
+ initial_congestion_window, max_congestion_window, random, stats,
+ old_send_algorithm &&
+ old_send_algorithm->GetCongestionControlType() == kBBR
+ ? static_cast<BbrSender*>(old_send_algorithm)
+ : nullptr);
case kPCC:
if (GetQuicReloadableFlag(quic_enable_pcc3)) {
return CreatePccSender(clock, rtt_stats, unacked_packets, random, stats,