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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 RecordUnexpectedOpenStreams(CREATE_OUTGOING_RELIABLE_STREAM); | 438 RecordUnexpectedOpenStreams(CREATE_OUTGOING_RELIABLE_STREAM); |
439 return nullptr; | 439 return nullptr; |
440 } | 440 } |
441 return CreateOutgoingReliableStreamImpl(); | 441 return CreateOutgoingReliableStreamImpl(); |
442 } | 442 } |
443 | 443 |
444 QuicReliableClientStream* | 444 QuicReliableClientStream* |
445 QuicChromiumClientSession::CreateOutgoingReliableStreamImpl() { | 445 QuicChromiumClientSession::CreateOutgoingReliableStreamImpl() { |
446 DCHECK(connection()->connected()); | 446 DCHECK(connection()->connected()); |
447 QuicReliableClientStream* stream = | 447 QuicReliableClientStream* stream = |
448 new QuicReliableClientStream(GetNextStreamId(), this, net_log_); | 448 new QuicReliableClientStream(GetNextOutgoingStreamId(), this, net_log_); |
449 ActivateStream(stream); | 449 ActivateStream(stream); |
450 ++num_total_streams_; | 450 ++num_total_streams_; |
451 UMA_HISTOGRAM_COUNTS("Net.QuicSession.NumOpenStreams", GetNumOpenStreams()); | 451 UMA_HISTOGRAM_COUNTS("Net.QuicSession.NumOpenStreams", GetNumOpenStreams()); |
452 // The previous histogram puts 100 in a bucket betweeen 86-113 which does | 452 // The previous histogram puts 100 in a bucket betweeen 86-113 which does |
453 // not shed light on if chrome ever things it has more than 100 streams open. | 453 // not shed light on if chrome ever things it has more than 100 streams open. |
454 UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.TooManyOpenStreams", | 454 UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.TooManyOpenStreams", |
455 GetNumOpenStreams() > 100); | 455 GetNumOpenStreams() > 100); |
456 return stream; | 456 return stream; |
457 } | 457 } |
458 | 458 |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
964 return; | 964 return; |
965 | 965 |
966 // TODO(rch): re-enable this code once beta is cut. | 966 // TODO(rch): re-enable this code once beta is cut. |
967 // if (stream_factory_) | 967 // if (stream_factory_) |
968 // stream_factory_->OnSessionConnectTimeout(this); | 968 // stream_factory_->OnSessionConnectTimeout(this); |
969 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); | 969 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); |
970 // DCHECK_EQ(0u, GetNumOpenStreams()); | 970 // DCHECK_EQ(0u, GetNumOpenStreams()); |
971 } | 971 } |
972 | 972 |
973 } // namespace net | 973 } // namespace net |
OLD | NEW |