| 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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 QuicReliableClientStream* | 428 QuicReliableClientStream* |
| 429 QuicClientSession::CreateOutgoingReliableStreamImpl() { | 429 QuicClientSession::CreateOutgoingReliableStreamImpl() { |
| 430 DCHECK(connection()->connected()); | 430 DCHECK(connection()->connected()); |
| 431 QuicReliableClientStream* stream = | 431 QuicReliableClientStream* stream = |
| 432 new QuicReliableClientStream(GetNextStreamId(), this, net_log_); | 432 new QuicReliableClientStream(GetNextStreamId(), this, net_log_); |
| 433 ActivateStream(stream); | 433 ActivateStream(stream); |
| 434 ++num_total_streams_; | 434 ++num_total_streams_; |
| 435 UMA_HISTOGRAM_COUNTS("Net.QuicSession.NumOpenStreams", GetNumOpenStreams()); | 435 UMA_HISTOGRAM_COUNTS("Net.QuicSession.NumOpenStreams", GetNumOpenStreams()); |
| 436 // The previous histogram puts 100 in a bucket betweeen 86-113 which does | 436 // The previous histogram puts 100 in a bucket betweeen 86-113 which does |
| 437 // not shed light on if chrome ever things it has more than 100 streams open. | 437 // not shed light on if chrome ever things it has more than 100 streams open. |
| 438 UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.TooManyOpenStream", | 438 UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.TooManyOpenStreams", |
| 439 GetNumOpenStreams() > 100); | 439 GetNumOpenStreams() > 100); |
| 440 return stream; | 440 return stream; |
| 441 } | 441 } |
| 442 | 442 |
| 443 QuicCryptoClientStream* QuicClientSession::GetCryptoStream() { | 443 QuicCryptoClientStream* QuicClientSession::GetCryptoStream() { |
| 444 return crypto_stream_.get(); | 444 return crypto_stream_.get(); |
| 445 }; | 445 }; |
| 446 | 446 |
| 447 // TODO(rtenneti): Add unittests for GetSSLInfo which exercise the various ways | 447 // TODO(rtenneti): Add unittests for GetSSLInfo which exercise the various ways |
| 448 // we learn about SSL info (sync vs async vs cached). | 448 // we learn about SSL info (sync vs async vs cached). |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 921 return; | 921 return; |
| 922 | 922 |
| 923 // TODO(rch): re-enable this code once beta is cut. | 923 // TODO(rch): re-enable this code once beta is cut. |
| 924 // if (stream_factory_) | 924 // if (stream_factory_) |
| 925 // stream_factory_->OnSessionConnectTimeout(this); | 925 // stream_factory_->OnSessionConnectTimeout(this); |
| 926 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); | 926 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); |
| 927 // DCHECK_EQ(0u, GetNumOpenStreams()); | 927 // DCHECK_EQ(0u, GetNumOpenStreams()); |
| 928 } | 928 } |
| 929 | 929 |
| 930 } // namespace net | 930 } // namespace net |
| OLD | NEW |