Add a debug callback at the end of QuicSentPacketManager::FromConfig. This is primarily for logging in netlogs (see https://bugs.chromium.org/p/chromium/issues/detail?id=1291452). PiperOrigin-RevId: 424941652
diff --git a/quic/core/quic_sent_packet_manager.cc b/quic/core/quic_sent_packet_manager.cc index e8f1aa8..55dbe05 100644 --- a/quic/core/quic_sent_packet_manager.cc +++ b/quic/core/quic_sent_packet_manager.cc
@@ -335,6 +335,15 @@ if (network_change_visitor_ != nullptr) { network_change_visitor_->OnCongestionChange(); } + + if (debug_delegate_ != nullptr) { + DebugDelegate::SendParameters parameters; + parameters.congestion_control_type = + send_algorithm_->GetCongestionControlType(); + parameters.use_pacing = using_pacing_; + parameters.initial_congestion_window = initial_congestion_window_; + debug_delegate_->OnConfigProcessed(parameters); + } } void QuicSentPacketManager::ApplyConnectionOptions(
diff --git a/quic/core/quic_sent_packet_manager.h b/quic/core/quic_sent_packet_manager.h index 069ff0f..dac8ccf 100644 --- a/quic/core/quic_sent_packet_manager.h +++ b/quic/core/quic_sent_packet_manager.h
@@ -52,6 +52,12 @@ // the packet manager or connection as a result of these callbacks. class QUIC_EXPORT_PRIVATE DebugDelegate { public: + struct QUIC_EXPORT_PRIVATE SendParameters { + CongestionControlType congestion_control_type; + bool use_pacing; + QuicPacketCount initial_congestion_window; + }; + virtual ~DebugDelegate() {} // Called when a spurious retransmission is detected. @@ -84,6 +90,8 @@ int /*new_burst_size*/) {} virtual void OnOvershootingDetected() {} + + virtual void OnConfigProcessed(const SendParameters& /*parameters*/) {} }; // Interface which gets callbacks from the QuicSentPacketManager when