gfe-relnote: Move headers streams out of static stream map. Protected by
gfe_reloadable_quic_eliminate_static_stream_map.

Following up this CL, crypto stream will be moved out of static_stream_map too.

PiperOrigin-RevId: 244429772
Change-Id: I5186bc7ab4e6ee9c9f546a3c9456be489a4ddc26
diff --git a/quic/core/http/quic_spdy_session.h b/quic/core/http/quic_spdy_session.h
index 0ff1150..9248fa5 100644
--- a/quic/core/http/quic_spdy_session.h
+++ b/quic/core/http/quic_spdy_session.h
@@ -139,7 +139,17 @@
 
   QpackEncoder* qpack_encoder();
   QpackDecoder* qpack_decoder();
-  QuicHeadersStream* headers_stream() { return headers_stream_.get(); }
+  QuicHeadersStream* headers_stream() {
+    return GetQuicReloadableFlag(quic_eliminate_static_stream_map)
+               ? unowned_headers_stream_
+               : headers_stream_.get();
+  }
+
+  const QuicHeadersStream* headers_stream() const {
+    return GetQuicReloadableFlag(quic_eliminate_static_stream_map)
+               ? unowned_headers_stream_
+               : headers_stream_.get();
+  }
 
   bool server_push_enabled() const { return server_push_enabled_; }
 
@@ -262,6 +272,13 @@
   // TODO(123528590): Remove this member.
   std::unique_ptr<QuicHeadersStream> headers_stream_;
 
+  // Unowned headers stream pointer that points to the stream
+  // in dynamic_stream_map.
+  // TODO(renjietang): Merge this with headers_stream_ and clean up other
+  // static_stream_map logic when flag eliminate_static_stream_map
+  // is deprecated.
+  QuicHeadersStream* unowned_headers_stream_;
+
   // The maximum size of a header block that will be accepted from the peer,
   // defined per spec as key + value + overhead per field (uncompressed).
   size_t max_inbound_header_list_size_;