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

Unified Diff: net/proxy/proxy_list.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_list.h ('k') | net/proxy/proxy_list_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_list.cc
diff --git a/net/proxy/proxy_list.cc b/net/proxy/proxy_list.cc
index 524cc1583ebd60d7a41b9ace1af1ad3bd52f6c1e..e53fe7ce3fdcb86be5da2d25ecf27895387e634b 100644
--- a/net/proxy/proxy_list.cc
+++ b/net/proxy/proxy_list.cc
@@ -172,12 +172,8 @@ bool ProxyList::Fallback(ProxyRetryInfoMap* proxy_retry_info,
return false;
}
// By default, proxies are not retried for 5 minutes.
- UpdateRetryInfoOnFallback(proxy_retry_info,
- TimeDelta::FromMinutes(5),
- true,
- ProxyServer(),
- net_error,
- net_log);
+ UpdateRetryInfoOnFallback(proxy_retry_info, TimeDelta::FromMinutes(5), true,
+ std::vector<ProxyServer>(), net_error, net_log);
// Remove this proxy from our list.
proxies_.erase(proxies_.begin());
@@ -213,7 +209,7 @@ void ProxyList::UpdateRetryInfoOnFallback(
ProxyRetryInfoMap* proxy_retry_info,
base::TimeDelta retry_delay,
bool reconsider,
- const ProxyServer& another_proxy_to_bypass,
+ const std::vector<ProxyServer>& additional_proxies_to_bypass,
int net_error,
const BoundNetLog& net_log) const {
DCHECK(retry_delay != base::TimeDelta());
@@ -230,16 +226,11 @@ void ProxyList::UpdateRetryInfoOnFallback(
proxies_[0],
net_error,
net_log);
-
- // If an additional proxy to bypass is specified, add it to the retry map
+ // If any additional proxies to bypass are specified, add to the retry map
// as well.
- if (another_proxy_to_bypass.is_valid()) {
- AddProxyToRetryList(proxy_retry_info,
- retry_delay,
- reconsider,
- another_proxy_to_bypass,
- net_error,
- net_log);
+ for (const ProxyServer& additional_proxy : additional_proxies_to_bypass) {
+ AddProxyToRetryList(proxy_retry_info, retry_delay, reconsider,
+ additional_proxy, net_error, net_log);
}
}
}
« no previous file with comments | « net/proxy/proxy_list.h ('k') | net/proxy/proxy_list_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698