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

Side by Side Diff: net/tools/quic/quic_server_session.cc

Issue 612323013: QUIC - (no behavior change) s/NULL/nullptr/g in .../quic/... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/tools/quic/quic_server.cc ('k') | net/tools/quic/quic_server_session_test.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/tools/quic/quic_server_session.h" 5 #include "net/tools/quic/quic_server_session.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "net/quic/crypto/source_address_token.h" 8 #include "net/quic/crypto/source_address_token.h"
9 #include "net/quic/quic_connection.h" 9 #include "net/quic/quic_connection.h"
10 #include "net/quic/quic_flags.h" 10 #include "net/quic/quic_flags.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // kFHDR config maps to FEC protection always for headers stream. 45 // kFHDR config maps to FEC protection always for headers stream.
46 // TODO(jri): Add crypto stream in addition to headers for kHDR. 46 // TODO(jri): Add crypto stream in addition to headers for kHDR.
47 headers_stream_->set_fec_policy(FEC_PROTECT_ALWAYS); 47 headers_stream_->set_fec_policy(FEC_PROTECT_ALWAYS);
48 } 48 }
49 49
50 void QuicServerSession::OnConnectionClosed(QuicErrorCode error, 50 void QuicServerSession::OnConnectionClosed(QuicErrorCode error,
51 bool from_peer) { 51 bool from_peer) {
52 QuicSession::OnConnectionClosed(error, from_peer); 52 QuicSession::OnConnectionClosed(error, from_peer);
53 // In the unlikely event we get a connection close while doing an asynchronous 53 // In the unlikely event we get a connection close while doing an asynchronous
54 // crypto event, make sure we cancel the callback. 54 // crypto event, make sure we cancel the callback.
55 if (crypto_stream_.get() != NULL) { 55 if (crypto_stream_.get() != nullptr) {
56 crypto_stream_->CancelOutstandingCallbacks(); 56 crypto_stream_->CancelOutstandingCallbacks();
57 } 57 }
58 visitor_->OnConnectionClosed(connection()->connection_id(), error); 58 visitor_->OnConnectionClosed(connection()->connection_id(), error);
59 } 59 }
60 60
61 void QuicServerSession::OnWriteBlocked() { 61 void QuicServerSession::OnWriteBlocked() {
62 QuicSession::OnWriteBlocked(); 62 QuicSession::OnWriteBlocked();
63 visitor_->OnWriteBlocked(connection()); 63 visitor_->OnWriteBlocked(connection());
64 } 64 }
65 65
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 << get_max_open_streams() << ")."; 150 << get_max_open_streams() << ").";
151 connection()->SendConnectionClose(QUIC_TOO_MANY_OPEN_STREAMS); 151 connection()->SendConnectionClose(QUIC_TOO_MANY_OPEN_STREAMS);
152 return false; 152 return false;
153 } 153 }
154 return true; 154 return true;
155 } 155 }
156 156
157 QuicDataStream* QuicServerSession::CreateIncomingDataStream( 157 QuicDataStream* QuicServerSession::CreateIncomingDataStream(
158 QuicStreamId id) { 158 QuicStreamId id) {
159 if (!ShouldCreateIncomingDataStream(id)) { 159 if (!ShouldCreateIncomingDataStream(id)) {
160 return NULL; 160 return nullptr;
161 } 161 }
162 162
163 return new QuicSpdyServerStream(id, this); 163 return new QuicSpdyServerStream(id, this);
164 } 164 }
165 165
166 QuicDataStream* QuicServerSession::CreateOutgoingDataStream() { 166 QuicDataStream* QuicServerSession::CreateOutgoingDataStream() {
167 DLOG(ERROR) << "Server push not yet supported"; 167 DLOG(ERROR) << "Server push not yet supported";
168 return NULL; 168 return nullptr;
169 } 169 }
170 170
171 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() { 171 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() {
172 return crypto_stream_.get(); 172 return crypto_stream_.get();
173 } 173 }
174 174
175 } // namespace tools 175 } // namespace tools
176 } // namespace net 176 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_server.cc ('k') | net/tools/quic/quic_server_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698