Add 0-RTT related client events in QuicSpdySession::DebugVisitor so that Chrome will be able to net log.
No behavior change. not protected.
PiperOrigin-RevId: 326131075
Change-Id: I65f2f90ba18069a20fac844a9b955cf3702512c1
diff --git a/quic/core/http/quic_spdy_session.cc b/quic/core/http/quic_spdy_session.cc
index ece418c..f3c96e9 100644
--- a/quic/core/http/quic_spdy_session.cc
+++ b/quic/core/http/quic_spdy_session.cc
@@ -920,7 +920,9 @@
return false;
}
- // TODO(b/153726130): Add OnSettingsFrameResumed() in debug visitor.
+ if (debug_visitor_ != nullptr) {
+ debug_visitor_->OnSettingsFrameResumed(out);
+ }
for (const auto& setting : out.values) {
OnSetting(setting.first, setting.second);
}
@@ -1412,6 +1414,13 @@
quiche::QuicheStrCat(type, " stream is received twice."));
}
+void QuicSpdySession::OnZeroRttRejected() {
+ if (debug_visitor_ != nullptr) {
+ debug_visitor_->OnZeroRttRejected();
+ }
+ QuicSession::OnZeroRttRejected();
+}
+
// static
void QuicSpdySession::LogHeaderCompressionRatioHistogram(
bool using_qpack,
diff --git a/quic/core/http/quic_spdy_session.h b/quic/core/http/quic_spdy_session.h
index 7e56b27..5c5758b 100644
--- a/quic/core/http/quic_spdy_session.h
+++ b/quic/core/http/quic_spdy_session.h
@@ -130,6 +130,10 @@
QuicStreamId
/*push_id*/,
const spdy::SpdyHeaderBlock& /*header_block*/) {}
+
+ // 0-RTT related events.
+ virtual void OnSettingsFrameResumed(const SettingsFrame& /*frame*/) {}
+ virtual void OnZeroRttRejected() {}
};
// A QUIC session for HTTP.
@@ -387,6 +391,9 @@
// Decode SETTINGS from |cached_state| and apply it to the session.
bool ResumeApplicationState(ApplicationState* cached_state) override;
+ // Let the debug visitor know that 0-RTT is rejected.
+ void OnZeroRttRejected() override;
+
protected:
// Override CreateIncomingStream(), CreateOutgoingBidirectionalStream() and
// CreateOutgoingUnidirectionalStream() with QuicSpdyStream return type to