In HTTP/3, write Priority on control stream before writing headers.

Currently the priority is in gQUIC fashion, where we only use the weight to build priority queue.

Priority might be sent on the control stream before handshake is confirmed. So this CL modifies QuicSendControlStream to send stream type and settings before any other data is sent.

gfe-relnote: v99 only, not in prod.
PiperOrigin-RevId: 256285943
Change-Id: Iaf72f9d6256a2692b284e3f6142755ff0d04d710
diff --git a/quic/core/http/quic_receive_control_stream.h b/quic/core/http/quic_receive_control_stream.h
index e4e9c20..3ea53cf 100644
--- a/quic/core/http/quic_receive_control_stream.h
+++ b/quic/core/http/quic_receive_control_stream.h
@@ -31,16 +31,21 @@
 
   void SetUnblocked() { sequencer()->SetUnblocked(); }
 
- protected:
-  // Called from HttpDecoderVisitor.
-  bool OnSettingsFrameStart(Http3FrameLengths frame_lengths);
-  bool OnSettingsFrame(const SettingsFrame& settings);
-
  private:
   class HttpDecoderVisitor;
 
+  // Called from HttpDecoderVisitor.
+  bool OnSettingsFrameStart(Http3FrameLengths frame_lengths);
+  bool OnSettingsFrame(const SettingsFrame& settings);
+  bool OnPriorityFrameStart(Http3FrameLengths frame_lengths);
+  // TODO(renjietang): Decode Priority in HTTP/3 style.
+  bool OnPriorityFrame(const PriorityFrame& priority);
+
   HttpDecoder decoder_;
 
+  // Track the current priority frame length.
+  QuicByteCount current_priority_length_;
+
   // Track the number of settings bytes received.
   size_t received_settings_length_;