Chromium Code Reviews| 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 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 869 histogram->AddCount(error, num_streams); | 869 histogram->AddCount(error, num_streams); |
| 870 } | 870 } |
| 871 UMA_HISTOGRAM_SPARSE_SLOWLY( | 871 UMA_HISTOGRAM_SPARSE_SLOWLY( |
| 872 "Net.QuicSession.ConnectionCloseErrorCodeClient", error); | 872 "Net.QuicSession.ConnectionCloseErrorCodeClient", error); |
| 873 } | 873 } |
| 874 | 874 |
| 875 if (error == QUIC_NETWORK_IDLE_TIMEOUT) { | 875 if (error == QUIC_NETWORK_IDLE_TIMEOUT) { |
| 876 UMA_HISTOGRAM_COUNTS( | 876 UMA_HISTOGRAM_COUNTS( |
| 877 "Net.QuicSession.ConnectionClose.NumOpenStreams.TimedOut", | 877 "Net.QuicSession.ConnectionClose.NumOpenStreams.TimedOut", |
| 878 GetNumOpenOutgoingStreams()); | 878 GetNumOpenOutgoingStreams()); |
| 879 // If the connection times out with open stream, notify the factory to use | |
| 880 // reduced ping timeouts. | |
| 881 if (GetNumOpenOutgoingStreams() > 0 && stream_factory_) { | |
| 882 stream_factory_->set_reduced_ping_timeout(); | |
|
Ryan Hamilton
2016/09/01 16:36:14
nit: I'd probably be inclined to call stream_facto
Zhongyi Shi
2016/09/01 18:58:29
Done.
| |
| 883 } | |
| 879 if (IsCryptoHandshakeConfirmed()) { | 884 if (IsCryptoHandshakeConfirmed()) { |
| 880 if (GetNumOpenOutgoingStreams() > 0) { | 885 if (GetNumOpenOutgoingStreams() > 0) { |
| 881 disabled_reason_ = QUIC_DISABLED_TIMEOUT_WITH_OPEN_STREAMS; | 886 disabled_reason_ = QUIC_DISABLED_TIMEOUT_WITH_OPEN_STREAMS; |
| 882 UMA_HISTOGRAM_BOOLEAN( | 887 UMA_HISTOGRAM_BOOLEAN( |
| 883 "Net.QuicSession.TimedOutWithOpenStreams.HasUnackedPackets", | 888 "Net.QuicSession.TimedOutWithOpenStreams.HasUnackedPackets", |
| 884 connection()->sent_packet_manager().HasUnackedPackets()); | 889 connection()->sent_packet_manager().HasUnackedPackets()); |
| 885 UMA_HISTOGRAM_COUNTS( | 890 UMA_HISTOGRAM_COUNTS( |
| 886 "Net.QuicSession.TimedOutWithOpenStreams.ConsecutiveRTOCount", | 891 "Net.QuicSession.TimedOutWithOpenStreams.ConsecutiveRTOCount", |
| 887 connection()->sent_packet_manager().GetConsecutiveRtoCount()); | 892 connection()->sent_packet_manager().GetConsecutiveRtoCount()); |
| 888 UMA_HISTOGRAM_COUNTS( | 893 UMA_HISTOGRAM_COUNTS( |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1223 } | 1228 } |
| 1224 | 1229 |
| 1225 void QuicChromiumClientSession::DeletePromised( | 1230 void QuicChromiumClientSession::DeletePromised( |
| 1226 QuicClientPromisedInfo* promised) { | 1231 QuicClientPromisedInfo* promised) { |
| 1227 if (IsOpenStream(promised->id())) | 1232 if (IsOpenStream(promised->id())) |
| 1228 streams_pushed_and_claimed_count_++; | 1233 streams_pushed_and_claimed_count_++; |
| 1229 QuicClientSessionBase::DeletePromised(promised); | 1234 QuicClientSessionBase::DeletePromised(promised); |
| 1230 } | 1235 } |
| 1231 | 1236 |
| 1232 } // namespace net | 1237 } // namespace net |
| OLD | NEW |