diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-22 22:34:04 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-22 22:34:04 +0000 |
commit | 63c8cb0e1d055530f8c29250c68553175f2b1287 (patch) | |
tree | adc83b98055bbb18655de703cceee1dd2233ee9e /net/spdy/spdy_http_stream.h | |
parent | a25be0da26b666f73d6c0bb6eff716b1adae23d9 (diff) | |
download | chromium_src-63c8cb0e1d055530f8c29250c68553175f2b1287.zip chromium_src-63c8cb0e1d055530f8c29250c68553175f2b1287.tar.gz chromium_src-63c8cb0e1d055530f8c29250c68553175f2b1287.tar.bz2 |
[SPDY] Remove SpdyStream::Delegate::OnSendBody()'s return value
Add comment explaining semantics of OnSendBody().
Audit SpdyStream::Delegate implementations to either
comply with those semantics or CHECK-fail.
Strengthen some related checks in SpdyHttpStream.
Fix typo in spdy_stream_spdy3_unittest.cc.
BUG=242288
R=rch@chromium.org
Review URL: https://codereview.chromium.org/15555003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201622 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_http_stream.h')
-rw-r--r-- | net/spdy/spdy_http_stream.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/net/spdy/spdy_http_stream.h b/net/spdy/spdy_http_stream.h index bfb5076..5f405d3 100644 --- a/net/spdy/spdy_http_stream.h +++ b/net/spdy/spdy_http_stream.h @@ -85,7 +85,7 @@ class NET_EXPORT_PRIVATE SpdyHttpStream : public SpdyStream::Delegate, // SpdyStream::Delegate implementation. virtual SpdySendStatus OnSendHeadersComplete() OVERRIDE; - virtual int OnSendBody() OVERRIDE; + virtual void OnSendBody() OVERRIDE; virtual SpdySendStatus OnSendBodyComplete(size_t bytes_sent) OVERRIDE; virtual int OnResponseReceived(const SpdyHeaderBlock& response, base::Time response_time, @@ -98,15 +98,21 @@ class NET_EXPORT_PRIVATE SpdyHttpStream : public SpdyStream::Delegate, private: void OnStreamCreated(const CompletionCallback& callback, int rv); - // Reads the data (whether chunked or not) from the request body stream and - // sends the data by calling WriteStreamData on the underlying SpdyStream. - int SendData(); + // Reads the data (whether chunked or not) from the request body + // stream and sends it. The read and subsequent sending may happen + // asynchronously. + void ReadAndSendRequestBodyData(); + + // Called when data has just been read from the request body stream; + // does the actual sending of data. + void OnRequestBodyReadCompleted(int status); + + // Queues some request body data to be sent. + void SendRequestBodyData(); // Call the user callback. void DoCallback(int rv); - int OnRequestBodyReadCompleted(int status); - void ScheduleBufferedReadCallback(); // Returns true if the callback is invoked. |