| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "net/quic/chromium/quic_chromium_client_session.h" | 5 #include "net/quic/chromium/quic_chromium_client_session.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 NUM_LOCATIONS); | 90 NUM_LOCATIONS); |
| 91 } | 91 } |
| 92 | 92 |
| 93 void RecordUnexpectedNotGoingAway(Location location) { | 93 void RecordUnexpectedNotGoingAway(Location location) { |
| 94 UMA_HISTOGRAM_ENUMERATION("Net.QuicSession.UnexpectedNotGoingAway", location, | 94 UMA_HISTOGRAM_ENUMERATION("Net.QuicSession.UnexpectedNotGoingAway", location, |
| 95 NUM_LOCATIONS); | 95 NUM_LOCATIONS); |
| 96 } | 96 } |
| 97 | 97 |
| 98 // Histogram for recording the different reasons that a QUIC session is unable | 98 // Histogram for recording the different reasons that a QUIC session is unable |
| 99 // to complete the handshake. | 99 // to complete the handshake. |
| 100 enum HandshakeFailureReason { | 100 enum HandshakeFailureReason2 { |
| 101 HANDSHAKE_FAILURE_UNKNOWN = 0, | 101 HANDSHAKE_FAILURE_UNKNOWN = 0, |
| 102 HANDSHAKE_FAILURE_BLACK_HOLE = 1, | 102 HANDSHAKE_FAILURE_BLACK_HOLE = 1, |
| 103 HANDSHAKE_FAILURE_PUBLIC_RESET = 2, | 103 HANDSHAKE_FAILURE_PUBLIC_RESET = 2, |
| 104 NUM_HANDSHAKE_FAILURE_REASONS = 3, | 104 NUM_HANDSHAKE_FAILURE_REASONS = 3, |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 void RecordHandshakeFailureReason(HandshakeFailureReason reason) { | 107 void RecordHandshakeFailureReason(HandshakeFailureReason2 reason) { |
| 108 UMA_HISTOGRAM_ENUMERATION( | 108 UMA_HISTOGRAM_ENUMERATION( |
| 109 "Net.QuicSession.ConnectionClose.HandshakeNotConfirmed.Reason", reason, | 109 "Net.QuicSession.ConnectionClose.HandshakeNotConfirmed.Reason", reason, |
| 110 NUM_HANDSHAKE_FAILURE_REASONS); | 110 NUM_HANDSHAKE_FAILURE_REASONS); |
| 111 } | 111 } |
| 112 | 112 |
| 113 // Note: these values must be kept in sync with the corresponding values in: | 113 // Note: these values must be kept in sync with the corresponding values in: |
| 114 // tools/metrics/histograms/histograms.xml | 114 // tools/metrics/histograms/histograms.xml |
| 115 enum HandshakeState { | 115 enum HandshakeState { |
| 116 STATE_STARTED = 0, | 116 STATE_STARTED = 0, |
| 117 STATE_ENCRYPTION_ESTABLISHED = 1, | 117 STATE_ENCRYPTION_ESTABLISHED = 1, |
| (...skipping 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1845 } | 1845 } |
| 1846 | 1846 |
| 1847 size_t QuicChromiumClientSession::EstimateMemoryUsage() const { | 1847 size_t QuicChromiumClientSession::EstimateMemoryUsage() const { |
| 1848 // TODO(xunjieli): Estimate |crypto_stream_|, QuicSpdySession's | 1848 // TODO(xunjieli): Estimate |crypto_stream_|, QuicSpdySession's |
| 1849 // QuicHeaderList, QuicSession's QuiCWriteBlockedList, open streams and | 1849 // QuicHeaderList, QuicSession's QuiCWriteBlockedList, open streams and |
| 1850 // unacked packet map. | 1850 // unacked packet map. |
| 1851 return base::trace_event::EstimateMemoryUsage(packet_readers_); | 1851 return base::trace_event::EstimateMemoryUsage(packet_readers_); |
| 1852 } | 1852 } |
| 1853 | 1853 |
| 1854 } // namespace net | 1854 } // namespace net |
| OLD | NEW |