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

Unified Diff: net/quic/quic_stream_sequencer.cc

Issue 1433793002: Change bufferring data structure for QuicStreamSequencer. Protected by FLAGS_quic_use_stream_sequen… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@106946658
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_protocol.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 12fe8c77d69ecabcc71d55670a6c94da3f6bb69a..b3f17ddb4a3791179d964c4f91715b8ec5e62628 100644
--- a/net/quic/quic_stream_sequencer.cc
+++ b/net/quic/quic_stream_sequencer.cc
@@ -12,7 +12,9 @@
#include "net/quic/quic_clock.h"
#include "net/quic/quic_flags.h"
#include "net/quic/quic_frame_list.h"
+#include "net/quic/quic_protocol.h"
#include "net/quic/reliable_quic_stream.h"
+#include "net/quic/stream_sequencer_buffer.h"
using std::min;
using std::numeric_limits;
@@ -23,14 +25,21 @@ namespace net {
QuicStreamSequencer::QuicStreamSequencer(ReliableQuicStream* quic_stream,
const QuicClock* clock)
: stream_(quic_stream),
- buffered_frames_(new QuicFrameList()),
close_offset_(numeric_limits<QuicStreamOffset>::max()),
blocked_(false),
num_frames_received_(0),
num_duplicate_frames_received_(0),
num_early_frames_received_(0),
clock_(clock),
- ignore_read_data_(false) {}
+ ignore_read_data_(false) {
+ if (FLAGS_quic_use_stream_sequencer_buffer) {
+ DVLOG(1) << "Use StreamSequencerBuffer for stream: " << stream_->id();
+ buffered_frames_.reset(
+ new StreamSequencerBuffer(kStreamReceiveWindowLimit));
+ } else {
+ buffered_frames_.reset(new QuicFrameList());
+ }
+}
QuicStreamSequencer::~QuicStreamSequencer() {}
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_stream_sequencer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698