summaryrefslogtreecommitdiffstats
path: root/jingle
diff options
context:
space:
mode:
authorasanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-29 16:39:00 +0000
committerasanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-29 16:39:00 +0000
commit96e1933fd50fb512c5e678169d0d2c59841a7d1a (patch)
treee93a20434f5478025387ca0f022d3f511a9a7bf2 /jingle
parent61b75a55cd3366f236584da844cc5f9fd5a37a99 (diff)
downloadchromium_src-96e1933fd50fb512c5e678169d0d2c59841a7d1a.zip
chromium_src-96e1933fd50fb512c5e678169d0d2c59841a7d1a.tar.gz
chromium_src-96e1933fd50fb512c5e678169d0d2c59841a7d1a.tar.bz2
Only mark a proxy as bad if we have confirmation that another proxy succeeded for the same request.
BUG=87336 TEST=net_unittests --gtest_filter=ProxyServiceTest.ProxyFallback:HttpStreamFactoryTest.JobNotifiesProxy Review URL: http://codereview.chromium.org/7532011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98643 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'jingle')
-rw-r--r--jingle/notifier/base/proxy_resolving_client_socket.cc6
-rw-r--r--jingle/notifier/base/proxy_resolving_client_socket.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/jingle/notifier/base/proxy_resolving_client_socket.cc b/jingle/notifier/base/proxy_resolving_client_socket.cc
index 45d0c11..a4083b0 100644
--- a/jingle/notifier/base/proxy_resolving_client_socket.cc
+++ b/jingle/notifier/base/proxy_resolving_client_socket.cc
@@ -190,6 +190,8 @@ void ProxyResolvingClientSocket::ProcessConnectDone(int status) {
// Proxy reconsideration pending. Return.
return;
CloseTransportSocket();
+ } else {
+ ReportSuccessfulProxyConnection();
}
RunUserConnectCallback(status);
}
@@ -274,6 +276,10 @@ int ProxyResolvingClientSocket::ReconsiderProxyAfterError(int error) {
return rv;
}
+void ProxyResolvingClientSocket::ReportSuccessfulProxyConnection() {
+ network_session_->proxy_service()->ReportSuccess(proxy_info_);
+}
+
void ProxyResolvingClientSocket::Disconnect() {
CloseTransportSocket();
if (pac_request_)
diff --git a/jingle/notifier/base/proxy_resolving_client_socket.h b/jingle/notifier/base/proxy_resolving_client_socket.h
index b97315b..a651403f 100644
--- a/jingle/notifier/base/proxy_resolving_client_socket.h
+++ b/jingle/notifier/base/proxy_resolving_client_socket.h
@@ -67,6 +67,7 @@ class ProxyResolvingClientSocket : public net::StreamSocket {
void CloseTransportSocket();
void RunUserConnectCallback(int status);
int ReconsiderProxyAfterError(int error);
+ void ReportSuccessfulProxyConnection();
// Callbacks passed to net APIs.
net::CompletionCallbackImpl<ProxyResolvingClientSocket>