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

Unified Diff: net/quic/quic_protocol.h

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_packet_creator.cc ('k') | net/quic/quic_protocol.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_protocol.h
diff --git a/net/quic/quic_protocol.h b/net/quic/quic_protocol.h
index 984a4ddd7bd22c1d10f5f1d12de36c8825e19ea1..ff350744187a569135125f0285b5d7615f5f7059 100644
--- a/net/quic/quic_protocol.h
+++ b/net/quic/quic_protocol.h
@@ -708,7 +708,13 @@ struct NET_EXPORT_PRIVATE QuicPingFrame {};
// frame.
struct NET_EXPORT_PRIVATE QuicMtuDiscoveryFrame {};
-typedef scoped_ptr<char[]> UniqueStreamBuffer;
+// Deleter for stream buffers.
+class NET_EXPORT_PRIVATE StreamBufferDeleter {
+ public:
+ void operator()(char* buf) const;
+};
+
+using UniqueStreamBuffer = std::unique_ptr<char[], StreamBufferDeleter>;
// Allocates memory of size |size| for a QUIC stream buffer.
UniqueStreamBuffer NewStreamBuffer(size_t size);
« no previous file with comments | « net/quic/quic_packet_creator.cc ('k') | net/quic/quic_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698