| Index: net/proxy/proxy_list.cc
|
| diff --git a/net/proxy/proxy_list.cc b/net/proxy/proxy_list.cc
|
| index 3a63c6cc0eb705ae13e8c72fc351edad370727ec..f092f51cfbf3e521b81198b8e3d2ce3f4c459937 100644
|
| --- a/net/proxy/proxy_list.cc
|
| +++ b/net/proxy/proxy_list.cc
|
| @@ -126,8 +126,6 @@ std::string ProxyList::ToPacString() const {
|
|
|
| bool ProxyList::Fallback(ProxyRetryInfoMap* proxy_retry_info,
|
| const BoundNetLog& net_log) {
|
| - // Number of minutes to wait before retrying a bad proxy server.
|
| - const TimeDelta kProxyRetryDelay = TimeDelta::FromMinutes(5);
|
|
|
| // TODO(eroman): It would be good if instead of removing failed proxies
|
| // from the list, we simply annotated them with the error code they failed
|
| @@ -147,6 +145,22 @@ bool ProxyList::Fallback(ProxyRetryInfoMap* proxy_retry_info,
|
| NOTREACHED();
|
| return false;
|
| }
|
| + UpdateRetryInfoOnFallback(proxy_retry_info, net_log);
|
| +
|
| + // Remove this proxy from our list.
|
| + proxies_.erase(proxies_.begin());
|
| + return !proxies_.empty();
|
| +}
|
| +
|
| +void ProxyList::UpdateRetryInfoOnFallback(
|
| + ProxyRetryInfoMap* proxy_retry_info, const BoundNetLog& net_log) const {
|
| + // Number of minutes to wait before retrying a bad proxy server.
|
| + const TimeDelta kProxyRetryDelay = TimeDelta::FromMinutes(5);
|
| +
|
| + if (proxies_.empty()) {
|
| + NOTREACHED();
|
| + return;
|
| + }
|
|
|
| if (!proxies_[0].is_direct()) {
|
| std::string key = proxies_[0].ToURI();
|
| @@ -165,11 +179,6 @@ bool ProxyList::Fallback(ProxyRetryInfoMap* proxy_retry_info,
|
| net_log.AddEvent(NetLog::TYPE_PROXY_LIST_FALLBACK,
|
| NetLog::StringCallback("bad_proxy", &key));
|
| }
|
| -
|
| - // Remove this proxy from our list.
|
| - proxies_.erase(proxies_.begin());
|
| -
|
| - return !proxies_.empty();
|
| }
|
|
|
| } // namespace net
|
|
|