| 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 1743 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1861 } | 1861 } | 
| 1862 | 1862 | 
| 1863 size_t QuicChromiumClientSession::EstimateMemoryUsage() const { | 1863 size_t QuicChromiumClientSession::EstimateMemoryUsage() const { | 
| 1864   // TODO(xunjieli): Estimate |crypto_stream_|, QuicSpdySession's | 1864   // TODO(xunjieli): Estimate |crypto_stream_|, QuicSpdySession's | 
| 1865   // QuicHeaderList, QuicSession's QuiCWriteBlockedList, open streams and | 1865   // QuicHeaderList, QuicSession's QuiCWriteBlockedList, open streams and | 
| 1866   // unacked packet map. | 1866   // unacked packet map. | 
| 1867   return base::trace_event::EstimateMemoryUsage(packet_readers_); | 1867   return base::trace_event::EstimateMemoryUsage(packet_readers_); | 
| 1868 } | 1868 } | 
| 1869 | 1869 | 
| 1870 }  // namespace net | 1870 }  // namespace net | 
| OLD | NEW | 
|---|