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 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1162 if (!going_away_) | 1162 if (!going_away_) |
1163 RecordUnexpectedNotGoingAway(NOTIFY_FACTORY_OF_SESSION_CLOSED); | 1163 RecordUnexpectedNotGoingAway(NOTIFY_FACTORY_OF_SESSION_CLOSED); |
1164 | 1164 |
1165 going_away_ = true; | 1165 going_away_ = true; |
1166 DCHECK_EQ(0u, GetNumActiveStreams()); | 1166 DCHECK_EQ(0u, GetNumActiveStreams()); |
1167 // Will delete |this|. | 1167 // Will delete |this|. |
1168 if (stream_factory_) | 1168 if (stream_factory_) |
1169 stream_factory_->OnSessionClosed(this); | 1169 stream_factory_->OnSessionClosed(this); |
1170 } | 1170 } |
1171 | 1171 |
1172 void QuicChromiumClientSession::OnConnectTimeout() { | 1172 void QuicChromiumClientSession::OnConnectTimeout() { |
Ryan Hamilton
2016/08/25 21:50:54
Since this code does nothing shall we remove it to
Jana
2016/08/25 22:03:44
Good idea, and seems fine to remove -- Done.
| |
1173 DCHECK(callback_.is_null()); | 1173 DCHECK(callback_.is_null()); |
1174 | |
1175 if (IsCryptoHandshakeConfirmed()) | 1174 if (IsCryptoHandshakeConfirmed()) |
1176 return; | 1175 return; |
1177 | |
1178 // TODO(rch): re-enable this code once beta is cut. | |
1179 // if (stream_factory_) | |
1180 // stream_factory_->OnSessionConnectTimeout(this); | |
1181 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); | |
1182 // DCHECK_EQ(0u, GetNumOpenOutgoingStreams()); | |
1183 } | 1176 } |
1184 | 1177 |
1185 bool QuicChromiumClientSession::MigrateToSocket( | 1178 bool QuicChromiumClientSession::MigrateToSocket( |
1186 std::unique_ptr<DatagramClientSocket> socket, | 1179 std::unique_ptr<DatagramClientSocket> socket, |
1187 std::unique_ptr<QuicChromiumPacketReader> reader, | 1180 std::unique_ptr<QuicChromiumPacketReader> reader, |
1188 std::unique_ptr<QuicChromiumPacketWriter> writer, | 1181 std::unique_ptr<QuicChromiumPacketWriter> writer, |
1189 scoped_refptr<StringIOBuffer> packet) { | 1182 scoped_refptr<StringIOBuffer> packet) { |
1190 DCHECK_EQ(sockets_.size(), packet_readers_.size()); | 1183 DCHECK_EQ(sockets_.size(), packet_readers_.size()); |
1191 if (sockets_.size() >= kMaxReadersPerQuicSession) { | 1184 if (sockets_.size() >= kMaxReadersPerQuicSession) { |
1192 return false; | 1185 return false; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1244 } | 1237 } |
1245 | 1238 |
1246 void QuicChromiumClientSession::DeletePromised( | 1239 void QuicChromiumClientSession::DeletePromised( |
1247 QuicClientPromisedInfo* promised) { | 1240 QuicClientPromisedInfo* promised) { |
1248 if (IsOpenStream(promised->id())) | 1241 if (IsOpenStream(promised->id())) |
1249 streams_pushed_and_claimed_count_++; | 1242 streams_pushed_and_claimed_count_++; |
1250 QuicClientSessionBase::DeletePromised(promised); | 1243 QuicClientSessionBase::DeletePromised(promised); |
1251 } | 1244 } |
1252 | 1245 |
1253 } // namespace net | 1246 } // namespace net |
OLD | NEW |