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

Unified Diff: net/spdy/spdy_http_stream.h

Issue 15936003: [SPDY] Refactor SpdyStream::Delegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 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
« no previous file with comments | « no previous file | net/spdy/spdy_http_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_http_stream.h
diff --git a/net/spdy/spdy_http_stream.h b/net/spdy/spdy_http_stream.h
index 7562510d41583bc380deea5dd47d7ed8fea8e20c..34483d06117752049d94a33192b5c10e875681cd 100644
--- a/net/spdy/spdy_http_stream.h
+++ b/net/spdy/spdy_http_stream.h
@@ -85,31 +85,29 @@ class NET_EXPORT_PRIVATE SpdyHttpStream : public SpdyStream::Delegate,
virtual void Drain(HttpNetworkSession* session) OVERRIDE;
// SpdyStream::Delegate implementation.
- virtual void OnSendRequestHeadersComplete() OVERRIDE;
- virtual void OnSendBody() OVERRIDE;
- virtual void OnSendBodyComplete() OVERRIDE;
- virtual int OnResponseReceived(const SpdyHeaderBlock& response,
- base::Time response_time,
- int status) OVERRIDE;
+ virtual void OnRequestHeadersSent() OVERRIDE;
+ virtual int OnResponseHeadersReceived(const SpdyHeaderBlock& response,
+ base::Time response_time,
+ int status) OVERRIDE;
virtual int OnDataReceived(scoped_ptr<SpdyBuffer> buffer) OVERRIDE;
virtual void OnDataSent() OVERRIDE;
virtual void OnClose(int status) OVERRIDE;
private:
+ bool HasUploadData() const;
+
void OnStreamCreated(const CompletionCallback& callback, int rv);
- // Reads the data (whether chunked or not) from the request body
- // stream and sends it. The read and subsequent sending may happen
- // asynchronously.
+ // Reads the remaining data (whether chunked or not) from the
+ // request body stream and sends it if there's any. The read and
+ // subsequent sending may happen asynchronously. Must be called only
+ // when HasUploadData() is true.
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);
@@ -134,8 +132,6 @@ class NET_EXPORT_PRIVATE SpdyHttpStream : public SpdyStream::Delegate,
// The request to send.
const HttpRequestInfo* request_info_;
- bool has_upload_data_;
-
// |response_info_| is the HTTP response data object which is filled in
// when a SYN_REPLY comes in for the stream.
// It is not owned by this stream object, or point to |push_response_info_|.
@@ -155,8 +151,8 @@ class NET_EXPORT_PRIVATE SpdyHttpStream : public SpdyStream::Delegate,
int user_buffer_len_;
// Temporary buffer used to read the request body from UploadDataStream.
- scoped_refptr<IOBufferWithSize> raw_request_body_buf_;
- int raw_request_body_buf_size_;
+ scoped_refptr<IOBufferWithSize> request_body_buf_;
+ int request_body_buf_size_;
// Is there a scheduled read callback pending.
bool buffered_read_callback_pending_;
« no previous file with comments | « no previous file | net/spdy/spdy_http_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698