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

Unified Diff: net/quic/quic_stream_sequencer.cc

Issue 420393004: Change ReliableQuicStream::OnStreamFrame to return void since the method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@visitor_for_tracegraf_71863508
Patch Set: Created 6 years, 5 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_stream_sequencer.h ('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 3a303957c2c694fb6202243706b672963069c34f..5df81e5dfc02cb89afa9939c40b5b6fdc4b0e981 100644
--- a/net/quic/quic_stream_sequencer.cc
+++ b/net/quic/quic_stream_sequencer.cc
@@ -30,18 +30,18 @@ QuicStreamSequencer::QuicStreamSequencer(ReliableQuicStream* quic_stream)
QuicStreamSequencer::~QuicStreamSequencer() {
}
-bool QuicStreamSequencer::OnStreamFrame(const QuicStreamFrame& frame) {
+void QuicStreamSequencer::OnStreamFrame(const QuicStreamFrame& frame) {
++num_frames_received_;
if (IsDuplicate(frame)) {
++num_duplicate_frames_received_;
// Silently ignore duplicates.
- return true;
+ return;
}
if (FrameOverlapsBufferedData(frame)) {
stream_->CloseConnectionWithDetails(
QUIC_INVALID_STREAM_FRAME, "Stream frame overlaps with buffered data.");
- return false;
+ return;
}
QuicStreamOffset byte_offset = frame.offset;
@@ -50,13 +50,13 @@ bool QuicStreamSequencer::OnStreamFrame(const QuicStreamFrame& frame) {
// Stream frames must have data or a fin flag.
stream_->CloseConnectionWithDetails(QUIC_INVALID_STREAM_FRAME,
"Empty stream frame without FIN set.");
- return false;
+ return;
}
if (frame.fin) {
CloseStreamAtOffset(frame.offset + data_len);
if (data_len == 0) {
- return true;
+ return;
}
}
@@ -77,14 +77,14 @@ bool QuicStreamSequencer::OnStreamFrame(const QuicStreamFrame& frame) {
stream_->AddBytesConsumed(bytes_consumed);
if (MaybeCloseStream()) {
- return true;
+ return;
}
if (bytes_consumed > data_len) {
stream_->Reset(QUIC_ERROR_PROCESSING_STREAM);
- return false;
+ return;
} else if (bytes_consumed == data_len) {
FlushBufferedFrames();
- return true; // it's safe to ack this frame.
+ return; // it's safe to ack this frame.
} else {
// Set ourselves up to buffer what's left.
data_len -= bytes_consumed;
@@ -102,7 +102,7 @@ bool QuicStreamSequencer::OnStreamFrame(const QuicStreamFrame& frame) {
byte_offset += iov.iov_len;
num_bytes_buffered_ += iov.iov_len;
}
- return true;
+ return;
}
void QuicStreamSequencer::CloseStreamAtOffset(QuicStreamOffset offset) {
« no previous file with comments | « net/quic/quic_stream_sequencer.h ('k') | net/quic/quic_stream_sequencer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698