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

Side by Side Diff: net/quic/p2p/quic_p2p_session.cc

Issue 1744103003: QuicSession::CreateIncomingDynamicStream now retains ownership of the created stream. No functional… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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_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 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 <utility> 7 #include <utility>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "net/base/io_buffer.h" 10 #include "net/base/io_buffer.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 QuicCryptoStream* QuicP2PSession::GetCryptoStream() { 49 QuicCryptoStream* QuicP2PSession::GetCryptoStream() {
50 return crypto_stream_.get(); 50 return crypto_stream_.get();
51 } 51 }
52 52
53 QuicP2PStream* QuicP2PSession::CreateIncomingDynamicStream(QuicStreamId id) { 53 QuicP2PStream* QuicP2PSession::CreateIncomingDynamicStream(QuicStreamId id) {
54 QuicP2PStream* stream = new QuicP2PStream(id, this); 54 QuicP2PStream* stream = new QuicP2PStream(id, this);
55 if (delegate_) { 55 if (delegate_) {
56 delegate_->OnIncomingStream(stream); 56 delegate_->OnIncomingStream(stream);
57 } 57 }
58 ActivateStream(stream);
58 return stream; 59 return stream;
59 } 60 }
60 61
61 QuicP2PStream* QuicP2PSession::CreateOutgoingDynamicStream( 62 QuicP2PStream* QuicP2PSession::CreateOutgoingDynamicStream(
62 SpdyPriority priority) { 63 SpdyPriority priority) {
63 QuicP2PStream* stream = new QuicP2PStream(GetNextOutgoingStreamId(), this); 64 QuicP2PStream* stream = new QuicP2PStream(GetNextOutgoingStreamId(), this);
64 if (stream) { 65 if (stream) {
65 ActivateStream(stream); 66 ActivateStream(stream);
66 } 67 }
67 return stream; 68 return stream;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 return result; 124 return result;
124 } 125 }
125 126
126 QuicEncryptedPacket packet(read_buffer_->data(), result); 127 QuicEncryptedPacket packet(read_buffer_->data(), result);
127 connection()->ProcessUdpPacket(connection()->self_address(), 128 connection()->ProcessUdpPacket(connection()->self_address(),
128 connection()->peer_address(), packet); 129 connection()->peer_address(), packet);
129 return OK; 130 return OK;
130 } 131 }
131 132
132 } // namespace net 133 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698