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

Unified Diff: net/spdy/spdy_stream.h

Issue 304353012: Introduce STATE_RESERVED_REMOTE. No behavioral changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix SpdyNetworkTransactionTest.ServerPushWithTwoHeaderFrames Created 6 years, 7 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
Index: net/spdy/spdy_stream.h
diff --git a/net/spdy/spdy_stream.h b/net/spdy/spdy_stream.h
index e107143f9c83f0cfd9fa2f1f0b7e47aea84ad281..69c416754d2c2ca880aba06a08529df4e0e90264 100644
--- a/net/spdy/spdy_stream.h
+++ b/net/spdy/spdy_stream.h
@@ -286,9 +286,8 @@ class NET_EXPORT_PRIVATE SpdyStream {
// Called at most once by the SpdySession when the initial response
// headers have been received for this stream, i.e., a SYN_REPLY (or
- // SYN_STREAM for push streams) frame has been received. This is the
- // entry point for a push stream. Returns a status code; if it is
- // an error, the stream was closed by this function.
+ // SYN_STREAM for push streams) frame has been received. Returns a status
+ // code; if it is an error, the stream was closed by this function.
int OnInitialResponseHeadersReceived(const SpdyHeaderBlock& response_headers,
base::Time response_time,
base::TimeTicks recv_first_byte_time);
@@ -300,6 +299,12 @@ class NET_EXPORT_PRIVATE SpdyStream {
int OnAdditionalResponseHeadersReceived(
const SpdyHeaderBlock& additional_response_headers);
+ // Called by the SpdySession when PUSH_PROMISE is received. This is the
Johnny 2014/06/05 02:56:04 I'm worried about the use of exact frame names in
baranovich 2014/06/05 19:16:58 Done.
+ // entry point for a push stream.. Stream transits to STATE_RESERVED_REMOTE
+ // state. Returns a status code; if it is an error, the stream was closed by
+ // this function.
+ int OnPushPromiseHeadersReceived(const SpdyHeaderBlock& headers);
+
// Called by the SpdySession when response data has been received
// for this stream. This callback may be called multiple times as
// data arrives from the network, and will never be called prior to
@@ -440,14 +445,13 @@ class NET_EXPORT_PRIVATE SpdyStream {
// are modeled, with the exceptions of RESERVED_LOCAL (the client
// cannot initate push streams), and the transition to OPEN due to
// a remote SYN_STREAM (the client can only initate streams).
- // TODO(jgraettinger): RESERVED_REMOTE must be added to the state
- // machine when PUSH_PROMISE is implemented.
enum State {
STATE_IDLE,
STATE_OPEN,
STATE_HALF_CLOSED_LOCAL_UNCLAIMED,
STATE_HALF_CLOSED_LOCAL,
STATE_HALF_CLOSED_REMOTE,
+ STATE_RESERVED_REMOTE,
STATE_CLOSED,
};

Powered by Google App Engine
This is Rietveld 408576698