Internal QUICHE change PiperOrigin-RevId: 360774214 Change-Id: Id502d85dd90c5651fdb92a133bb949a9ee3b0ba7
diff --git a/quic/core/quic_connection.cc b/quic/core/quic_connection.cc index 173bc99..f7cb8f4 100644 --- a/quic/core/quic_connection.cc +++ b/quic/core/quic_connection.cc
@@ -4800,6 +4800,16 @@ if (!validate_client_addresses_) { return; } + if (debug_visitor_ != nullptr) { + const QuicTime now = clock_->ApproximateNow(); + if (now >= stats_.handshake_completion_time) { + debug_visitor_->OnPeerMigrationValidated( + now - stats_.handshake_completion_time); + } else { + QUIC_BUG << "Handshake completion time is larger than current time."; + } + } + // Lift anti-amplification limit. default_path_.validated = true; alternative_path_.Clear();
diff --git a/quic/core/quic_connection.h b/quic/core/quic_connection.h index 302fb35..21e4c68 100644 --- a/quic/core/quic_connection.h +++ b/quic/core/quic_connection.h
@@ -414,6 +414,9 @@ // Called on peer address change. virtual void OnPeerAddressChange(AddressChangeType /*type*/, QuicTime::Delta /*connection_time*/) {} + + // Called after peer migration is validated. + virtual void OnPeerMigrationValidated(QuicTime::Delta /*connection_time*/) {} }; class QUIC_EXPORT_PRIVATE QuicConnectionHelperInterface {