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

Unified Diff: net/proxy/proxy_service.cc

Issue 1128823005: Update marking proxies as bad in ProxyList/ProxyService to use a std::vector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit test failure Created 5 years, 7 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/proxy/proxy_service.h ('k') | net/proxy/proxy_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_service.cc
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc
index 5d07c8721e853a44ff17b0f5f126615bb2a273e4..7756c266628df1bc460f2f33ec4a3179e2cbff15 100644
--- a/net/proxy/proxy_service.cc
+++ b/net/proxy/proxy_service.cc
@@ -1294,18 +1294,12 @@ int ProxyService::ReconsiderProxyAfterError(const GURL& url,
bool ProxyService::MarkProxiesAsBadUntil(
const ProxyInfo& result,
base::TimeDelta retry_delay,
- const ProxyServer& another_bad_proxy,
+ const std::vector<ProxyServer>& additional_bad_proxies,
const BoundNetLog& net_log) {
- result.proxy_list_.UpdateRetryInfoOnFallback(&proxy_retry_info_,
- retry_delay,
- false,
- another_bad_proxy,
- OK,
- net_log);
- if (another_bad_proxy.is_valid())
- return result.proxy_list_.size() > 2;
- else
- return result.proxy_list_.size() > 1;
+ result.proxy_list_.UpdateRetryInfoOnFallback(&proxy_retry_info_, retry_delay,
+ false, additional_bad_proxies,
+ OK, net_log);
+ return result.proxy_list_.size() > (additional_bad_proxies.size() + 1);
}
void ProxyService::ReportSuccess(const ProxyInfo& result,
« no previous file with comments | « net/proxy/proxy_service.h ('k') | net/proxy/proxy_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698