In quic, coalesce packet of higher encryption level with initial or handshake retransmission. protected by gfe2_reloadable_flag_quic_coalesced_packet_of_higher_space.

The goal of this change is to mitigate inflated RTT sample.

PiperOrigin-RevId: 321556627
Change-Id: I7fc8675bb0f05a48b6e81ed4aa9c04b42fb0690a
diff --git a/quic/core/quic_packet_creator.h b/quic/core/quic_packet_creator.h
index 80e35be..976f4f6 100644
--- a/quic/core/quic_packet_creator.h
+++ b/quic/core/quic_packet_creator.h
@@ -445,6 +445,9 @@
                                   char* buffer,
                                   size_t buffer_len);
 
+  // Returns true if max_packet_length_ is currently a soft value.
+  bool HasSoftMaxPacketLength() const;
+
   void set_disable_padding_override(bool should_disable_padding) {
     disable_padding_override_ = should_disable_padding;
   }
@@ -453,6 +456,10 @@
     return determine_serialized_packet_fate_early_;
   }
 
+  bool coalesced_packet_of_higher_space() const {
+    return coalesced_packet_of_higher_space_;
+  }
+
  private:
   friend class test::QuicPacketCreatorPeer;
 
@@ -648,6 +655,9 @@
 
   const bool determine_serialized_packet_fate_early_ =
       GetQuicReloadableFlag(quic_determine_serialized_packet_fate_early);
+
+  const bool coalesced_packet_of_higher_space_ =
+      GetQuicReloadableFlag(quic_coalesced_packet_of_higher_space);
 };
 
 }  // namespace quic