Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Unified Diff: net/http/http_proxy_client_socket.cc

Issue 3039028: Make HttpAuthController not reference counted. (Closed)
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_proxy_client_socket.h ('k') | net/http/http_proxy_client_socket_pool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_proxy_client_socket.cc
diff --git a/net/http/http_proxy_client_socket.cc b/net/http/http_proxy_client_socket.cc
index ec4b753984774935a0b50eb86615aea37de52073..6ed04c1f259e2a0c98bec3f4d532e4dbd18fb28b 100644
--- a/net/http/http_proxy_client_socket.cc
+++ b/net/http/http_proxy_client_socket.cc
@@ -50,7 +50,7 @@ void BuildTunnelRequest(const HttpRequestInfo* request_info,
HttpProxyClientSocket::HttpProxyClientSocket(
ClientSocketHandle* transport_socket, const GURL& request_url,
- const HostPortPair& endpoint, const scoped_refptr<HttpAuthController>& auth,
+ const HostPortPair& endpoint, HttpAuthController* auth,
bool tunnel)
: ALLOW_THIS_IN_INITIALIZER_LIST(
io_callback_(this, &HttpProxyClientSocket::OnIOComplete)),
@@ -91,10 +91,15 @@ int HttpProxyClientSocket::Connect(CompletionCallback* callback) {
return rv;
}
-int HttpProxyClientSocket::RestartWithAuth(CompletionCallback* callback) {
+int HttpProxyClientSocket::RestartWithAuth(const std::wstring& username,
+ const std::wstring& password,
+ CompletionCallback* callback) {
DCHECK_EQ(STATE_NONE, next_state_);
DCHECK(!user_callback_);
+ auth_->SetCredentials(username, password);
+ auth_->PrepareForAuthRestart();
+
int rv = PrepareForAuthRestart();
if (rv != OK)
return rv;
« no previous file with comments | « net/http/http_proxy_client_socket.h ('k') | net/http/http_proxy_client_socket_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698