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

Unified Diff: net/http/http_stream_factory_impl_job.cc

Issue 9316101: Revert 118950 - Allow chrome to handle 407 auth challenges to CONNECT requests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 11 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_stream_factory_impl_job.h ('k') | net/http/http_stream_factory_impl_request.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl_job.cc
===================================================================
--- net/http/http_stream_factory_impl_job.cc (revision 120368)
+++ net/http/http_stream_factory_impl_job.cc (working copy)
@@ -180,22 +180,14 @@
return StartInternal();
}
-int HttpStreamFactoryImpl::Job::RestartTunnelWithProxyAuth() {
- // We run this asynchronously to ensure that we don't invoke
- // the callback (which might cause the caller to be deleted)
- // while the caller is waiting for this method to return.
- MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&HttpStreamFactoryImpl::Job::DoRestartTunnelWithProxyAuth,
- ptr_factory_.GetWeakPtr()));
- return ERR_IO_PENDING;
+int HttpStreamFactoryImpl::Job::RestartTunnelWithProxyAuth(
+ const AuthCredentials& credentials) {
+ DCHECK(establishing_tunnel_);
+ next_state_ = STATE_RESTART_TUNNEL_AUTH;
+ stream_.reset();
+ return RunLoop(OK);
}
-void HttpStreamFactoryImpl::Job::DoRestartTunnelWithProxyAuth() {
- tunnel_auth_handled_callback_.Run(OK);
- tunnel_auth_handled_callback_.Reset();
-}
-
LoadState HttpStreamFactoryImpl::Job::GetLoadState() const {
switch (next_state_) {
case STATE_RESOLVE_PROXY_COMPLETE:
@@ -349,18 +341,6 @@
// |this| may be deleted after this call.
}
-void HttpStreamFactoryImpl::Job::OnNeedsProxyTunnelAuthCallback(
- const HttpResponseInfo& response_info,
- HttpAuthController* auth_controller,
- CompletionCallback callback) {
- DCHECK(!callback.is_null());
- DCHECK(tunnel_auth_handled_callback_.is_null());
- tunnel_auth_handled_callback_ = callback;
- request_->OnNeedsProxyAuth(
- this, response_info, server_ssl_config_, proxy_info_, auth_controller);
- // |this| may be deleted after this call.
-}
-
void HttpStreamFactoryImpl::Job::OnNeedsClientAuthCallback(
SSLCertRequestInfo* cert_info) {
DCHECK(!IsPreconnecting());
@@ -439,10 +419,10 @@
DCHECK(connection_->socket());
DCHECK(establishing_tunnel_);
- ProxyClientSocket* proxy_socket =
- static_cast<ProxyClientSocket*>(connection_->socket());
+ HttpProxyClientSocket* http_proxy_socket =
+ static_cast<HttpProxyClientSocket*>(connection_->socket());
const HttpResponseInfo* tunnel_auth_response =
- proxy_socket->GetConnectResponseInfo();
+ http_proxy_socket->GetConnectResponseInfo();
next_state_ = STATE_WAITING_USER_ACTION;
MessageLoop::current()->PostTask(
@@ -451,7 +431,7 @@
&HttpStreamFactoryImpl::Job::OnNeedsProxyAuthCallback,
ptr_factory_.GetWeakPtr(),
*tunnel_auth_response,
- proxy_socket->GetAuthController()));
+ http_proxy_socket->auth_controller()));
}
return ERR_IO_PENDING;
@@ -752,18 +732,13 @@
server_ssl_config_,
proxy_ssl_config_,
net_log_,
- num_streams_,
- base::Bind(&HttpStreamFactoryImpl::Job::OnNeedsProxyTunnelAuthCallback,
- ptr_factory_.GetWeakPtr()));
+ num_streams_);
} else {
return InitSocketHandleForHttpRequest(
origin_url_, request_info_.extra_headers, request_info_.load_flags,
request_info_.priority, session_, proxy_info_, ShouldForceSpdySSL(),
want_spdy_over_npn, server_ssl_config_, proxy_ssl_config_, net_log_,
- connection_.get(),
- base::Bind(&HttpStreamFactoryImpl::Job::OnNeedsProxyTunnelAuthCallback,
- ptr_factory_.GetWeakPtr()),
- io_callback_);
+ connection_.get(), io_callback_);
}
}
Property changes on: net/http/http_stream_factory_impl_job.cc
___________________________________________________________________
Added: svn:mergeinfo
« no previous file with comments | « net/http/http_stream_factory_impl_job.h ('k') | net/http/http_stream_factory_impl_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698