summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_session.h
diff options
context:
space:
mode:
authorukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-14 04:13:40 +0000
committerukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-14 04:13:40 +0000
commit65d56aaadc75327749c62400a846a9e2cb12ea73 (patch)
treeaa05833579eb90d65de4d1f232810268f512c97c /net/spdy/spdy_session.h
parent495caf3da866d8967176bf4102532dba412a1012 (diff)
downloadchromium_src-65d56aaadc75327749c62400a846a9e2cb12ea73.zip
chromium_src-65d56aaadc75327749c62400a846a9e2cb12ea73.tar.gz
chromium_src-65d56aaadc75327749c62400a846a9e2cb12ea73.tar.bz2
Refactor SpdyStream.
Split SpdyStream into two parts: base SpdyStream and SpdyHttpStream. SpdyStream is an interface to SpdySession and provides base implementation as spdy stream. SpdyHttpStream is derived class of SpdyStream and used for [Spdy|Http]NetworkTransaction. BUG=42320 TEST=none Review URL: http://codereview.chromium.org/2564001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49667 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_session.h')
-rw-r--r--net/spdy/spdy_session.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h
index f9f9e6f..4772c58 100644
--- a/net/spdy/spdy_session.h
+++ b/net/spdy/spdy_session.h
@@ -31,6 +31,7 @@
namespace net {
+class SpdyHttpStream;
class SpdyStream;
class HttpNetworkSession;
struct HttpRequestInfo;
@@ -64,7 +65,7 @@ class SpdySession : public base::RefCounted<SpdySession>,
// might also not have initiated the stream yet, but indicated it will via
// X-Associated-Content.
// Returns the new or existing stream. Never returns NULL.
- scoped_refptr<SpdyStream> GetOrCreateStream(
+ scoped_refptr<SpdyHttpStream> GetOrCreateStream(
const HttpRequestInfo& request,
const UploadDataStream* upload_data,
const BoundNetLog& stream_net_log);
@@ -106,8 +107,10 @@ class SpdySession : public base::RefCounted<SpdySession>,
};
typedef std::map<int, scoped_refptr<SpdyStream> > ActiveStreamMap;
- typedef std::list<scoped_refptr<SpdyStream> > ActiveStreamList;
- typedef std::map<std::string, scoped_refptr<SpdyStream> > PendingStreamMap;
+ // Only HTTP push a stream.
+ typedef std::list<scoped_refptr<SpdyHttpStream> > ActivePushedStreamList;
+ typedef std::map<std::string, scoped_refptr<SpdyHttpStream> >
+ PendingStreamMap;
typedef std::priority_queue<SpdyIOBuffer> OutputQueue;
virtual ~SpdySession();
@@ -170,7 +173,7 @@ class SpdySession : public base::RefCounted<SpdySession>,
// Check if we have a pending pushed-stream for this url
// Returns the stream if found (and returns it from the pending
// list), returns NULL otherwise.
- scoped_refptr<SpdyStream> GetPushStream(const std::string& url);
+ scoped_refptr<SpdyHttpStream> GetPushStream(const std::string& url);
// Creates an HttpResponseInfo instance, and calls OnResponseReceived().
// Returns true if successful.
@@ -218,7 +221,7 @@ class SpdySession : public base::RefCounted<SpdySession>,
ActiveStreamMap active_streams_;
// List of all the streams that have already started to be pushed by the
// server, but do not have consumers yet.
- ActiveStreamList pushed_streams_;
+ ActivePushedStreamList pushed_streams_;
// List of streams declared in X-Associated-Content headers, but do not have
// consumers yet.
// The key is a string representing the path of the URI being pushed.