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/quic_chromium_client_session.h" | 5 #include "net/quic/quic_chromium_client_session.h" |
| 6 | 6 |
| 7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
| 10 #include "base/metrics/sparse_histogram.h" | 10 #include "base/metrics/sparse_histogram.h" |
| (...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 905 dict->Set("aliases", alias_list.Pass()); | 905 dict->Set("aliases", alias_list.Pass()); |
| 906 | 906 |
| 907 return dict.Pass(); | 907 return dict.Pass(); |
| 908 } | 908 } |
| 909 | 909 |
| 910 base::WeakPtr<QuicChromiumClientSession> | 910 base::WeakPtr<QuicChromiumClientSession> |
| 911 QuicChromiumClientSession::GetWeakPtr() { | 911 QuicChromiumClientSession::GetWeakPtr() { |
| 912 return weak_factory_.GetWeakPtr(); | 912 return weak_factory_.GetWeakPtr(); |
| 913 } | 913 } |
| 914 | 914 |
| 915 void QuicChromiumClientSession::OnReadError(int result) { | 915 void QuicChromiumClientSession::OnReadError( |
| 916 int result, | |
| 917 const DatagramClientSocket* socket) { | |
|
Ryan Hamilton
2015/12/22 22:03:45
Typically, we would do /*socket*/ here to indicate
| |
| 916 DVLOG(1) << "Closing session on read error: " << result; | 918 DVLOG(1) << "Closing session on read error: " << result; |
| 917 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.QuicSession.ReadError", -result); | 919 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.QuicSession.ReadError", -result); |
| 918 NotifyFactoryOfSessionGoingAway(); | 920 NotifyFactoryOfSessionGoingAway(); |
| 919 CloseSessionOnErrorInner(result, QUIC_PACKET_READ_ERROR); | 921 CloseSessionOnErrorInner(result, QUIC_PACKET_READ_ERROR); |
| 920 NotifyFactoryOfSessionClosedLater(); | 922 NotifyFactoryOfSessionClosedLater(); |
| 921 } | 923 } |
| 922 | 924 |
| 923 bool QuicChromiumClientSession::OnPacket(const QuicEncryptedPacket& packet, | 925 bool QuicChromiumClientSession::OnPacket(const QuicEncryptedPacket& packet, |
| 924 IPEndPoint local_address, | 926 IPEndPoint local_address, |
| 925 IPEndPoint peer_address) { | 927 IPEndPoint peer_address) { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 975 return; | 977 return; |
| 976 | 978 |
| 977 // TODO(rch): re-enable this code once beta is cut. | 979 // TODO(rch): re-enable this code once beta is cut. |
| 978 // if (stream_factory_) | 980 // if (stream_factory_) |
| 979 // stream_factory_->OnSessionConnectTimeout(this); | 981 // stream_factory_->OnSessionConnectTimeout(this); |
| 980 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); | 982 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); |
| 981 // DCHECK_EQ(0u, GetNumOpenOutgoingStreams()); | 983 // DCHECK_EQ(0u, GetNumOpenOutgoingStreams()); |
| 982 } | 984 } |
| 983 | 985 |
| 984 } // namespace net | 986 } // namespace net |
| OLD | NEW |