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

Unified Diff: net/quic/quic_connection.h

Issue 17518002: Add logging to the QUIC write path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: net/quic/quic_connection.h
diff --git a/net/quic/quic_connection.h b/net/quic/quic_connection.h
index 3f27461ed56e8226cc88d922b00a5e6ef6208bff..1fe409feb37e99d4dfa931cf5df3a05f9a737e70 100644
--- a/net/quic/quic_connection.h
+++ b/net/quic/quic_connection.h
@@ -81,10 +81,17 @@ class NET_EXPORT_PRIVATE QuicConnectionVisitorInterface {
// Interface which gets callbacks from the QuicConnection at interesting
// points. Implementations must not mutate the state of the connection
// as a result of these callbacks.
-class NET_EXPORT_PRIVATE QuicConnectionDebugVisitorInterface {
+class NET_EXPORT_PRIVATE QuicConnectionDebugVisitorInterface
+ : public QuicPacketGenerator::DebugDelegateInterface {
public:
virtual ~QuicConnectionDebugVisitorInterface() {}
+ // Called when a packet has been sent.
+ virtual void OnPacketSent(QuicPacketSequenceNumber sequence_number,
+ EncryptionLevel level,
+ const QuicEncryptedPacket& packet,
+ int rv) = 0;
+
// Called when a packet has been received, but before it is
// validated or parsed.
virtual void OnPacketReceived(const IPEndPoint& self_address,
@@ -305,6 +312,7 @@ class NET_EXPORT_PRIVATE QuicConnection
}
void set_debug_visitor(QuicConnectionDebugVisitorInterface* debug_visitor) {
debug_visitor_ = debug_visitor;
+ packet_generator_.set_debug_delegate(debug_visitor);
}
const IPEndPoint& self_address() const { return self_address_; }
const IPEndPoint& peer_address() const { return peer_address_; }
@@ -428,6 +436,11 @@ class NET_EXPORT_PRIVATE QuicConnection
HasRetransmittableData retransmittable,
Force force);
+ int WritePacketToWire(QuicPacketSequenceNumber sequence_number,
+ EncryptionLevel level,
+ const QuicEncryptedPacket& packet,
+ int* error);
+
// Make sure an ack we got from our peer is sane.
bool ValidateAckFrame(const QuicAckFrame& incoming_ack);

Powered by Google App Engine
This is Rietveld 408576698