From bcc528ed85d5fa3b4f327d2875d14de7c4506bd8 Mon Sep 17 00:00:00 2001 From: "cbentzel@chromium.org" Date: Thu, 10 Jun 2010 15:03:24 +0000 Subject: Async support for HttpAuthHandler::GenerateAuthToken. This CL changes the signature of GenerateAuthToken to support an async completion of GenerateAuthToken. At this point, all of the implementations complete synchronously, but a future version will change Negotiate to complete asynchronously. TEST=net_unittests BUG=42222 Review URL: http://codereview.chromium.org/2671001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49398 0039d316-1c4b-4281-b951-d872f2087c98 --- net/socket_stream/socket_stream.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'net/socket_stream') diff --git a/net/socket_stream/socket_stream.cc b/net/socket_stream/socket_stream.cc index 05c0bc9..a79af32 100644 --- a/net/socket_stream/socket_stream.cc +++ b/net/socket_stream/socket_stream.cc @@ -19,6 +19,7 @@ #include "net/base/net_errors.h" #include "net/base/net_util.h" #include "net/http/http_auth_handler_factory.h" +#include "net/http/http_request_info.h" #include "net/http/http_response_headers.h" #include "net/http/http_util.h" #include "net/socket/client_socket_factory.h" @@ -567,11 +568,12 @@ int SocketStream::DoWriteTunnelHeaders() { // TODO(ukai): Add support other authentication scheme. if (auth_handler_.get() && auth_handler_->scheme() == "basic") { std::string auth_token; + HttpRequestInfo request_info; int rv = auth_handler_->GenerateAuthToken( - auth_identity_.username, - auth_identity_.password, + &auth_identity_.username, + &auth_identity_.password, + &request_info, NULL, - &proxy_info_, &auth_token); // TODO(cbentzel): Should do something different if credentials // can't be generated. In this case, only Basic is allowed which -- cgit v1.1