Index: net/http/http_proxy_client_socket.h |
diff --git a/net/http/http_proxy_client_socket.h b/net/http/http_proxy_client_socket.h |
index 61e81581ccc77a8323483164a979c8b46f647a25..f4cc083e7797cb602a8b4054177ef8f0e42f27d6 100644 |
--- a/net/http/http_proxy_client_socket.h |
+++ b/net/http/http_proxy_client_socket.h |
@@ -29,13 +29,12 @@ class IOBuffer;; |
class HttpProxyClientSocket : public ClientSocket { |
public: |
- // Takes ownership of |transport_socket|, which should already be connected |
- // by the time Connect() is called. If tunnel is true then on Connect() |
- // this socket will establish an Http tunnel. |
+ // Takes ownership of |auth| and |transport_socket|, which should already be |
+ // connected by the time Connect() is called. If tunnel is true then on |
+ // Connect() this socket will establish an Http tunnel. |
HttpProxyClientSocket(ClientSocketHandle* transport_socket, |
const GURL& request_url, const HostPortPair& endpoint, |
- const scoped_refptr<HttpAuthController>& auth, |
- bool tunnel); |
+ HttpAuthController* auth, bool tunnel); |
// On destruction Disconnect() is called. |
virtual ~HttpProxyClientSocket(); |
@@ -43,7 +42,9 @@ class HttpProxyClientSocket : public ClientSocket { |
// If Connect (or its callback) returns PROXY_AUTH_REQUESTED, then |
// credentials should be added to the HttpAuthController before calling |
// RestartWithAuth. |
- int RestartWithAuth(CompletionCallback* callback); |
+ int RestartWithAuth(const std::wstring& username, |
+ const std::wstring& password, |
+ CompletionCallback* callback); |
// Indicates if RestartWithAuth needs to be called. i.e. if Connect |
// returned PROXY_AUTH_REQUESTED. Only valid after Connect has been called. |
@@ -53,6 +54,13 @@ class HttpProxyClientSocket : public ClientSocket { |
return response_.headers ? &response_ : NULL; |
} |
+ // Release the auth controller back to the caller. This is used when |
+ // we need to continue the auth conversation, but the connection doesn't |
+ // support keep alive. |
+ HttpAuthController* ReleaseAuthController() { |
+ return auth_.release(); |
+ } |
+ |
// ClientSocket methods: |
// Authenticates to the Http Proxy and then passes data freely. |
@@ -130,7 +138,7 @@ class HttpProxyClientSocket : public ClientSocket { |
// The hostname and port of the endpoint. This is not necessarily the one |
// specified by the URL, due to Alternate-Protocol or fixed testing ports. |
const HostPortPair endpoint_; |
- scoped_refptr<HttpAuthController> auth_; |
+ scoped_ptr<HttpAuthController> auth_; |
const bool tunnel_; |
std::string request_headers_; |