Internal QUICHE change

PiperOrigin-RevId: 309253395
Change-Id: Ib9db5597c48c8210f3f192b7bf1cf93d5e8a5b03
diff --git a/quic/core/congestion_control/bbr_sender.cc b/quic/core/congestion_control/bbr_sender.cc
index 553175c..ec51dee 100644
--- a/quic/core/congestion_control/bbr_sender.cc
+++ b/quic/core/congestion_control/bbr_sender.cc
@@ -493,7 +493,16 @@
 }
 
 QuicTime::Delta BbrSender::GetMinRtt() const {
-  return !min_rtt_.IsZero() ? min_rtt_ : rtt_stats_->initial_rtt();
+  if (!min_rtt_.IsZero()) {
+    return min_rtt_;
+  }
+  if (GetQuicReloadableFlag(quic_bbr_use_available_min_rtt)) {
+    // min_rtt could be available if the handshake packet gets neutered then
+    // gets acknowledged. This could only happen for QUIC crypto where we do not
+    // drop keys.
+    return rtt_stats_->MinOrInitialRtt();
+  }
+  return rtt_stats_->initial_rtt();
 }
 
 QuicByteCount BbrSender::GetTargetCongestionWindow(float gain) const {
diff --git a/quic/core/congestion_control/rtt_stats.h b/quic/core/congestion_control/rtt_stats.h
index 9062c7a..f247c1c 100644
--- a/quic/core/congestion_control/rtt_stats.h
+++ b/quic/core/congestion_control/rtt_stats.h
@@ -72,6 +72,10 @@
     return smoothed_rtt_.IsZero() ? initial_rtt_ : smoothed_rtt_;
   }
 
+  QuicTime::Delta MinOrInitialRtt() const {
+    return min_rtt_.IsZero() ? initial_rtt_ : min_rtt_;
+  }
+
   // Sets an initial RTT to be used for SmoothedRtt before any RTT updates.
   void set_initial_rtt(QuicTime::Delta initial_rtt) {
     if (initial_rtt.ToMicroseconds() <= 0) {