summaryrefslogtreecommitdiffstats
path: root/net/http/http_network_transaction.h
diff options
context:
space:
mode:
authorrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-04 15:47:20 +0000
committerrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-04 15:47:20 +0000
commit973ce28247510567d996b91ad5aa3f1da590fbcc (patch)
tree2e94ef64fc7ccf123dfec50fd5be7ab6a7ffc1c6 /net/http/http_network_transaction.h
parent40920dbef88b0764ee318df920a69db5234e4ec5 (diff)
downloadchromium_src-973ce28247510567d996b91ad5aa3f1da590fbcc.zip
chromium_src-973ce28247510567d996b91ad5aa3f1da590fbcc.tar.gz
chromium_src-973ce28247510567d996b91ad5aa3f1da590fbcc.tar.bz2
Refactor HttpNetworkTransaction to eliminate the SPDY
specific states of the state machine. This required adding two new states: STATE_INIT_STREAM STATE_INTI_STREAM_COMPLETE The http_stream_ and spdy_http_stream_ member fields have been removed, and replaced by a single stream_ member field which is initialized with either an HttpBasicStream, or SpdyHttpStream depending on the underlying connection. In the process, the NetLog no longer receives TYPE_SPDY events, only TYPE_HTTP, so spdy_network_transaction_unittest.cc needed to be modified accordingly. BUG=50267 TEST=none Review URL: http://codereview.chromium.org/3064033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54906 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_network_transaction.h')
-rw-r--r--net/http/http_network_transaction.h26
1 files changed, 7 insertions, 19 deletions
diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h
index b3a083c..46b9c8cec 100644
--- a/net/http/http_network_transaction.h
+++ b/net/http/http_network_transaction.h
@@ -36,7 +36,7 @@ class ClientSocketHandle;
class HttpNetworkSession;
class HttpRequestHeaders;
class HttpStream;
-class SpdyHttpStream;
+class SpdySession;
class HttpNetworkTransaction : public HttpTransaction {
public:
@@ -91,6 +91,8 @@ class HttpNetworkTransaction : public HttpTransaction {
STATE_RESOLVE_PROXY_COMPLETE,
STATE_INIT_CONNECTION,
STATE_INIT_CONNECTION_COMPLETE,
+ STATE_INIT_STREAM,
+ STATE_INIT_STREAM_COMPLETE,
STATE_RESTART_TUNNEL_AUTH,
STATE_RESTART_TUNNEL_AUTH_COMPLETE,
STATE_GENERATE_PROXY_AUTH_TOKEN,
@@ -105,14 +107,6 @@ class HttpNetworkTransaction : public HttpTransaction {
STATE_READ_BODY_COMPLETE,
STATE_DRAIN_BODY_FOR_AUTH_RESTART,
STATE_DRAIN_BODY_FOR_AUTH_RESTART_COMPLETE,
- STATE_SPDY_GET_STREAM,
- STATE_SPDY_GET_STREAM_COMPLETE,
- STATE_SPDY_SEND_REQUEST,
- STATE_SPDY_SEND_REQUEST_COMPLETE,
- STATE_SPDY_READ_HEADERS,
- STATE_SPDY_READ_HEADERS_COMPLETE,
- STATE_SPDY_READ_BODY,
- STATE_SPDY_READ_BODY_COMPLETE,
STATE_NONE
};
@@ -136,6 +130,8 @@ class HttpNetworkTransaction : public HttpTransaction {
int DoResolveProxyComplete(int result);
int DoInitConnection();
int DoInitConnectionComplete(int result);
+ int DoInitStream();
+ int DoInitStreamComplete(int result);
int DoRestartTunnelAuth();
int DoRestartTunnelAuthComplete(int result);
int DoGenerateProxyAuthToken();
@@ -150,14 +146,6 @@ class HttpNetworkTransaction : public HttpTransaction {
int DoReadBodyComplete(int result);
int DoDrainBodyForAuthRestart();
int DoDrainBodyForAuthRestartComplete(int result);
- int DoSpdyGetStream();
- int DoSpdyGetStreamComplete(int result);
- int DoSpdySendRequest();
- int DoSpdySendRequestComplete(int result);
- int DoSpdyReadHeaders();
- int DoSpdyReadHeadersComplete(int result);
- int DoSpdyReadBody();
- int DoSpdyReadBodyComplete(int result);
// Record histograms of latency until Connect() completes.
static void LogHttpConnectedMetrics(const ClientSocketHandle& handle);
@@ -277,8 +265,8 @@ class HttpNetworkTransaction : public HttpTransaction {
ProxyInfo proxy_info_;
scoped_ptr<ClientSocketHandle> connection_;
- scoped_ptr<HttpStream> http_stream_;
- scoped_ptr<SpdyHttpStream> spdy_http_stream_;
+ scoped_ptr<HttpStream> stream_;
+ scoped_refptr<SpdySession> spdy_session_;
bool reused_socket_;
// True if we've validated the headers that the stream parser has returned.