Internal QUICHE change

PiperOrigin-RevId: 316884188
Change-Id: Id11bd837f076e0d1eb166fc954b3f5b311febaca
diff --git a/quic/core/congestion_control/bbr_sender.cc b/quic/core/congestion_control/bbr_sender.cc
index 89f8be2..34c81cd 100644
--- a/quic/core/congestion_control/bbr_sender.cc
+++ b/quic/core/congestion_control/bbr_sender.cc
@@ -348,12 +348,16 @@
       // Ignore bad bandwidth samples.
       return;
     }
+
+    auto cwnd_bootstrapping_rtt = params.quic_bbr_donot_inject_bandwidth
+                                      ? GetMinRtt()
+                                      : rtt_stats_->SmoothedOrInitialRtt();
     const QuicByteCount new_cwnd = std::max(
         kMinInitialCongestionWindow * kDefaultTCPMSS,
         std::min(max_congestion_window_with_network_parameters_adjusted_,
-                 bandwidth * (params.quic_bbr_donot_inject_bandwidth
-                                  ? GetMinRtt()
-                                  : rtt_stats_->SmoothedOrInitialRtt())));
+                 bandwidth * cwnd_bootstrapping_rtt));
+
+    stats_->cwnd_bootstrapping_rtt_us = cwnd_bootstrapping_rtt.ToMicroseconds();
     if (!rtt_stats_->smoothed_rtt().IsZero()) {
       QUIC_CODE_COUNT(quic_smoothed_rtt_available);
     } else if (rtt_stats_->initial_rtt() !=
diff --git a/quic/core/quic_connection_stats.h b/quic/core/quic_connection_stats.h
index 397936b..67220ae 100644
--- a/quic/core/quic_connection_stats.h
+++ b/quic/core/quic_connection_stats.h
@@ -90,6 +90,7 @@
 
   int64_t min_rtt_us = 0;  // Minimum RTT in microseconds.
   int64_t srtt_us = 0;     // Smoothed RTT in microseconds.
+  int64_t cwnd_bootstrapping_rtt_us = 0;  // RTT used in cwnd_bootstrapping.
   QuicByteCount max_packet_size = 0;
   QuicByteCount max_received_packet_size = 0;
   QuicBandwidth estimated_bandwidth = QuicBandwidth::Zero();