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

Side by Side Diff: net/quic/p2p/quic_p2p_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 | « no previous file | net/quic/quic_chromium_client_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/p2p/quic_p2p_session.h" 5 #include "net/quic/p2p/quic_p2p_session.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "net/base/io_buffer.h" 8 #include "net/base/io_buffer.h"
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "net/quic/p2p/quic_p2p_crypto_stream.h" 10 #include "net/quic/p2p/quic_p2p_crypto_stream.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 QuicP2PStream* QuicP2PSession::CreateIncomingDynamicStream(QuicStreamId id) { 51 QuicP2PStream* QuicP2PSession::CreateIncomingDynamicStream(QuicStreamId id) {
52 QuicP2PStream* stream = new QuicP2PStream(id, this); 52 QuicP2PStream* stream = new QuicP2PStream(id, this);
53 if (delegate_) { 53 if (delegate_) {
54 delegate_->OnIncomingStream(stream); 54 delegate_->OnIncomingStream(stream);
55 } 55 }
56 return stream; 56 return stream;
57 } 57 }
58 58
59 QuicP2PStream* QuicP2PSession::CreateOutgoingDynamicStream() { 59 QuicP2PStream* QuicP2PSession::CreateOutgoingDynamicStream() {
60 QuicP2PStream* stream = new QuicP2PStream(GetNextStreamId(), this); 60 QuicP2PStream* stream = new QuicP2PStream(GetNextOutgoingStreamId(), this);
61 if (stream) { 61 if (stream) {
62 ActivateStream(stream); 62 ActivateStream(stream);
63 } 63 }
64 return stream; 64 return stream;
65 } 65 }
66 66
67 void QuicP2PSession::OnConnectionClosed(QuicErrorCode error, bool from_peer) { 67 void QuicP2PSession::OnConnectionClosed(QuicErrorCode error, bool from_peer) {
68 QuicSession::OnConnectionClosed(error, from_peer); 68 QuicSession::OnConnectionClosed(error, from_peer);
69 69
70 socket_.reset(); 70 socket_.reset();
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 return result; 118 return result;
119 } 119 }
120 120
121 QuicEncryptedPacket packet(read_buffer_->data(), result); 121 QuicEncryptedPacket packet(read_buffer_->data(), result);
122 connection()->ProcessUdpPacket(connection()->self_address(), 122 connection()->ProcessUdpPacket(connection()->self_address(),
123 connection()->peer_address(), packet); 123 connection()->peer_address(), packet);
124 return OK; 124 return OK;
125 } 125 }
126 126
127 } // namespace net 127 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_chromium_client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698