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

Side by Side Diff: net/quic/core/quic_session.cc

Issue 2459293003: Add explicit != nullptr check in quic_session. No behavior change. (Closed)
Patch Set: Created 4 years, 1 month 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 | no next file » | 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/core/quic_session.h" 5 #include "net/quic/core/quic_session.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 if (stream_id == kConnectionLevelId) { 152 if (stream_id == kConnectionLevelId) {
153 // This is a window update that applies to the connection, rather than an 153 // This is a window update that applies to the connection, rather than an
154 // individual stream. 154 // individual stream.
155 DVLOG(1) << ENDPOINT << "Received connection level flow control window " 155 DVLOG(1) << ENDPOINT << "Received connection level flow control window "
156 "update with byte offset: " 156 "update with byte offset: "
157 << frame.byte_offset; 157 << frame.byte_offset;
158 flow_controller_.UpdateSendWindowOffset(frame.byte_offset); 158 flow_controller_.UpdateSendWindowOffset(frame.byte_offset);
159 return; 159 return;
160 } 160 }
161 ReliableQuicStream* stream = GetOrCreateStream(stream_id); 161 ReliableQuicStream* stream = GetOrCreateStream(stream_id);
162 if (stream) { 162 if (stream != nullptr) {
163 stream->OnWindowUpdateFrame(frame); 163 stream->OnWindowUpdateFrame(frame);
164 } 164 }
165 } 165 }
166 166
167 void QuicSession::OnBlockedFrame(const QuicBlockedFrame& frame) { 167 void QuicSession::OnBlockedFrame(const QuicBlockedFrame& frame) {
168 // TODO(rjshade): Compare our flow control receive windows for specified 168 // TODO(rjshade): Compare our flow control receive windows for specified
169 // streams: if we have a large window then maybe something 169 // streams: if we have a large window then maybe something
170 // had gone wrong with the flow control accounting. 170 // had gone wrong with the flow control accounting.
171 DVLOG(1) << ENDPOINT 171 DVLOG(1) << ENDPOINT
172 << "Received BLOCKED frame with stream id: " << frame.stream_id; 172 << "Received BLOCKED frame with stream id: " << frame.stream_id;
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 819
820 size_t QuicSession::MaxAvailableStreams() const { 820 size_t QuicSession::MaxAvailableStreams() const {
821 return max_open_incoming_streams_ * kMaxAvailableStreamsMultiplier; 821 return max_open_incoming_streams_ * kMaxAvailableStreamsMultiplier;
822 } 822 }
823 823
824 bool QuicSession::IsIncomingStream(QuicStreamId id) const { 824 bool QuicSession::IsIncomingStream(QuicStreamId id) const {
825 return id % 2 != next_outgoing_stream_id_ % 2; 825 return id % 2 != next_outgoing_stream_id_ % 2;
826 } 826 }
827 827
828 } // namespace net 828 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698