| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_QUIC_QUIC_CONNECTION_LOGGER_H_ | 5 #ifndef NET_QUIC_QUIC_CONNECTION_LOGGER_H_ |
| 6 #define NET_QUIC_QUIC_CONNECTION_LOGGER_H_ | 6 #define NET_QUIC_QUIC_CONNECTION_LOGGER_H_ |
| 7 | 7 |
| 8 #include <bitset> | 8 #include <bitset> |
| 9 | 9 |
| 10 #include "net/base/ip_endpoint.h" | 10 #include "net/base/ip_endpoint.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 class CryptoHandshakeMessage; | 22 class CryptoHandshakeMessage; |
| 23 class CertVerifyResult; | 23 class CertVerifyResult; |
| 24 | 24 |
| 25 // This class is a debug visitor of a QuicConnection which logs | 25 // This class is a debug visitor of a QuicConnection which logs |
| 26 // events to |net_log|. | 26 // events to |net_log|. |
| 27 class NET_EXPORT_PRIVATE QuicConnectionLogger | 27 class NET_EXPORT_PRIVATE QuicConnectionLogger |
| 28 : public QuicConnectionDebugVisitor { | 28 : public QuicConnectionDebugVisitor { |
| 29 public: | 29 public: |
| 30 QuicConnectionLogger(QuicSession* session, const BoundNetLog& net_log); | 30 QuicConnectionLogger(QuicSession* session, const BoundNetLog& net_log); |
| 31 | 31 |
| 32 virtual ~QuicConnectionLogger(); | 32 ~QuicConnectionLogger() override; |
| 33 | 33 |
| 34 // QuicPacketGenerator::DebugDelegateInterface | 34 // QuicPacketGenerator::DebugDelegateInterface |
| 35 virtual void OnFrameAddedToPacket(const QuicFrame& frame) override; | 35 void OnFrameAddedToPacket(const QuicFrame& frame) override; |
| 36 | 36 |
| 37 // QuicConnectionDebugVisitorInterface | 37 // QuicConnectionDebugVisitorInterface |
| 38 virtual void OnPacketSent(const SerializedPacket& serialized_packet, | 38 void OnPacketSent(const SerializedPacket& serialized_packet, |
| 39 QuicPacketSequenceNumber original_sequence_number, | 39 QuicPacketSequenceNumber original_sequence_number, |
| 40 EncryptionLevel level, | 40 EncryptionLevel level, |
| 41 TransmissionType transmission_type, | 41 TransmissionType transmission_type, |
| 42 const QuicEncryptedPacket& packet, | 42 const QuicEncryptedPacket& packet, |
| 43 QuicTime sent_time) override; | 43 QuicTime sent_time) override; |
| 44 virtual void OnPacketReceived(const IPEndPoint& self_address, | 44 void OnPacketReceived(const IPEndPoint& self_address, |
| 45 const IPEndPoint& peer_address, | 45 const IPEndPoint& peer_address, |
| 46 const QuicEncryptedPacket& packet) override; | 46 const QuicEncryptedPacket& packet) override; |
| 47 virtual void OnIncorrectConnectionId( | 47 void OnIncorrectConnectionId(QuicConnectionId connection_id) override; |
| 48 QuicConnectionId connection_id) override; | 48 void OnUndecryptablePacket() override; |
| 49 virtual void OnUndecryptablePacket() override; | 49 void OnDuplicatePacket(QuicPacketSequenceNumber sequence_number) override; |
| 50 virtual void OnDuplicatePacket(QuicPacketSequenceNumber sequence_number) | 50 void OnProtocolVersionMismatch(QuicVersion version) override; |
| 51 override; | 51 void OnPacketHeader(const QuicPacketHeader& header) override; |
| 52 virtual void OnProtocolVersionMismatch(QuicVersion version) override; | 52 void OnStreamFrame(const QuicStreamFrame& frame) override; |
| 53 virtual void OnPacketHeader(const QuicPacketHeader& header) override; | 53 void OnAckFrame(const QuicAckFrame& frame) override; |
| 54 virtual void OnStreamFrame(const QuicStreamFrame& frame) override; | 54 void OnCongestionFeedbackFrame( |
| 55 virtual void OnAckFrame(const QuicAckFrame& frame) override; | |
| 56 virtual void OnCongestionFeedbackFrame( | |
| 57 const QuicCongestionFeedbackFrame& frame) override; | 55 const QuicCongestionFeedbackFrame& frame) override; |
| 58 virtual void OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override; | 56 void OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override; |
| 59 virtual void OnRstStreamFrame(const QuicRstStreamFrame& frame) override; | 57 void OnRstStreamFrame(const QuicRstStreamFrame& frame) override; |
| 60 virtual void OnConnectionCloseFrame( | 58 void OnConnectionCloseFrame(const QuicConnectionCloseFrame& frame) override; |
| 61 const QuicConnectionCloseFrame& frame) override; | 59 void OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) override; |
| 62 virtual void OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) override; | 60 void OnBlockedFrame(const QuicBlockedFrame& frame) override; |
| 63 virtual void OnBlockedFrame(const QuicBlockedFrame& frame) override; | 61 void OnGoAwayFrame(const QuicGoAwayFrame& frame) override; |
| 64 virtual void OnGoAwayFrame(const QuicGoAwayFrame& frame) override; | 62 void OnPingFrame(const QuicPingFrame& frame) override; |
| 65 virtual void OnPingFrame(const QuicPingFrame& frame) override; | 63 void OnPublicResetPacket(const QuicPublicResetPacket& packet) override; |
| 66 virtual void OnPublicResetPacket( | 64 void OnVersionNegotiationPacket( |
| 67 const QuicPublicResetPacket& packet) override; | |
| 68 virtual void OnVersionNegotiationPacket( | |
| 69 const QuicVersionNegotiationPacket& packet) override; | 65 const QuicVersionNegotiationPacket& packet) override; |
| 70 virtual void OnRevivedPacket(const QuicPacketHeader& revived_header, | 66 void OnRevivedPacket(const QuicPacketHeader& revived_header, |
| 71 base::StringPiece payload) override; | 67 base::StringPiece payload) override; |
| 72 virtual void OnConnectionClosed(QuicErrorCode error, bool from_peer) override; | 68 void OnConnectionClosed(QuicErrorCode error, bool from_peer) override; |
| 73 virtual void OnSuccessfulVersionNegotiation( | 69 void OnSuccessfulVersionNegotiation(const QuicVersion& version) override; |
| 74 const QuicVersion& version) override; | |
| 75 | 70 |
| 76 void OnCryptoHandshakeMessageReceived( | 71 void OnCryptoHandshakeMessageReceived( |
| 77 const CryptoHandshakeMessage& message); | 72 const CryptoHandshakeMessage& message); |
| 78 void OnCryptoHandshakeMessageSent( | 73 void OnCryptoHandshakeMessageSent( |
| 79 const CryptoHandshakeMessage& message); | 74 const CryptoHandshakeMessage& message); |
| 80 void UpdateReceivedFrameCounts(QuicStreamId stream_id, | 75 void UpdateReceivedFrameCounts(QuicStreamId stream_id, |
| 81 int num_frames_received, | 76 int num_frames_received, |
| 82 int num_duplicate_frames_received); | 77 int num_duplicate_frames_received); |
| 83 void OnCertificateVerified(const CertVerifyResult& result); | 78 void OnCertificateVerified(const CertVerifyResult& result); |
| 84 | 79 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 // The available type of connection (WiFi, 3G, etc.) when connection was first | 162 // The available type of connection (WiFi, 3G, etc.) when connection was first |
| 168 // used. | 163 // used. |
| 169 const char* const connection_description_; | 164 const char* const connection_description_; |
| 170 | 165 |
| 171 DISALLOW_COPY_AND_ASSIGN(QuicConnectionLogger); | 166 DISALLOW_COPY_AND_ASSIGN(QuicConnectionLogger); |
| 172 }; | 167 }; |
| 173 | 168 |
| 174 } // namespace net | 169 } // namespace net |
| 175 | 170 |
| 176 #endif // NET_QUIC_QUIC_CONNECTION_LOGGER_H_ | 171 #endif // NET_QUIC_QUIC_CONNECTION_LOGGER_H_ |
| OLD | NEW |