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

Side by Side Diff: net/quic/quic_connection_logger.h

Issue 1190823003: Remove dependency on headers stream from QuicSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0616
Patch Set: deleted an include Created 5 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 unified diff | Download patch
« no previous file with comments | « net/quic/quic_connection.cc ('k') | net/quic/quic_connection_logger.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "net/base/network_change_notifier.h" 11 #include "net/base/network_change_notifier.h"
12 #include "net/log/net_log.h" 12 #include "net/log/net_log.h"
13 #include "net/quic/quic_connection.h" 13 #include "net/quic/quic_connection.h"
14 #include "net/quic/quic_protocol.h" 14 #include "net/quic/quic_protocol.h"
15 #include "net/quic/quic_session.h" 15 #include "net/quic/quic_spdy_session.h"
16 16
17 namespace net { 17 namespace net {
18 namespace test { 18 namespace test {
19 class QuicConnectionLoggerPeer; 19 class QuicConnectionLoggerPeer;
20 } // namespace test 20 } // namespace test
21 21
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, 30 QuicConnectionLogger(QuicSpdySession* session,
31 const char* const connection_description, 31 const char* const connection_description,
32 const BoundNetLog& net_log); 32 const BoundNetLog& net_log);
33 33
34 ~QuicConnectionLogger() override; 34 ~QuicConnectionLogger() override;
35 35
36 // QuicPacketGenerator::DebugDelegateInterface 36 // QuicPacketGenerator::DebugDelegateInterface
37 void OnFrameAddedToPacket(const QuicFrame& frame) override; 37 void OnFrameAddedToPacket(const QuicFrame& frame) override;
38 38
39 // QuicConnectionDebugVisitorInterface 39 // QuicConnectionDebugVisitorInterface
40 void OnPacketSent(const SerializedPacket& serialized_packet, 40 void OnPacketSent(const SerializedPacket& serialized_packet,
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 int bit_mask_of_packets, 111 int bit_mask_of_packets,
112 int valid_bits_in_mask); 112 int valid_bits_in_mask);
113 // For connections longer than 21 received packets, this call will calculate 113 // For connections longer than 21 received packets, this call will calculate
114 // the overall packet loss rate, and record it into a histogram. 114 // the overall packet loss rate, and record it into a histogram.
115 void RecordAggregatePacketLossRate() const; 115 void RecordAggregatePacketLossRate() const;
116 // At destruction time, this records results of |pacaket_received_| into 116 // At destruction time, this records results of |pacaket_received_| into
117 // histograms for specific connection types. 117 // histograms for specific connection types.
118 void RecordLossHistograms() const; 118 void RecordLossHistograms() const;
119 119
120 BoundNetLog net_log_; 120 BoundNetLog net_log_;
121 QuicSession* session_; // Unowned. 121 QuicSpdySession* session_; // Unowned.
122 // The last packet sequence number received. 122 // The last packet sequence number received.
123 QuicPacketSequenceNumber last_received_packet_sequence_number_; 123 QuicPacketSequenceNumber last_received_packet_sequence_number_;
124 // The size of the most recently received packet. 124 // The size of the most recently received packet.
125 size_t last_received_packet_size_; 125 size_t last_received_packet_size_;
126 // The size of the previously received packet. 126 // The size of the previously received packet.
127 size_t previous_received_packet_size_; 127 size_t previous_received_packet_size_;
128 // The largest packet sequence number received. In the case where a packet is 128 // The largest packet sequence number received. In the case where a packet is
129 // received late (out of order), this value will not be updated. 129 // received late (out of order), this value will not be updated.
130 QuicPacketSequenceNumber largest_received_packet_sequence_number_; 130 QuicPacketSequenceNumber largest_received_packet_sequence_number_;
131 // The largest packet sequence number which the peer has failed to 131 // The largest packet sequence number which the peer has failed to
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // The available type of connection (WiFi, 3G, etc.) when connection was first 176 // The available type of connection (WiFi, 3G, etc.) when connection was first
177 // used. 177 // used.
178 const char* const connection_description_; 178 const char* const connection_description_;
179 179
180 DISALLOW_COPY_AND_ASSIGN(QuicConnectionLogger); 180 DISALLOW_COPY_AND_ASSIGN(QuicConnectionLogger);
181 }; 181 };
182 182
183 } // namespace net 183 } // namespace net
184 184
185 #endif // NET_QUIC_QUIC_CONNECTION_LOGGER_H_ 185 #endif // NET_QUIC_QUIC_CONNECTION_LOGGER_H_
OLDNEW
« no previous file with comments | « net/quic/quic_connection.cc ('k') | net/quic/quic_connection_logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698