Refactor BBR2/BBR3 parameters by moving kDefaultMinimumCongestionWindow and kInitialPacingGain into Bbr2Params.

PiperOrigin-RevId: 902911491
diff --git a/quiche/quic/core/congestion_control/bbr2_misc.h b/quiche/quic/core/congestion_control/bbr2_misc.h
index a702e90..17f3c3c 100644
--- a/quiche/quic/core/congestion_control/bbr2_misc.h
+++ b/quiche/quic/core/congestion_control/bbr2_misc.h
@@ -66,6 +66,13 @@
   return os << "[" << limits.Min() << ", " << limits.Max() << "]";
 }
 
+// Constants based on TCP defaults.
+// The minimum CWND to ensure delayed acks don't reduce bandwidth measurements.
+// Does not inflate the pacing rate.
+inline constexpr QuicByteCount kDefaultMinimumCongestionWindow =
+    4 * kMaxSegmentSize;
+inline constexpr float kInitialPacingGain = 2.885f;
+
 // Bbr2Params contains all parameters of a Bbr2Sender.
 struct QUICHE_EXPORT Bbr2Params {
   Bbr2Params(QuicByteCount cwnd_min, QuicByteCount cwnd_max)
diff --git a/quiche/quic/core/congestion_control/bbr2_sender.cc b/quiche/quic/core/congestion_control/bbr2_sender.cc
index c5bb0cb..30170a6 100644
--- a/quiche/quic/core/congestion_control/bbr2_sender.cc
+++ b/quiche/quic/core/congestion_control/bbr2_sender.cc
@@ -26,13 +26,6 @@
 namespace quic {
 
 namespace {
-// Constants based on TCP defaults.
-// The minimum CWND to ensure delayed acks don't reduce bandwidth measurements.
-// Does not inflate the pacing rate.
-const QuicByteCount kDefaultMinimumCongestionWindow = 4 * kMaxSegmentSize;
-
-const float kInitialPacingGain = 2.885f;
-
 const int kMaxModeChangesPerCongestionEvent = 4;
 }  // namespace
 
diff --git a/quiche/quic/core/congestion_control/bbr3_sender.cc b/quiche/quic/core/congestion_control/bbr3_sender.cc
index 176dfce..cc3d570 100644
--- a/quiche/quic/core/congestion_control/bbr3_sender.cc
+++ b/quiche/quic/core/congestion_control/bbr3_sender.cc
@@ -25,12 +25,6 @@
 namespace quic {
 
 namespace {
-// Constants based on TCP defaults.
-// The minimum CWND to ensure delayed acks don't reduce bandwidth measurements.
-// Does not inflate the pacing rate.
-const QuicByteCount kDefaultMinimumCongestionWindow = 4 * kMaxSegmentSize;
-
-const float kInitialPacingGain = 2.885f;
 
 const int kMaxModeChangesPerCongestionEvent = 4;
 }  // namespace
diff --git a/quiche/quic/core/congestion_control/send_algorithm_interface.cc b/quiche/quic/core/congestion_control/send_algorithm_interface.cc
index 53c9929..33bcf86 100644
--- a/quiche/quic/core/congestion_control/send_algorithm_interface.cc
+++ b/quiche/quic/core/congestion_control/send_algorithm_interface.cc
@@ -36,16 +36,16 @@
       return new BbrSender(clock->ApproximateNow(), rtt_stats, unacked_packets,
                            initial_congestion_window, max_congestion_window,
                            random, stats);
-    case kBBRv3:
-      return new Bbr3Sender(
+    case kBBRv2:
+      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 kBBRv2:
-      return new Bbr2Sender(
+    case kBBRv3:
+      return new Bbr3Sender(
           clock->ApproximateNow(), rtt_stats, unacked_packets,
           initial_congestion_window, max_congestion_window, random, stats,
           old_send_algorithm &&