summaryrefslogtreecommitdiffstats
path: root/net/socket/client_socket_handle.cc
diff options
context:
space:
mode:
authorvandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-14 03:37:18 +0000
committervandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-14 03:37:18 +0000
commite60e47ad57e7ff423c39cff9c88725a7aed85118 (patch)
treef8b53b60daa05f2e2c5df92ca333ad1283e389cc /net/socket/client_socket_handle.cc
parent548adcb9cb9343fe542f82cc35ffaa8f8279dfb6 (diff)
downloadchromium_src-e60e47ad57e7ff423c39cff9c88725a7aed85118.zip
chromium_src-e60e47ad57e7ff423c39cff9c88725a7aed85118.tar.gz
chromium_src-e60e47ad57e7ff423c39cff9c88725a7aed85118.tar.bz2
Implement SSLClientSocketPool.
To support SSLClientSocketPool, ClientSocketPoolBase and ClientSocketHandle require a notion of additional error state reported from the pool. Overtime the error handling may get become more integrated, alleviating the need for some of the additional error state. To support getting Http Proxy credentials from the user, the SSLClientSocketPool will release unauthenticated HttpProxyClientSocket's into the pool as idle. However, it checks their authentication status when receiving one, completing the authentication once the user has provided the credentials. BUG=30357 TEST=existing unit tests, ClientSocketPoolBaseTest.AdditionalErrorState*, SSLClientSocketPoolTest.* Review URL: http://codereview.chromium.org/2870030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52275 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/client_socket_handle.cc')
-rw-r--r--net/socket/client_socket_handle.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/socket/client_socket_handle.cc b/net/socket/client_socket_handle.cc
index fab8d3e..73142bf 100644
--- a/net/socket/client_socket_handle.cc
+++ b/net/socket/client_socket_handle.cc
@@ -17,7 +17,8 @@ ClientSocketHandle::ClientSocketHandle()
: socket_(NULL),
is_reused_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(
- callback_(this, &ClientSocketHandle::OnIOComplete)) {}
+ callback_(this, &ClientSocketHandle::OnIOComplete)),
+ is_ssl_error_(false) {}
ClientSocketHandle::~ClientSocketHandle() {
Reset();
@@ -25,6 +26,7 @@ ClientSocketHandle::~ClientSocketHandle() {
void ClientSocketHandle::Reset() {
ResetInternal(true);
+ ResetErrorState();
}
void ClientSocketHandle::ResetInternal(bool cancel) {
@@ -53,6 +55,11 @@ void ClientSocketHandle::ResetInternal(bool cancel) {
pool_id_ = -1;
}
+void ClientSocketHandle::ResetErrorState() {
+ is_ssl_error_ = false;
+ tunnel_auth_response_info_ = HttpResponseInfo();
+}
+
LoadState ClientSocketHandle::GetLoadState() const {
CHECK(!is_initialized());
CHECK(!group_name_.empty());