Prepare QuicSpdyStream and QuicSpdySession APIs for METADATA support.

This CL adds QuicSpdySession::OnUnknownFrameStart() and
QuicSpdySession::OnUnknownFramePayload(), called when QuicSpdyStream encounters
a frame of unknown type (via implementing the analogous callbacks from
HttpDecoder::Visitor).

Currently, these new methods are no-ops; functionality for certain
QuicSpdySession subclasses will be added in a future change to support
receiving METADATA.

PiperOrigin-RevId: 470327793
diff --git a/quiche/quic/core/http/quic_spdy_session.h b/quiche/quic/core/http/quic_spdy_session.h
index f1ef594..5c779c5 100644
--- a/quiche/quic/core/http/quic_spdy_session.h
+++ b/quiche/quic/core/http/quic_spdy_session.h
@@ -192,6 +192,14 @@
   // This method will only be called for client sessions.
   virtual void OnAcceptChFrame(const AcceptChFrame& /*frame*/) {}
 
+  // Called when an HTTP/3 frame of unknown type has been received.
+  virtual void OnUnknownFrameStart(QuicStreamId /*stream_id*/,
+                                   uint64_t /*frame_type*/,
+                                   QuicByteCount /*header_length*/,
+                                   QuicByteCount /*payload_length*/) {}
+  virtual void OnUnknownFramePayload(QuicStreamId /*stream_id*/,
+                                     absl::string_view /*payload*/) {}
+
   // Sends contents of |iov| to h2_deframer_, returns number of bytes processed.
   size_t ProcessHeaderData(const struct iovec& iov);
 
diff --git a/quiche/quic/core/http/quic_spdy_stream.cc b/quiche/quic/core/http/quic_spdy_stream.cc
index 9a6681e..7859a2f 100644
--- a/quiche/quic/core/http/quic_spdy_stream.cc
+++ b/quiche/quic/core/http/quic_spdy_stream.cc
@@ -1133,9 +1133,11 @@
     spdy_session_->debug_visitor()->OnUnknownFrameReceived(id(), frame_type,
                                                            payload_length);
   }
+  spdy_session_->OnUnknownFrameStart(id(), frame_type, header_length,
+                                     payload_length);
 
-  // Ignore unknown frames, but consume frame header.
-  QUIC_DVLOG(1) << ENDPOINT << "Discarding " << header_length
+  // Consume the frame header.
+  QUIC_DVLOG(1) << ENDPOINT << "Consuming " << header_length
                 << " byte long frame header of frame of unknown type "
                 << frame_type << ".";
   sequencer()->MarkConsumed(body_manager_.OnNonBody(header_length));
@@ -1143,8 +1145,10 @@
 }
 
 bool QuicSpdyStream::OnUnknownFramePayload(absl::string_view payload) {
-  // Ignore unknown frames, but consume frame payload.
-  QUIC_DVLOG(1) << ENDPOINT << "Discarding " << payload.size()
+  spdy_session_->OnUnknownFramePayload(id(), payload);
+
+  // Consume the frame payload.
+  QUIC_DVLOG(1) << ENDPOINT << "Consuming " << payload.size()
                 << " bytes of payload of frame of unknown type.";
   sequencer()->MarkConsumed(body_manager_.OnNonBody(payload.size()));
   return true;