summaryrefslogtreecommitdiffstats
path: root/jingle
diff options
context:
space:
mode:
authorjiayl <jiayl@chromium.org>2014-08-28 11:47:25 -0700
committerCommit bot <commit-bot@chromium.org>2014-08-28 18:52:29 +0000
commit260631aa62e2096045adb0e3780ef562ef12bb4f (patch)
treee5af7664a5b530d2169277aeee227df9313a8b08 /jingle
parent035c3fb39cb2d3f47a617d8d056a1fb0383fefda (diff)
downloadchromium_src-260631aa62e2096045adb0e3780ef562ef12bb4f.zip
chromium_src-260631aa62e2096045adb0e3780ef562ef12bb4f.tar.gz
chromium_src-260631aa62e2096045adb0e3780ef562ef12bb4f.tar.bz2
Handles proxy authentication request in ProxyResolvingClientSocket.
This will make the WebRTC connection work under NTLM/Kerberos using the default credential without prompting the user. BUG=395614 Review URL: https://codereview.chromium.org/414523005 Cr-Commit-Position: refs/heads/master@{#292428}
Diffstat (limited to 'jingle')
-rw-r--r--jingle/glue/proxy_resolving_client_socket.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/jingle/glue/proxy_resolving_client_socket.cc b/jingle/glue/proxy_resolving_client_socket.cc
index 545a988..91eb5ae 100644
--- a/jingle/glue/proxy_resolving_client_socket.cc
+++ b/jingle/glue/proxy_resolving_client_socket.cc
@@ -12,7 +12,9 @@
#include "net/base/io_buffer.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
+#include "net/http/http_auth_controller.h"
#include "net/http/http_network_session.h"
+#include "net/http/proxy_client_socket.h"
#include "net/socket/client_socket_handle.h"
#include "net/socket/client_socket_pool_manager.h"
#include "net/url_request/url_request_context.h"
@@ -270,6 +272,15 @@ int ProxyResolvingClientSocket::ReconsiderProxyAfterError(int error) {
// "address unreachable" error, and will report both of these failures as
// ERR_ADDRESS_UNREACHABLE.
return net::ERR_ADDRESS_UNREACHABLE;
+ case net::ERR_PROXY_AUTH_REQUESTED: {
+ net::ProxyClientSocket* proxy_socket =
+ static_cast<net::ProxyClientSocket*>(transport_->socket());
+
+ if (proxy_socket->GetAuthController()->HaveAuth())
+ return proxy_socket->RestartWithAuth(connect_callback_);
+
+ return error;
+ }
default:
return error;
}