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_client_session.h" | 5 #include "net/quic/quic_client_session.h" |
6 | 6 |
7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/metrics/sparse_histogram.h" | 10 #include "base/metrics/sparse_histogram.h" |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 bool can_notify = require_confirmation_ ? | 223 bool can_notify = require_confirmation_ ? |
224 IsCryptoHandshakeConfirmed() : IsEncryptionEstablished(); | 224 IsCryptoHandshakeConfirmed() : IsEncryptionEstablished(); |
225 if (can_notify) { | 225 if (can_notify) { |
226 return OK; | 226 return OK; |
227 } | 227 } |
228 | 228 |
229 callback_ = callback; | 229 callback_ = callback; |
230 return ERR_IO_PENDING; | 230 return ERR_IO_PENDING; |
231 } | 231 } |
232 | 232 |
| 233 int QuicClientSession::GetNumSentClientHellos() const { |
| 234 return crypto_stream_->num_sent_client_hellos(); |
| 235 } |
| 236 |
233 ReliableQuicStream* QuicClientSession::CreateIncomingReliableStream( | 237 ReliableQuicStream* QuicClientSession::CreateIncomingReliableStream( |
234 QuicStreamId id) { | 238 QuicStreamId id) { |
235 DLOG(ERROR) << "Server push not supported"; | 239 DLOG(ERROR) << "Server push not supported"; |
236 return NULL; | 240 return NULL; |
237 } | 241 } |
238 | 242 |
239 void QuicClientSession::CloseStream(QuicStreamId stream_id) { | 243 void QuicClientSession::CloseStream(QuicStreamId stream_id) { |
240 QuicSession::CloseStream(stream_id); | 244 QuicSession::CloseStream(stream_id); |
241 OnClosedStream(); | 245 OnClosedStream(); |
242 } | 246 } |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 } | 414 } |
411 | 415 |
412 void QuicClientSession::NotifyFactoryOfSessionClose() { | 416 void QuicClientSession::NotifyFactoryOfSessionClose() { |
413 DCHECK_EQ(0u, GetNumOpenStreams()); | 417 DCHECK_EQ(0u, GetNumOpenStreams()); |
414 DCHECK(stream_factory_); | 418 DCHECK(stream_factory_); |
415 // Will delete |this|. | 419 // Will delete |this|. |
416 stream_factory_->OnSessionClose(this); | 420 stream_factory_->OnSessionClose(this); |
417 } | 421 } |
418 | 422 |
419 } // namespace net | 423 } // namespace net |
OLD | NEW |