| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 void OnCryptoHandshakeMessageReceived( | 71 void OnCryptoHandshakeMessageReceived( |
| 72 const CryptoHandshakeMessage& message); | 72 const CryptoHandshakeMessage& message); |
| 73 void OnCryptoHandshakeMessageSent( | 73 void OnCryptoHandshakeMessageSent( |
| 74 const CryptoHandshakeMessage& message); | 74 const CryptoHandshakeMessage& message); |
| 75 void UpdateReceivedFrameCounts(QuicStreamId stream_id, | 75 void UpdateReceivedFrameCounts(QuicStreamId stream_id, |
| 76 int num_frames_received, | 76 int num_frames_received, |
| 77 int num_duplicate_frames_received); | 77 int num_duplicate_frames_received); |
| 78 void OnCertificateVerified(const CertVerifyResult& result); | 78 void OnCertificateVerified(const CertVerifyResult& result); |
| 79 | 79 |
| 80 // Return connection's overall packet loss rate in 1/10th of percent. |
| 81 int PacketLossRate() const; |
| 82 |
| 80 private: | 83 private: |
| 81 friend class test::QuicConnectionLoggerPeer; | 84 friend class test::QuicConnectionLoggerPeer; |
| 82 | 85 |
| 83 // Do a factory get for a histogram for recording data, about individual | 86 // Do a factory get for a histogram for recording data, about individual |
| 84 // packet sequence numbers, that was gathered in the vectors | 87 // packet sequence numbers, that was gathered in the vectors |
| 85 // received_packets_ and received_acks_. |statistic_name| identifies which | 88 // received_packets_ and received_acks_. |statistic_name| identifies which |
| 86 // element of data is recorded, and is used to form the histogram name. | 89 // element of data is recorded, and is used to form the histogram name. |
| 87 base::HistogramBase* GetPacketSequenceNumberHistogram( | 90 base::HistogramBase* GetPacketSequenceNumberHistogram( |
| 88 const char* statistic_name) const; | 91 const char* statistic_name) const; |
| 89 // Do a factory get for a histogram to record a 6-packet loss-sequence as a | 92 // Do a factory get for a histogram to record a 6-packet loss-sequence as a |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // 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 |
| 174 // used. | 177 // used. |
| 175 const char* const connection_description_; | 178 const char* const connection_description_; |
| 176 | 179 |
| 177 DISALLOW_COPY_AND_ASSIGN(QuicConnectionLogger); | 180 DISALLOW_COPY_AND_ASSIGN(QuicConnectionLogger); |
| 178 }; | 181 }; |
| 179 | 182 |
| 180 } // namespace net | 183 } // namespace net |
| 181 | 184 |
| 182 #endif // NET_QUIC_QUIC_CONNECTION_LOGGER_H_ | 185 #endif // NET_QUIC_QUIC_CONNECTION_LOGGER_H_ |
| OLD | NEW |