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

Unified Diff: blimp/net/stream_packet_writer.h

Issue 1962393004: Added a debug info UI for Blimp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added empty implementation for linux client Created 4 years, 7 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 | « blimp/net/stream_packet_reader_unittest.cc ('k') | blimp/net/stream_packet_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/net/stream_packet_writer.h
diff --git a/blimp/net/stream_packet_writer.h b/blimp/net/stream_packet_writer.h
index a13711b84009ea85e57c9207a927e0a474acd842..98a7143f15067ff548eb3233b4de1c77e836121a 100644
--- a/blimp/net/stream_packet_writer.h
+++ b/blimp/net/stream_packet_writer.h
@@ -21,6 +21,7 @@ class StreamSocket;
} // namespace net
namespace blimp {
+class BlimpConnectionStatistics;
// Writes opaque length-prefixed packets to a StreamSocket.
// The header segment is 32-bit, encoded in network byte order.
@@ -30,7 +31,10 @@ class BLIMP_NET_EXPORT StreamPacketWriter : public PacketWriter {
public:
// |socket|: The socket to write packets to. The caller must ensure |socket|
// is valid while the reader is in-use (see ReadPacket below).
- explicit StreamPacketWriter(net::StreamSocket* socket);
+ // |statistics|: Statistics collector which keeps track of number of bytes
+ // written. |statistics| is expected to outlive |this|.
+ StreamPacketWriter(net::StreamSocket* socket,
+ BlimpConnectionStatistics* statistics);
~StreamPacketWriter() override;
@@ -67,6 +71,7 @@ class BLIMP_NET_EXPORT StreamPacketWriter : public PacketWriter {
scoped_refptr<net::DrainableIOBuffer> payload_buffer_;
scoped_refptr<net::DrainableIOBuffer> header_buffer_;
net::CompletionCallback callback_;
+ BlimpConnectionStatistics* statistics_;
base::WeakPtrFactory<StreamPacketWriter> weak_factory_;
« no previous file with comments | « blimp/net/stream_packet_reader_unittest.cc ('k') | blimp/net/stream_packet_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698