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

Unified Diff: net/quic/quic_data_writer.h

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « net/quic/quic_crypto_server_stream_test.cc ('k') | net/quic/quic_data_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_data_writer.h
diff --git a/net/quic/quic_data_writer.h b/net/quic/quic_data_writer.h
index 8204c3af2c24bf4ed0c4fe40b3eac07e15f65b2f..4b5958efe57d18dd03d4053b361d2fade2602a5d 100644
--- a/net/quic/quic_data_writer.h
+++ b/net/quic/quic_data_writer.h
@@ -20,20 +20,20 @@ namespace net {
// This class provides facilities for packing QUIC data.
//
// The QuicDataWriter supports appending primitive values (int, string, etc)
-// to a frame instance. The QuicDataWriter grows its internal memory buffer
-// dynamically to hold the sequence of primitive values. The internal memory
-// buffer is exposed as the "data" of the QuicDataWriter.
+// to a frame instance. The internal memory buffer is exposed as the "data"
+// of the QuicDataWriter.
class NET_EXPORT_PRIVATE QuicDataWriter {
public:
- explicit QuicDataWriter(size_t length);
+ // Creates a QuicDataWriter where |buffer| is not owned.
+ QuicDataWriter(size_t size, char* buffer);
~QuicDataWriter();
// Returns the size of the QuicDataWriter's data.
size_t length() const { return length_; }
- // Takes the buffer from the QuicDataWriter.
- char* take();
+ // Retrieves the buffer from the QuicDataWriter without changing ownership.
+ char* data();
// Methods for adding to the payload. These values are appended to the end
// of the QuicDataWriter payload. Note - binary integers are written in
« no previous file with comments | « net/quic/quic_crypto_server_stream_test.cc ('k') | net/quic/quic_data_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698