Internal QUICHE change

PiperOrigin-RevId: 332347095
Change-Id: I716dfb265ec4732aee42a58279003da9474bf16b
diff --git a/quic/core/quic_connection.cc b/quic/core/quic_connection.cc
index 83f7fd7..bf97fbc 100644
--- a/quic/core/quic_connection.cc
+++ b/quic/core/quic_connection.cc
@@ -4168,6 +4168,13 @@
 }
 
 void QuicConnection::OnConnectionMigration(AddressChangeType addr_change_type) {
+  if (debug_visitor_ != nullptr) {
+    const QuicTime now = clock_->ApproximateNow();
+    if (now >= stats_.handshake_completion_time) {
+      debug_visitor_->OnPeerAddressChange(
+          addr_change_type, now - stats_.handshake_completion_time);
+    }
+  }
   visitor_->OnConnectionMigration(addr_change_type);
   sent_packet_manager_.OnConnectionMigration(addr_change_type);
 }
diff --git a/quic/core/quic_connection.h b/quic/core/quic_connection.h
index 5461908..de01c03 100644
--- a/quic/core/quic_connection.h
+++ b/quic/core/quic_connection.h
@@ -376,6 +376,10 @@
 
   // Called for QUIC+TLS versions when 0-RTT is rejected.
   virtual void OnZeroRttRejected(int /*reject_reason*/) {}
+
+  // Called on peer address change.
+  virtual void OnPeerAddressChange(AddressChangeType /*type*/,
+                                   QuicTime::Delta /*connection_time*/) {}
 };
 
 class QUIC_EXPORT_PRIVATE QuicConnectionHelperInterface {