diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-29 07:57:40 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-29 07:57:40 +0000 |
commit | d76c6f5a121a4c1bb32d96fdee0b7bd5a19bb41b (patch) | |
tree | 77d03417c232809759dafa3bcdfe242a77e4712c /net/spdy/spdy_stream.h | |
parent | e4d61d5576db322905f5762e2b3c1ad585cb0b69 (diff) | |
download | chromium_src-d76c6f5a121a4c1bb32d96fdee0b7bd5a19bb41b.zip chromium_src-d76c6f5a121a4c1bb32d96fdee0b7bd5a19bb41b.tar.gz chromium_src-d76c6f5a121a4c1bb32d96fdee0b7bd5a19bb41b.tar.bz2 |
[SPDY] Refactor SpdyStream state machine
In particular, remove STATE_SEND_BODY,
STATE_SEND_BODY_COMPLETE, SPDY_WAITING_FOR_RESPONSE and
instead add logic to detect when we receive an out-of-place
response.
Fix tests that were using the wrong SpdyStreamType and
weren't using a delegate.
Add various TODOs.
BUG=243643
R=rch@chromium.org
Review URL: https://codereview.chromium.org/15892015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202810 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_stream.h')
-rw-r--r-- | net/spdy/spdy_stream.h | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/net/spdy/spdy_stream.h b/net/spdy/spdy_stream.h index 01f04f1..d2f3de7 100644 --- a/net/spdy/spdy_stream.h +++ b/net/spdy/spdy_stream.h @@ -278,10 +278,6 @@ class NET_EXPORT_PRIVATE SpdyStream { // OnClose() method. bool closed() const { return io_state_ == STATE_DONE; } - // TODO(satorux): This is only for testing. We should be able to remove - // this once crbug.com/113107 is addressed. - bool body_sent() const { return io_state_ > STATE_SEND_BODY_COMPLETE; } - // Interface for the delegate to use. // Only one send can be in flight at a time, except for push @@ -349,9 +345,6 @@ class NET_EXPORT_PRIVATE SpdyStream { STATE_SEND_DOMAIN_BOUND_CERT_COMPLETE, STATE_SEND_REQUEST_HEADERS, STATE_SEND_REQUEST_HEADERS_COMPLETE, - STATE_SEND_BODY, - STATE_SEND_BODY_COMPLETE, - STATE_WAITING_FOR_RESPONSE, STATE_OPEN, STATE_DONE }; @@ -368,19 +361,10 @@ class NET_EXPORT_PRIVATE SpdyStream { int DoSendDomainBoundCertComplete(int result); int DoSendRequestHeaders(); int DoSendRequestHeadersComplete(); - int DoSendBody(); - int DoSendBodyComplete(int result); int DoReadHeaders(); int DoReadHeadersComplete(int result); int DoOpen(); - // Does the bookkeeping necessary after a frame has just been - // sent. If there's more data to be sent, |state_| is set to - // |io_pending_state|, the next frame is queued up, and - // ERR_IO_PENDING is returned. Otherwise, returns OK if successful - // or an error if not. - int ProcessJustCompletedFrame(int result, State io_pending_state); - // Update the histograms. Can safely be called repeatedly, but should only // be called after the stream has completed. void UpdateHistograms(); @@ -400,7 +384,7 @@ class NET_EXPORT_PRIVATE SpdyStream { // Queues the send for next frame of the remaining data in // |pending_send_data_|. Must be called only when - // |pending_send_data_| and |pending_send_flags_| are set. + // |pending_send_data_| is set. void QueueNextDataFrame(); const SpdyStreamType type_; |