gfe-relnote: In QUIC, add a utility function CopySerializedPacket. Not used yet, not protected.

Add bool has_ack_frame_copy to SerializedPacket, indicating whether the serialized packet contains a copy of ack frame.

PiperOrigin-RevId: 275908820
Change-Id: I34b156091a9fbaa542bed5951588c43b59de12bb
diff --git a/quic/core/quic_packets.h b/quic/core/quic_packets.h
index fcb2e56..361cd44 100644
--- a/quic/core/quic_packets.h
+++ b/quic/core/quic_packets.h
@@ -379,6 +379,8 @@
   QuicPacketNumber packet_number;
   QuicPacketNumberLength packet_number_length;
   EncryptionLevel encryption_level;
+  // TODO(fayang): Remove has_ack and has_stop_waiting when deprecating
+  // quic_populate_nonretransmittable_frames.
   bool has_ack;
   bool has_stop_waiting;
   TransmissionType transmission_type;
@@ -386,8 +388,18 @@
   // The largest acked of the AckFrame in this packet if has_ack is true,
   // 0 otherwise.
   QuicPacketNumber largest_acked;
+  // Indicates whether this packet has a copy of ack frame in
+  // nonretransmittable_frames.
+  bool has_ack_frame_copy;
 };
 
+// Make a copy of |serialized| (including the underlying frames). |copy_buffer|
+// indicates whether the encrypted buffer should be copied.
+QUIC_EXPORT_PRIVATE SerializedPacket* CopySerializedPacket(
+    const SerializedPacket& serialized,
+    QuicBufferAllocator* allocator,
+    bool copy_buffer);
+
 // Deletes and clears all the frames and the packet from serialized packet.
 QUIC_EXPORT_PRIVATE void ClearSerializedPacket(
     SerializedPacket* serialized_packet);