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

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

Issue 2341483002: Deprecate FLAGS_quic_limit_frame_gaps_in_buffer. (Closed)
Patch Set: Created 4 years, 3 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/core/quic_flags_list.h ('k') | net/quic/core/quic_stream_sequencer_buffer_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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/core/quic_stream_sequencer_buffer.h" 5 #include "net/quic/core/quic_stream_sequencer_buffer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "net/quic/core/quic_bug_tracker.h" 9 #include "net/quic/core/quic_bug_tracker.h"
10 #include "net/quic/core/quic_flags.h" 10 #include "net/quic/core/quic_flags.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 "\nCurrent gaps: " + GapsDebugString(); 138 "\nCurrent gaps: " + GapsDebugString();
139 return QUIC_OVERLAPPING_STREAM_DATA; 139 return QUIC_OVERLAPPING_STREAM_DATA;
140 } 140 }
141 141
142 // Write beyond the current range this buffer is covering. 142 // Write beyond the current range this buffer is covering.
143 if (offset + size > total_bytes_read_ + max_buffer_capacity_bytes_) { 143 if (offset + size > total_bytes_read_ + max_buffer_capacity_bytes_) {
144 *error_details = "Received data beyond available range."; 144 *error_details = "Received data beyond available range.";
145 return QUIC_INTERNAL_ERROR; 145 return QUIC_INTERNAL_ERROR;
146 } 146 }
147 147
148 if (FLAGS_quic_limit_frame_gaps_in_buffer && 148 if (current_gap->begin_offset != starting_offset &&
149 current_gap->begin_offset != starting_offset &&
150 current_gap->end_offset != starting_offset + data.length() && 149 current_gap->end_offset != starting_offset + data.length() &&
151 gaps_.size() >= kMaxNumGapsAllowed) { 150 gaps_.size() >= kMaxNumGapsAllowed) {
152 // This frame is going to create one more gap which exceeds max number of 151 // This frame is going to create one more gap which exceeds max number of
153 // gaps allowed. Stop processing. 152 // gaps allowed. Stop processing.
154 *error_details = "Too many gaps created for this stream."; 153 *error_details = "Too many gaps created for this stream.";
155 return QUIC_TOO_MANY_FRAME_GAPS; 154 return QUIC_TOO_MANY_FRAME_GAPS;
156 } 155 }
157 156
158 size_t total_written = 0; 157 size_t total_written = 0;
159 size_t source_remaining = size; 158 size_t source_remaining = size;
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 QuicStreamOffset current_frame_begin_offset = it.first; 534 QuicStreamOffset current_frame_begin_offset = it.first;
536 QuicStreamOffset current_frame_end_offset = 535 QuicStreamOffset current_frame_end_offset =
537 it.second.length + current_frame_begin_offset; 536 it.second.length + current_frame_begin_offset;
538 current_frames_string += 537 current_frames_string +=
539 RangeDebugString(current_frame_begin_offset, current_frame_end_offset); 538 RangeDebugString(current_frame_begin_offset, current_frame_end_offset);
540 } 539 }
541 return current_frames_string; 540 return current_frames_string;
542 } 541 }
543 542
544 } // namespace net 543 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_flags_list.h ('k') | net/quic/core/quic_stream_sequencer_buffer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698