Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Side by Side Diff: net/quic/quic_chromium_client_session.cc

Issue 1421633002: Rename GetNextStreamId to GetNextOutgoingStreamId in QuicSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@105530242
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/p2p/quic_p2p_session.cc ('k') | net/quic/quic_session.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/quic/p2p/quic_p2p_session.cc ('k') | net/quic/quic_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698