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

Side by Side Diff: net/quic/quic_session_test.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/quic_session.cc ('k') | net/quic/quic_spdy_session.cc » ('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_session.h" 5 #include "net/quic/quic_session.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 explicit TestSession(QuicConnection* connection) 121 explicit TestSession(QuicConnection* connection)
122 : QuicSpdySession(connection, DefaultQuicConfig()), 122 : QuicSpdySession(connection, DefaultQuicConfig()),
123 crypto_stream_(this), 123 crypto_stream_(this),
124 writev_consumes_all_data_(false) { 124 writev_consumes_all_data_(false) {
125 Initialize(); 125 Initialize();
126 } 126 }
127 127
128 TestCryptoStream* GetCryptoStream() override { return &crypto_stream_; } 128 TestCryptoStream* GetCryptoStream() override { return &crypto_stream_; }
129 129
130 TestStream* CreateOutgoingDynamicStream() override { 130 TestStream* CreateOutgoingDynamicStream() override {
131 TestStream* stream = new TestStream(GetNextStreamId(), this); 131 TestStream* stream = new TestStream(GetNextOutgoingStreamId(), this);
132 ActivateStream(stream); 132 ActivateStream(stream);
133 return stream; 133 return stream;
134 } 134 }
135 135
136 TestStream* CreateIncomingDynamicStream(QuicStreamId id) override { 136 TestStream* CreateIncomingDynamicStream(QuicStreamId id) override {
137 // Enforce the limit on the number of open streams. 137 // Enforce the limit on the number of open streams.
138 if (GetNumOpenStreams() + 1 > get_max_open_streams()) { 138 if (GetNumOpenStreams() + 1 > get_max_open_streams()) {
139 connection()->SendConnectionClose(QUIC_TOO_MANY_OPEN_STREAMS); 139 connection()->SendConnectionClose(QUIC_TOO_MANY_OPEN_STREAMS);
140 return nullptr; 140 return nullptr;
141 } else { 141 } else {
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 // Verify that there is no entry for the stream in 1073 // Verify that there is no entry for the stream in
1074 // locally_closed_streams_highest_offset_. 1074 // locally_closed_streams_highest_offset_.
1075 EXPECT_EQ( 1075 EXPECT_EQ(
1076 FLAGS_quic_fix_fin_accounting ? 0u : 1u, 1076 FLAGS_quic_fix_fin_accounting ? 0u : 1u,
1077 QuicSessionPeer::GetLocallyClosedStreamsHighestOffset(&session_).size()); 1077 QuicSessionPeer::GetLocallyClosedStreamsHighestOffset(&session_).size());
1078 } 1078 }
1079 1079
1080 } // namespace 1080 } // namespace
1081 } // namespace test 1081 } // namespace test
1082 } // namespace net 1082 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_session.cc ('k') | net/quic/quic_spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698