Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / net / proxy / proxy_service.cc
index bc69b66..98c6864 100644 (file)
@@ -1206,15 +1206,19 @@ int ProxyService::ReconsiderProxyAfterError(const GURL& url,
   return did_fallback ? OK : ERR_FAILED;
 }
 
-bool ProxyService::MarkProxiesAsBad(
+bool ProxyService::MarkProxiesAsBadUntil(
     const ProxyInfo& result,
     base::TimeDelta retry_delay,
     const ProxyServer& another_bad_proxy,
     const BoundNetLog& net_log) {
   result.proxy_list_.UpdateRetryInfoOnFallback(&proxy_retry_info_, retry_delay,
+                                               false,
                                                another_bad_proxy,
                                                net_log);
-  return result.proxy_list_.HasUntriedProxies(proxy_retry_info_);
+  if (another_bad_proxy.is_valid())
+    return result.proxy_list_.size() > 2;
+  else
+    return result.proxy_list_.size() > 1;
 }
 
 void ProxyService::ReportSuccess(const ProxyInfo& result) {