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

Unified Diff: net/spdy/spdy_http_stream.h

Issue 10689034: SPDY - chunked upload - speech recognition doesn't work with SPDY/3 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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') | net/spdy/spdy_http_stream.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_http_stream.h
===================================================================
--- net/spdy/spdy_http_stream.h (revision 144839)
+++ net/spdy/spdy_http_stream.h (working copy)
@@ -14,6 +14,7 @@
#include "base/memory/weak_ptr.h"
#include "net/base/completion_callback.h"
#include "net/base/net_log.h"
+#include "net/base/upload_data.h"
#include "net/http/http_request_info.h"
#include "net/http/http_stream.h"
#include "net/spdy/spdy_protocol.h"
@@ -31,7 +32,8 @@
// The SpdyHttpStream is a HTTP-specific type of stream known to a SpdySession.
class NET_EXPORT_PRIVATE SpdyHttpStream : public SpdyStream::Delegate,
- public HttpStream {
+ public HttpStream,
+ public ChunkCallback {
public:
SpdyHttpStream(SpdySession* spdy_session, bool direct);
virtual ~SpdyHttpStream();
@@ -83,8 +85,10 @@
virtual void OnDataReceived(const char* buffer, int bytes) OVERRIDE;
virtual void OnDataSent(int length) OVERRIDE;
virtual void OnClose(int status) OVERRIDE;
- virtual void set_chunk_callback(ChunkCallback* callback) OVERRIDE;
+ // ChunkCallback methods.
Ryan Sleevi 2012/07/05 06:52:06 nit: ChunkCallback implementation. Matches lines
ramant (doing other things) 2012/07/06 22:55:42 Done.
+ virtual void OnChunkAvailable() OVERRIDE;
+
private:
FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionSpdy2Test,
FlowControlStallResume);
@@ -95,6 +99,12 @@
FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionSpdy3Test,
FlowControlNegativeSendWindowSize);
+ // Reads the data from the request body stream and sends the data by calling
+ // SpdyStream::WriteStreamData. In the case of chunked uploads, if data is not
+ // available, returns ERR_IO_PENDING, and the write will be completed at a
+ // later time.
+ int SendData();
+
// Call the user callback.
void DoCallback(int rv);
@@ -147,6 +157,9 @@
// Is this spdy stream direct to the origin server (or to a proxy).
bool direct_;
+ // Set to True if the connection is stalled waiting for a upload data chunk.
Ryan Sleevi 2012/07/05 06:52:06 nit: True -> true, and it seems like "set to" shou
ramant (doing other things) 2012/07/06 22:55:42 Done.
+ bool waiting_for_chunk_;
+
bool send_last_chunk_;
DISALLOW_COPY_AND_ASSIGN(SpdyHttpStream);
« no previous file with comments | « no previous file | net/spdy/spdy_http_stream.cc » ('j') | net/spdy/spdy_http_stream.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698