In QUIC, instead of looking up QuicConnection states, consult the session on whether the connection should be closed on STATELESS_RESET.

The new approach allows Chrome's connectivity probing manager to make decisions, which is consistent with other path determination logic for probing.

Client side change only. not protected.

PiperOrigin-RevId: 312556190
Change-Id: I0a295b84312b7c53bdf14c4c7940ce1f60609b09
diff --git a/quic/core/quic_connection.h b/quic/core/quic_connection.h
index c1e95f3..9339fb0 100644
--- a/quic/core/quic_connection.h
+++ b/quic/core/quic_connection.h
@@ -131,8 +131,11 @@
   // bandwidth.  Returns true if data was sent, false otherwise.
   virtual bool SendProbingData() = 0;
 
-  // Called when stateless reset packet is received but is on a different path.
-  virtual void OnStatelessResetForProbing() = 0;
+  // Called when stateless reset packet is received. Returns true if the
+  // connection needs to be closed.
+  virtual bool ValidateStatelessReset(
+      const quic::QuicSocketAddress& self_address,
+      const quic::QuicSocketAddress& peer_address) = 0;
 
   // Called when the connection experiences a change in congestion window.
   virtual void OnCongestionWindowChange(QuicTime now) = 0;