gfe-relnote: Default-initialize some QUIC BBRv2 parameters from flags. Protected by --gfe2_reloadable_flag_quic_default_to_bbr_v2.

This allows us to try different probe_bw cycle lengths and probe_rtt frequencies.

PiperOrigin-RevId: 261923384
Change-Id: I4345e62d22e2e62ade2f8dd843d4ac00279892c0
diff --git a/quic/core/congestion_control/bbr2_misc.cc b/quic/core/congestion_control/bbr2_misc.cc
index f5e3d18..56e7270 100644
--- a/quic/core/congestion_control/bbr2_misc.cc
+++ b/quic/core/congestion_control/bbr2_misc.cc
@@ -15,8 +15,6 @@
 // Sensitivity in response to losses. 0 means no loss response.
 // 0.3 is also used by TCP bbr and cubic.
 const float kBeta = 0.3;
-
-const QuicTime::Delta kMinRttExpiry = QuicTime::Delta::FromSeconds(10);
 }  // namespace
 
 RoundTripCounter::RoundTripCounter() : round_trip_count_(0) {}
@@ -264,7 +262,8 @@
 
 bool Bbr2NetworkModel::MaybeExpireMinRtt(
     const Bbr2CongestionEvent& congestion_event) {
-  if (congestion_event.event_time < (MinRttTimestamp() + kMinRttExpiry)) {
+  if (congestion_event.event_time <
+      (MinRttTimestamp() + Params().probe_rtt_period)) {
     return false;
   }
   if (congestion_event.sample_min_rtt.IsInfinite()) {
diff --git a/quic/core/congestion_control/bbr2_misc.h b/quic/core/congestion_control/bbr2_misc.h
index 1b695e3..d38163b 100644
--- a/quic/core/congestion_control/bbr2_misc.h
+++ b/quic/core/congestion_control/bbr2_misc.h
@@ -15,6 +15,7 @@
 #include "net/third_party/quiche/src/quic/core/quic_time.h"
 #include "net/third_party/quiche/src/quic/core/quic_types.h"
 #include "net/third_party/quiche/src/quic/platform/api/quic_export.h"
+#include "net/third_party/quiche/src/quic/platform/api/quic_flags.h"
 #include "net/quic/platform/impl/quic_export_impl.h"
 
 namespace quic {
@@ -111,11 +112,13 @@
 
   // Minimum duration for BBR-native probes.
   QuicTime::Delta probe_bw_probe_base_duration =
-      QuicTime::Delta::FromSeconds(2);
+      QuicTime::Delta::FromMilliseconds(
+          GetQuicFlag(FLAGS_quic_bbr2_default_probe_bw_base_duration_ms));
 
-  // The upper bound of the random amound of BBR-native probes.
+  // The upper bound of the random amount of BBR-native probes.
   QuicTime::Delta probe_bw_probe_max_rand_duration =
-      QuicTime::Delta::FromSeconds(1);
+      QuicTime::Delta::FromMilliseconds(
+          GetQuicFlag(FLAGS_quic_bbr2_default_probe_bw_max_rand_duration_ms));
 
   // Multiplier to get target inflight (as multiple of BDP) for PROBE_UP phase.
   float probe_bw_probe_inflight_gain = 1.25;
@@ -131,6 +134,8 @@
    * PROBE_RTT parameters.
    */
   float probe_rtt_inflight_target_bdp_fraction = 0.5;
+  QuicTime::Delta probe_rtt_period = QuicTime::Delta::FromMilliseconds(
+      GetQuicFlag(FLAGS_quic_bbr2_default_probe_rtt_period_ms));
   QuicTime::Delta probe_rtt_duration = QuicTime::Delta::FromMilliseconds(200);
 
   /*