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

Unified Diff: net/quic/quic_stream_sequencer.h

Issue 1400293002: relnote: refactoring the buffering logic in QUIC's stream sequencer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: disentangle merge of 104894802 Created 5 years, 2 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_frame_list.cc ('k') | net/quic/quic_stream_sequencer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_stream_sequencer.h
diff --git a/net/quic/quic_stream_sequencer.h b/net/quic/quic_stream_sequencer.h
index 60a950b3bcd94459346c8f9ca2f2ae2ec8ea6bbf..a1bdd327c644b9f07450b6b034a73eb4abb3782b 100644
--- a/net/quic/quic_stream_sequencer.h
+++ b/net/quic/quic_stream_sequencer.h
@@ -9,7 +9,7 @@
#include <string>
#include "base/basictypes.h"
-#include "net/base/iovec.h"
+#include "net/quic/quic_frame_list.h"
#include "net/quic/quic_protocol.h"
namespace net {
@@ -25,19 +25,6 @@ class ReliableQuicStream;
// up to the next layer.
class NET_EXPORT_PRIVATE QuicStreamSequencer {
public:
- // A contiguous segment received by a QUIC stream.
- struct FrameData {
- FrameData(QuicStreamOffset offset, const std::string& segment);
-
- const QuicStreamOffset offset;
- std::string segment;
- };
-
- // TODO(alyssar) use something better than strings.
- // Maybe write new frames into a ring buffer, and keep track of consumed
- // bytes, and gaps.
- typedef std::list<FrameData> FrameList;
-
explicit QuicStreamSequencer(ReliableQuicStream* quic_stream);
virtual ~QuicStreamSequencer();
@@ -93,20 +80,6 @@ class NET_EXPORT_PRIVATE QuicStreamSequencer {
private:
friend class test::QuicStreamSequencerPeer;
- // Finds the place the frame should be inserted. If an identical frame is
- // present, stops on the identical frame.
- FrameList::iterator FindInsertionPoint(const QuicStreamFrame& frame);
-
- // Returns true if |frame| contains data which overlaps buffered data
- // (indicating an invalid stream frame has been received).
- bool FrameOverlapsBufferedData(
- const QuicStreamFrame& frame,
- FrameList::const_iterator insertion_point) const;
-
- // Returns true if the sequencer has received this frame before.
- bool IsDuplicate(const QuicStreamFrame& frame,
- FrameList::const_iterator insertion_point) const;
-
// Wait until we've seen 'offset' bytes, and then terminate the stream.
void CloseStreamAtOffset(QuicStreamOffset offset);
@@ -125,7 +98,7 @@ class NET_EXPORT_PRIVATE QuicStreamSequencer {
QuicStreamOffset num_bytes_consumed_;
// Stores buffered frames in offset order.
- FrameList buffered_frames_;
+ QuicFrameList buffered_frames_;
// The offset, if any, we got a stream termination for. When this many bytes
// have been processed, the sequencer will be closed.
« no previous file with comments | « net/quic/quic_frame_list.cc ('k') | net/quic/quic_stream_sequencer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698