diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-15 19:08:21 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-15 19:08:21 +0000 |
commit | 05ea9ff3cfb2b479b8897b512a71dea2ee86480d (patch) | |
tree | 1468ccd18b716c7f86d53f430556bc1755cf6138 /net/socket/client_socket_handle.h | |
parent | c5aa5321a9bbc18daef554c8fe60030d193d1360 (diff) | |
download | chromium_src-05ea9ff3cfb2b479b8897b512a71dea2ee86480d.zip chromium_src-05ea9ff3cfb2b479b8897b512a71dea2ee86480d.tar.gz chromium_src-05ea9ff3cfb2b479b8897b512a71dea2ee86480d.tar.bz2 |
Refactor how ClientSocketPoolBaseHelper avoids re-entrancy.
Specifically, we defer asynchronous user callbacks to tasks.
BUG=48861
Review URL: http://codereview.chromium.org/2994003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52509 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/client_socket_handle.h')
-rw-r--r-- | net/socket/client_socket_handle.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/socket/client_socket_handle.h b/net/socket/client_socket_handle.h index b0cb574..b8e6cc3 100644 --- a/net/socket/client_socket_handle.h +++ b/net/socket/client_socket_handle.h @@ -91,7 +91,7 @@ class ClientSocketHandle { LoadState GetLoadState() const; // Returns true when Init() has completed successfully. - bool is_initialized() const { return socket_ != NULL; } + bool is_initialized() const { return is_initialized_; } // Returns the time tick when Init() was called. base::TimeTicks init_time() const { return init_time_; } @@ -114,6 +114,7 @@ class ClientSocketHandle { // These may only be used if is_initialized() is true. const std::string& group_name() const { return group_name_; } + int id() const { return pool_id_; } ClientSocket* socket() { return socket_.get(); } ClientSocket* release_socket() { return socket_.release(); } const HttpResponseInfo& tunnel_auth_response_info() const { @@ -165,6 +166,7 @@ class ClientSocketHandle { // Resets the supplemental error state. void ResetErrorState(); + bool is_initialized_; scoped_refptr<ClientSocketPool> pool_; scoped_ptr<ClientSocket> socket_; std::string group_name_; |