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

Unified Diff: net/quic/quic_stream_sequencer.cc

Issue 1906473004: Deprecate FLAGS_quic_consolidate_onstreamframe_errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@119645068
Patch Set: Rebase Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_flags.cc ('k') | net/quic/quic_stream_sequencer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_stream_sequencer.cc
diff --git a/net/quic/quic_stream_sequencer.cc b/net/quic/quic_stream_sequencer.cc
index b63618d1ffa815c639e56ce6f6c78304f8355d3e..e5e661abb7dcdb83a07134ed49bbdb59523f9e86 100644
--- a/net/quic/quic_stream_sequencer.cc
+++ b/net/quic/quic_stream_sequencer.cc
@@ -42,15 +42,6 @@ void QuicStreamSequencer::OnStreamFrame(const QuicStreamFrame& frame) {
++num_frames_received_;
const QuicStreamOffset byte_offset = frame.offset;
const size_t data_len = frame.frame_length;
- bool consolidate_errors = FLAGS_quic_consolidate_onstreamframe_errors;
- if (!consolidate_errors && data_len == 0 && !frame.fin) {
- // Stream frames must have data or a fin flag.
- LOG(WARNING) << "QUIC_INVALID_STREAM_FRAM: Empty stream frame "
- "without FIN set.";
- stream_->CloseConnectionWithDetails(QUIC_EMPTY_STREAM_FRAME_NO_FIN,
- "Empty stream frame without FIN set.");
- return;
- }
if (frame.fin) {
CloseStreamAtOffset(frame.offset + data_len);
@@ -63,24 +54,14 @@ void QuicStreamSequencer::OnStreamFrame(const QuicStreamFrame& frame) {
QuicErrorCode result = buffered_frames_.OnStreamData(
byte_offset, StringPiece(frame.frame_buffer, frame.frame_length),
clock_->ApproximateNow(), &bytes_written, &error_details);
- if (!consolidate_errors) {
- if (result == QUIC_OVERLAPPING_STREAM_DATA) {
- LOG(WARNING) << "QUIC_INVALID_STREAM_FRAME: Stream frame "
- "overlaps with buffered data.";
- stream_->CloseConnectionWithDetails(
- QUIC_EMPTY_STREAM_FRAME_NO_FIN,
- "Stream frame overlaps with buffered data.");
- return;
- }
- } else {
- if (result != QUIC_NO_ERROR) {
- LOG(WARNING) << QuicUtils::ErrorToString(result) << ": " << error_details;
- stream_->CloseConnectionWithDetails(result, error_details);
- return;
- }
+ if (result != QUIC_NO_ERROR) {
+ DLOG(WARNING) << QuicUtils::ErrorToString(result);
+ DLOG(WARNING) << error_details;
+ stream_->CloseConnectionWithDetails(result, error_details);
+ return;
}
- if ((consolidate_errors || result == QUIC_NO_ERROR) && bytes_written == 0) {
+ if (bytes_written == 0) {
++num_duplicate_frames_received_;
// Silently ignore duplicates.
return;
« no previous file with comments | « net/quic/quic_flags.cc ('k') | net/quic/quic_stream_sequencer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698