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

Unified Diff: net/spdy/spdy_stream.h

Issue 10815074: Instead of enqueueing SPDY frames, enqueue SPDY streams that are ready to produce data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove logging and cleanup 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 | « net/spdy/spdy_session_spdy3_unittest.cc ('k') | net/spdy/spdy_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_stream.h
diff --git a/net/spdy/spdy_stream.h b/net/spdy/spdy_stream.h
index 40e436a71d0821cff1b2763bbc5657f46dddd10c..8653d9fde6fecfdd8b80bffe6ed0878a90b2c600 100644
--- a/net/spdy/spdy_stream.h
+++ b/net/spdy/spdy_stream.h
@@ -5,6 +5,7 @@
#ifndef NET_SPDY_SPDY_STREAM_H_
#define NET_SPDY_SPDY_STREAM_H_
+#include <list>
#include <string>
#include <vector>
@@ -22,12 +23,12 @@
#include "net/socket/ssl_client_socket.h"
#include "net/spdy/spdy_framer.h"
#include "net/spdy/spdy_protocol.h"
+#include "net/spdy/spdy_session.h"
namespace net {
class AddressList;
class IPEndPoint;
-class SpdySession;
class SSLCertRequestInfo;
class SSLInfo;
@@ -89,7 +90,6 @@ class NET_EXPORT_PRIVATE SpdyStream
// SpdyStream constructor
SpdyStream(SpdySession* session,
- SpdyStreamId stream_id,
bool pushed,
const BoundNetLog& net_log);
@@ -251,6 +251,8 @@ class NET_EXPORT_PRIVATE SpdyStream
int GetProtocolVersion() const;
private:
+ class SpdyStreamIOBufferProducer;
+
enum State {
STATE_NONE,
STATE_GET_DOMAIN_BOUND_CERT,
@@ -300,6 +302,14 @@ class NET_EXPORT_PRIVATE SpdyStream
// the MessageLoop to replay all the data that the server has already sent.
void PushedStreamReplayData();
+ // Informs the SpdySession that this stream has a write available.
+ void SetHasWriteAvailable();
+
+ // Returns a newly created SPDY frame owned by the called that contains
+ // the next frame to be sent by this frame. May return NULL if this
+ // stream has become stalled on flow control.
+ SpdyFrame* ProduceNextFrame();
+
// There is a small period of time between when a server pushed stream is
// first created, and the pushed data is replayed. Any data received during
// this time should continue to be buffered.
@@ -335,6 +345,8 @@ class NET_EXPORT_PRIVATE SpdyStream
scoped_ptr<SpdyHeaderBlock> response_;
base::Time response_time_;
+ std::list<SpdyFrame*> pending_data_frames_;
+
State io_state_;
// Since we buffer the response, we also buffer the response status.
« no previous file with comments | « net/spdy/spdy_session_spdy3_unittest.cc ('k') | net/spdy/spdy_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698