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-05-18 06:43:04 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-18 06:43:04 +0000
commit9879138312e4ed9f07dc53dca327569667069e73 (patch)
tree77d4afb5cdf157253895f5d290d177593f67edf4 /net/http/http_network_transaction.h
parentd5ef0219e7ba30b90952aeef5790bc245553d0fb (diff)
downloadchromium_src-9879138312e4ed9f07dc53dca327569667069e73.zip
chromium_src-9879138312e4ed9f07dc53dca327569667069e73.tar.gz
chromium_src-9879138312e4ed9f07dc53dca327569667069e73.tar.bz2
Revert "Revert "Revert "Add connected socket function to ClientSocketPool and ClientSocketHandle."""
Revert "Fix a memory leak in client_socket_pool_unittest.cc." Guess I still fail. kasperl pointed out that this managed to break layout tests and some reliability tests too. Review URL: http://codereview.chromium.org/113517 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16269 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_network_transaction.h')
-rw-r--r--net/http/http_network_transaction.h51
1 files changed, 27 insertions, 24 deletions
diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h
index e20239e..291091a 100644
--- a/net/http/http_network_transaction.h
+++ b/net/http/http_network_transaction.h
@@ -12,10 +12,7 @@
#include "base/time.h"
#include "net/base/address_list.h"
#include "net/base/client_socket_handle.h"
-#include "net/base/client_socket_pool.h"
#include "net/base/host_resolver.h"
-#include "net/base/load_flags.h"
-#include "net/base/load_states.h"
#include "net/base/ssl_config_service.h"
#include "net/http/http_auth.h"
#include "net/http/http_auth_handler.h"
@@ -90,26 +87,6 @@ class HttpNetworkTransaction : public HttpTransaction {
scoped_ptr_malloc<char> headers_;
};
- enum State {
- STATE_RESOLVE_PROXY,
- STATE_RESOLVE_PROXY_COMPLETE,
- STATE_INIT_CONNECTION,
- STATE_INIT_CONNECTION_COMPLETE,
- STATE_SSL_CONNECT,
- STATE_SSL_CONNECT_COMPLETE,
- STATE_WRITE_HEADERS,
- STATE_WRITE_HEADERS_COMPLETE,
- STATE_WRITE_BODY,
- STATE_WRITE_BODY_COMPLETE,
- STATE_READ_HEADERS,
- STATE_READ_HEADERS_COMPLETE,
- STATE_READ_BODY,
- STATE_READ_BODY_COMPLETE,
- STATE_DRAIN_BODY_FOR_AUTH_RESTART,
- STATE_DRAIN_BODY_FOR_AUTH_RESTART_COMPLETE,
- STATE_NONE
- };
-
void DoCallback(int result);
void OnIOComplete(int result);
@@ -124,6 +101,10 @@ class HttpNetworkTransaction : public HttpTransaction {
int DoResolveProxyComplete(int result);
int DoInitConnection();
int DoInitConnectionComplete(int result);
+ int DoResolveHost();
+ int DoResolveHostComplete(int result);
+ int DoTCPConnect();
+ int DoTCPConnectComplete(int result);
int DoSSLConnect();
int DoSSLConnectComplete(int result);
int DoWriteHeaders();
@@ -381,7 +362,29 @@ class HttpNetworkTransaction : public HttpTransaction {
// The time the host resolution started (if it indeed got started).
base::Time host_resolution_start_time_;
- // The next state in the state machine.
+ enum State {
+ STATE_RESOLVE_PROXY,
+ STATE_RESOLVE_PROXY_COMPLETE,
+ STATE_INIT_CONNECTION,
+ STATE_INIT_CONNECTION_COMPLETE,
+ STATE_RESOLVE_HOST,
+ STATE_RESOLVE_HOST_COMPLETE,
+ STATE_TCP_CONNECT,
+ STATE_TCP_CONNECT_COMPLETE,
+ STATE_SSL_CONNECT,
+ STATE_SSL_CONNECT_COMPLETE,
+ STATE_WRITE_HEADERS,
+ STATE_WRITE_HEADERS_COMPLETE,
+ STATE_WRITE_BODY,
+ STATE_WRITE_BODY_COMPLETE,
+ STATE_READ_HEADERS,
+ STATE_READ_HEADERS_COMPLETE,
+ STATE_READ_BODY,
+ STATE_READ_BODY_COMPLETE,
+ STATE_DRAIN_BODY_FOR_AUTH_RESTART,
+ STATE_DRAIN_BODY_FOR_AUTH_RESTART_COMPLETE,
+ STATE_NONE
+ };
State next_state_;
};