diff options
author | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-30 23:21:59 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-30 23:21:59 +0000 |
commit | 9a9787ed17dce85531063d1fb2a07ce801c58de5 (patch) | |
tree | 8c5d68e2da23005d4604a03bea2fb2221affcc47 /net/socket/socket_test_util.cc | |
parent | eb210d2cbe6e3dc88140bb8d53a9b02955fa5858 (diff) | |
download | chromium_src-9a9787ed17dce85531063d1fb2a07ce801c58de5.zip chromium_src-9a9787ed17dce85531063d1fb2a07ce801c58de5.tar.gz chromium_src-9a9787ed17dce85531063d1fb2a07ce801c58de5.tar.bz2 |
Fix late binding induced mismatch of Socket and AuthController
ClientSocketPool treats all pending SocketParams as interchangeable. Therefore they can not contain any connection specific data. This only affects the Http Proxy tunnel case. The lowest risk change to fix this problem is to create the HttpAuthController in the HttpProxyClientSocket. If we get a 407 and need to restart the Tunnel, the pending HttpProxyClientSocket is returned to the HttpNetworkTransaction in the additional error state of the connection and then complete the auth in a pair of states in the HttpNetworkTransaction. This reintroduces a dependency between tunnel setup and the HttpNetworkTransaction, but that will need to be fixed at a later date.
BUG=49493
TEST=existing unit tests + manually visiting many SSL sites through a kerberized http proxy.
Review URL: http://codereview.chromium.org/3058013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54405 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/socket_test_util.cc')
-rw-r--r-- | net/socket/socket_test_util.cc | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc index 8ff6ace..8319563 100644 --- a/net/socket/socket_test_util.cc +++ b/net/socket/socket_test_util.cc @@ -886,53 +886,6 @@ void MockSOCKSClientSocketPool::ReleaseSocket(const std::string& group_name, MockSOCKSClientSocketPool::~MockSOCKSClientSocketPool() {} -MockHttpAuthController::MockHttpAuthController() - : HttpAuthController(HttpAuth::AUTH_PROXY, GURL(), - scoped_refptr<HttpNetworkSession>(NULL)), - data_(NULL), - data_index_(0), - data_count_(0) { -} - -void MockHttpAuthController::SetMockAuthControllerData( - struct MockHttpAuthControllerData* data, size_t count) { - data_ = data; - data_count_ = count; -} - -int MockHttpAuthController::MaybeGenerateAuthToken( - const HttpRequestInfo* request, - CompletionCallback* callback, - const BoundNetLog& net_log) { - return OK; -} - -void MockHttpAuthController::AddAuthorizationHeader( - HttpRequestHeaders* authorization_headers) { - authorization_headers->AddHeadersFromString(CurrentData().auth_header); -} - -int MockHttpAuthController::HandleAuthChallenge( - scoped_refptr<HttpResponseHeaders> headers, - bool do_not_send_server_auth, - bool establishing_tunnel, - const BoundNetLog& net_log) { - return OK; -} - -void MockHttpAuthController::ResetAuth(const string16& username, - const string16& password) { - data_index_++; -} - -bool MockHttpAuthController::HaveAuth() const { - return CurrentData().auth_header.size() != 0; -} - -bool MockHttpAuthController::HaveAuthHandler() const { - return HaveAuth(); -} - const char kSOCKS5GreetRequest[] = { 0x05, 0x01, 0x00 }; const int kSOCKS5GreetRequestLength = arraysize(kSOCKS5GreetRequest); |