Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Unified Diff: net/quic/quic_packet_creator.h

Issue 1397113003: relnote: Refactor stream buffer allocation out into a scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with TOT Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/quic/quic_packet_creator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_packet_creator.h
diff --git a/net/quic/quic_packet_creator.h b/net/quic/quic_packet_creator.h
index ee6e35cb4a1756c984f9115153a3006550e03f51..618e00b741f3dccb76631cd5dfadb78c15138eb0 100644
--- a/net/quic/quic_packet_creator.h
+++ b/net/quic/quic_packet_creator.h
@@ -89,7 +89,7 @@ class NET_EXPORT_PRIVATE QuicPacketCreator {
QuicStreamOffset offset,
bool fin,
QuicFrame* frame,
- scoped_ptr<char[]>* buffer);
+ UniqueStreamBuffer* buffer);
// Serializes all frames into a single packet. All frames must fit into a
// single packet. Also, sets the entropy hash of the serialized packet to a
@@ -151,13 +151,12 @@ class NET_EXPORT_PRIVATE QuicPacketCreator {
// Returns false if the frame doesn't fit into the current packet.
bool AddSavedFrame(const QuicFrame& frame);
- // Identical to AddSavedFrame, but takes ownership of the buffer if it returns
- // true.
- bool AddSavedFrame(const QuicFrame& frame, char* buffer);
+ // Identical to AddSavedFrame, but takes ownership of the buffer.
+ bool AddSavedFrame(const QuicFrame& frame, UniqueStreamBuffer buffer);
- // Identical to AddSavedFrame, but takes ownership of the buffer if it returns
- // true, and allows to cause the packet to be padded.
- bool AddPaddedSavedFrame(const QuicFrame& frame, char* buffer);
+ // Identical to AddSavedFrame, but takes ownership of the buffer, and allows
+ // to cause the packet to be padded.
+ bool AddPaddedSavedFrame(const QuicFrame& frame, UniqueStreamBuffer buffer);
// Serializes all frames which have been added and adds any which should be
// retransmitted to |retransmittable_frames| if it's not nullptr. All frames
@@ -264,7 +263,7 @@ class NET_EXPORT_PRIVATE QuicPacketCreator {
bool AddFrame(const QuicFrame& frame,
bool save_retransmittable_frames,
bool needs_padding,
- char* buffer);
+ UniqueStreamBuffer buffer);
// Adds a padding frame to the current packet only if the current packet
// contains a handshake message, and there is sufficient room to fit a
« no previous file with comments | « no previous file | net/quic/quic_packet_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698