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

Side by Side Diff: net/quic/quic_stream_sequencer.cc

Issue 1565883003: relnote: Moving many QUIC DFATALS over to QUIC_BUG (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove comments Created 4 years, 11 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_test.cc ('k') | net/quic/quic_unacked_packet_map.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_stream_sequencer.h" 5 #include "net/quic/quic_stream_sequencer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "net/quic/quic_bug_tracker.h"
12 #include "net/quic/quic_clock.h" 13 #include "net/quic/quic_clock.h"
13 #include "net/quic/quic_flags.h" 14 #include "net/quic/quic_flags.h"
14 #include "net/quic/quic_frame_list.h" 15 #include "net/quic/quic_frame_list.h"
15 #include "net/quic/quic_protocol.h" 16 #include "net/quic/quic_protocol.h"
16 #include "net/quic/reliable_quic_stream.h" 17 #include "net/quic/reliable_quic_stream.h"
17 #include "net/quic/stream_sequencer_buffer.h" 18 #include "net/quic/stream_sequencer_buffer.h"
18 19
19 using std::min; 20 using std::min;
20 using std::numeric_limits; 21 using std::numeric_limits;
21 using std::string; 22 using std::string;
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } 152 }
152 153
153 bool QuicStreamSequencer::IsClosed() const { 154 bool QuicStreamSequencer::IsClosed() const {
154 return buffered_frames_->BytesConsumed() >= close_offset_; 155 return buffered_frames_->BytesConsumed() >= close_offset_;
155 } 156 }
156 157
157 void QuicStreamSequencer::MarkConsumed(size_t num_bytes_consumed) { 158 void QuicStreamSequencer::MarkConsumed(size_t num_bytes_consumed) {
158 DCHECK(!blocked_); 159 DCHECK(!blocked_);
159 bool result = buffered_frames_->MarkConsumed(num_bytes_consumed); 160 bool result = buffered_frames_->MarkConsumed(num_bytes_consumed);
160 if (!result) { 161 if (!result) {
161 LOG(DFATAL) << "Invalid argument to MarkConsumed." 162 QUIC_BUG << "Invalid argument to MarkConsumed."
162 << " expect to consume: " << num_bytes_consumed 163 << " expect to consume: " << num_bytes_consumed
163 << ", but not enough bytes available."; 164 << ", but not enough bytes available.";
164 stream_->Reset(QUIC_ERROR_PROCESSING_STREAM); 165 stream_->Reset(QUIC_ERROR_PROCESSING_STREAM);
165 return; 166 return;
166 } 167 }
167 stream_->AddBytesConsumed(num_bytes_consumed); 168 stream_->AddBytesConsumed(num_bytes_consumed);
168 } 169 }
169 170
170 void QuicStreamSequencer::SetBlockedUntilFlush() { 171 void QuicStreamSequencer::SetBlockedUntilFlush() {
171 blocked_ = true; 172 blocked_ = true;
172 } 173 }
173 174
(...skipping 24 matching lines...) Expand all
198 199
199 size_t QuicStreamSequencer::NumBytesBuffered() const { 200 size_t QuicStreamSequencer::NumBytesBuffered() const {
200 return buffered_frames_->BytesBuffered(); 201 return buffered_frames_->BytesBuffered();
201 } 202 }
202 203
203 QuicStreamOffset QuicStreamSequencer::NumBytesConsumed() const { 204 QuicStreamOffset QuicStreamSequencer::NumBytesConsumed() const {
204 return buffered_frames_->BytesConsumed(); 205 return buffered_frames_->BytesConsumed();
205 } 206 }
206 207
207 } // namespace net 208 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_session_test.cc ('k') | net/quic/quic_unacked_packet_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698