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

Unified Diff: net/quic/quic_protocol.cc

Issue 1493483002: relnote: Refactor stream buffer allocation out into a unique_ptr with a custom deleter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add back a comment for deleter Created 5 years 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 | « net/quic/quic_protocol.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_protocol.cc
diff --git a/net/quic/quic_protocol.cc b/net/quic/quic_protocol.cc
index a93f83e2b182ebbc276603d54764142f63d0e4fe..2bca0b77f75d63c3630cd052c04529a11fa90d23 100644
--- a/net/quic/quic_protocol.cc
+++ b/net/quic/quic_protocol.cc
@@ -99,6 +99,10 @@ QuicPublicResetPacket::QuicPublicResetPacket(
const QuicPacketPublicHeader& header)
: public_header(header), nonce_proof(0), rejected_packet_number(0) {}
+void StreamBufferDeleter::operator()(char* buf) const {
+ delete[] buf;
+}
+
UniqueStreamBuffer NewStreamBuffer(size_t size) {
return UniqueStreamBuffer(new char[size]);
}
@@ -122,7 +126,7 @@ QuicStreamFrame::QuicStreamFrame(QuicStreamId stream_id,
fin(fin),
offset(offset),
data(data),
- buffer(buffer.release()) {}
+ buffer(std::move(buffer)) {}
QuicStreamFrame::~QuicStreamFrame() {}
« no previous file with comments | « net/quic/quic_protocol.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698