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

Unified Diff: net/quic/quic_packet_generator.h

Issue 17518002: Add logging to the QUIC write path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Missed one Created 7 years, 6 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_connection_logger.cc ('k') | net/quic/quic_packet_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_packet_generator.h
diff --git a/net/quic/quic_packet_generator.h b/net/quic/quic_packet_generator.h
index 9af5d8a4b55b3b652a6d1f7355503ad90e1c2a35..f47a540194aca5e24fd1167df87b1d8ee28818c6 100644
--- a/net/quic/quic_packet_generator.h
+++ b/net/quic/quic_packet_generator.h
@@ -70,7 +70,19 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
virtual bool OnSerializedPacket(const SerializedPacket& packet) = 0;
};
+ // Interface which gets callbacks from the QuicPacketGenerator at interesting
+ // points. Implementations must not mutate the state of the generator
+ // as a result of these callbacks.
+ class NET_EXPORT_PRIVATE DebugDelegateInterface {
+ public:
+ virtual ~DebugDelegateInterface() {}
+
+ // Called when a frame has been added to the current packet.
+ virtual void OnFrameAddedToPacket(const QuicFrame& frame) = 0;
+ };
+
QuicPacketGenerator(DelegateInterface* delegate,
+ DebugDelegateInterface* debug_delegate,
QuicPacketCreator* creator);
virtual ~QuicPacketGenerator();
@@ -89,14 +101,21 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
bool HasQueuedFrames() const;
+ void set_debug_delegate(DebugDelegateInterface* debug_delegate) {
+ debug_delegate_ = debug_delegate;
+ }
+
private:
void SendQueuedFrames();
bool HasPendingFrames() const;
bool AddNextPendingFrame();
+
+ bool AddFrame(const QuicFrame& frame);
void SerializeAndSendPacket();
DelegateInterface* delegate_;
+ DebugDelegateInterface* debug_delegate_;
QuicPacketCreator* packet_creator_;
QuicFrames queued_control_frames_;
« no previous file with comments | « net/quic/quic_connection_logger.cc ('k') | net/quic/quic_packet_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698