gfe-relnote: Remove the dependency from QuicMemSliceSpan to QuicStreamSendBuffer and QuicMessageFrame. Refactor only, not protected.
Currently, the (conceptually low level) QuicMemSliceSpan depends on (conceptually high level) QuicStreamSendBuffer and QuicMessageFrame classes, via QuicMemSliceSpan::SaveMemSlicesInSendBuffer and QuicMemSliceSpan::SaveMemSlicesAsMessageData. This change replace those functions by a new QuicMemSliceSpan::ConsumeAll method, which takes a callback instead of directly referring to QuicStreamSendBuffer and QuicMessageFrame.
PiperOrigin-RevId: 240908280
Change-Id: I83c87037586252c1335f3f1e198e6b62915e5698
diff --git a/quic/core/quic_packet_generator.cc b/quic/core/quic_packet_generator.cc
index c2b3d48..257ca9b 100644
--- a/quic/core/quic_packet_generator.cc
+++ b/quic/core/quic_packet_generator.cc
@@ -479,8 +479,7 @@
if (!packet_creator_.HasRoomForMessageFrame(message_length)) {
packet_creator_.Flush();
}
- QuicMessageFrame* frame = new QuicMessageFrame(message_id);
- message.SaveMemSlicesAsMessageData(frame);
+ QuicMessageFrame* frame = new QuicMessageFrame(message_id, message);
const bool success =
packet_creator_.AddSavedFrame(QuicFrame(frame), next_transmission_type_);
if (!success) {