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

Unified Diff: net/spdy/spdy_stream.h

Issue 10828129: SPDY: WriteHeaders should not invoke OnDataSent callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 4 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/spdy/spdy_session_spdy3_unittest.cc ('k') | net/spdy/spdy_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_stream.h
diff --git a/net/spdy/spdy_stream.h b/net/spdy/spdy_stream.h
index f72f147166b7957307d7238f99187c5586eb6d96..e368bab8d941b0b411f8c833af757ad8f44a8b1f 100644
--- a/net/spdy/spdy_stream.h
+++ b/net/spdy/spdy_stream.h
@@ -71,6 +71,9 @@ class NET_EXPORT_PRIVATE SpdyStream
base::Time response_time,
int status) = 0;
+ // Called when a HEADERS frame is sent.
+ virtual void OnHeadersSent() = 0;
+
// Called when data is received.
// Returns network error code. OK when it successfully receives data.
virtual int OnDataReceived(const char* data, int length) = 0;
@@ -90,14 +93,14 @@ class NET_EXPORT_PRIVATE SpdyStream
};
// Indicates pending frame type.
- enum PendingFrameType {
- TYPE_HEADER,
+ enum FrameType {
+ TYPE_HEADERS,
TYPE_DATA
};
// Structure to contains pending frame information.
typedef struct {
- PendingFrameType type;
+ FrameType type;
union {
SpdyHeaderBlock* header_block;
SpdyDataFrame* data_frame;
@@ -365,8 +368,15 @@ class NET_EXPORT_PRIVATE SpdyStream
scoped_ptr<SpdyHeaderBlock> response_;
base::Time response_time_;
+ // An in order list of pending frame data that are going to be sent. HEADERS
+ // frames are queued as SpdyHeaderBlock structures because these must be
+ // compressed just before sending. Data frames are queued as SpdyDataFrame.
std::list<PendingFrame> pending_frames_;
+ // An in order list of sending frame types. It will be used to know which type
+ // of frame is sent and which callback should be invoked in OnOpen().
+ std::list<FrameType> waiting_completions_;
+
State io_state_;
// Since we buffer the response, we also buffer the response status.
« no previous file with comments | « net/spdy/spdy_session_spdy3_unittest.cc ('k') | net/spdy/spdy_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698