summaryrefslogtreecommitdiffstats
path: root/net/http/http_network_transaction.h
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-21 20:32:44 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-21 20:32:44 +0000
commit1f14a913d60da63f3e4eb73cf4dea134e1ec75d0 (patch)
tree8768b2a47ebe62a93056f9709acf11c61c28383a /net/http/http_network_transaction.h
parentc1173dd1715877a08f641c4f94ff709de51ada58 (diff)
downloadchromium_src-1f14a913d60da63f3e4eb73cf4dea134e1ec75d0.zip
chromium_src-1f14a913d60da63f3e4eb73cf4dea134e1ec75d0.tar.gz
chromium_src-1f14a913d60da63f3e4eb73cf4dea134e1ec75d0.tar.bz2
SPDY: Enable SPDY via NPN.
Add a new flip option: "npn". --use-flip=npn to activate. Allows for negotiation of SPDY via SSL for https urls. Checks for the existence of existing SPDY sessions and reuses them where possible. Review URL: http://codereview.chromium.org/500088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35099 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_network_transaction.h')
-rw-r--r--net/http/http_network_transaction.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h
index 10c8955..8a6d460 100644
--- a/net/http/http_network_transaction.h
+++ b/net/http/http_network_transaction.h
@@ -22,13 +22,14 @@
#include "net/http/http_response_info.h"
#include "net/http/http_transaction.h"
#include "net/proxy/proxy_service.h"
-#include "net/socket/client_socket_handle.h"
#include "net/socket/client_socket_pool.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
namespace net {
class ClientSocketFactory;
+class ClientSocketHandle;
+class FlipStream;
class HttpNetworkSession;
class HttpStream;
@@ -38,6 +39,9 @@ class HttpNetworkTransaction : public HttpTransaction {
virtual ~HttpNetworkTransaction();
+ // Sets the next protocol negotiation value used during the SSL handshake.
+ static void SetNextProtos(const std::string& next_protos);
+
// HttpTransaction methods:
virtual int Start(const HttpRequestInfo* request_info,
CompletionCallback* callback,
@@ -78,6 +82,12 @@ class HttpNetworkTransaction : public HttpTransaction {
STATE_READ_BODY_COMPLETE,
STATE_DRAIN_BODY_FOR_AUTH_RESTART,
STATE_DRAIN_BODY_FOR_AUTH_RESTART_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
};
@@ -114,6 +124,12 @@ class HttpNetworkTransaction : public HttpTransaction {
int DoReadBodyComplete(int result);
int DoDrainBodyForAuthRestart();
int DoDrainBodyForAuthRestartComplete(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 LogTCPConnectedMetrics(const ClientSocketHandle& handle);
@@ -239,6 +255,8 @@ class HttpNetworkTransaction : public HttpTransaction {
// used in log messages.
static std::string AuthTargetString(HttpAuth::Target target);
+ static std::string* g_next_protos;
+
// The following three auth members are arrays of size two -- index 0 is
// for the proxy server, and index 1 is for the origin server.
// Use the enum HttpAuth::Target to index into them.
@@ -270,8 +288,9 @@ class HttpNetworkTransaction : public HttpTransaction {
ProxyService::PacRequest* pac_request_;
ProxyInfo proxy_info_;
- ClientSocketHandle connection_;
+ scoped_ptr<ClientSocketHandle> connection_;
scoped_ptr<HttpStream> http_stream_;
+ scoped_refptr<FlipStream> spdy_stream_;
bool reused_socket_;
// True if we've validated the headers that the stream parser has returned.