Chromium Code Reviews| Index: net/proxy/proxy_list.h |
| diff --git a/net/proxy/proxy_list.h b/net/proxy/proxy_list.h |
| index ac9635a977acbb173d3a1059370159ac071c5dd7..b34c77a5cde3b02d4a330423fa5f00bddc2ed50d 100644 |
| --- a/net/proxy/proxy_list.h |
| +++ b/net/proxy/proxy_list.h |
| @@ -78,10 +78,15 @@ class NET_EXPORT_PRIVATE ProxyList { |
| // Returns a serialized value for the list. The caller takes ownership of it. |
| base::ListValue* ToValue() const; |
| - // Marks the current proxy server as bad and deletes it from the list. The |
| - // list of known bad proxies is given by proxy_retry_info. Returns true if |
| - // there is another server available in the list. |
| + // Marks the current proxy server as bad and deletes it from the list. The |
| + // list of known bad proxies is given by |proxy_retry_info|. |net_error| |
| + // should contain the network error encountered when this proxy was tried, if |
| + // any. If this fallback is not because of a network error, then |OK| should |
| + // be passed in (eg. a component added the proxy to the retry list so that it |
| + // is not used). Returns true if there is another server available in the |
|
Ryan Sleevi
2014/08/15 18:02:36
(e.g. for reasons such as local policy)
Not at Google. Contact bengr
2014/08/15 19:56:53
Done.
|
| + // list. |
| bool Fallback(ProxyRetryInfoMap* proxy_retry_info, |
| + int net_error, |
| const BoundNetLog& net_log); |
| // Updates |proxy_retry_info| to indicate that the first proxy in the list |
| @@ -90,22 +95,30 @@ class NET_EXPORT_PRIVATE ProxyList { |
| // retry after |retry_delay| if positive, and will use the default proxy retry |
| // duration otherwise. It may reconsider the proxy beforehand if |reconsider| |
| // is true. Additionally updates |proxy_retry_info| with |
| - // |another_proxy_to_bypass| if non-empty. |
| + // |another_proxy_to_bypass| if non-empty. |net_error| should contain the |
| + // network error encountered when this proxy was tried, if any. If retry info |
| + // is not being updated because of a network error, then |OK| should be passed |
| + // in. |
|
Ryan Sleevi
2014/08/15 18:02:36
I'm having trouble parsing this last sentence.
Pe
Not at Google. Contact bengr
2014/08/15 19:56:53
Done.
|
| void UpdateRetryInfoOnFallback( |
| ProxyRetryInfoMap* proxy_retry_info, |
| base::TimeDelta retry_delay, |
| bool reconsider, |
| const ProxyServer& another_proxy_to_bypass, |
| + int net_error, |
| const BoundNetLog& net_log) const; |
| private: |
| // Updates |proxy_retry_info| to indicate that the |proxy_to_retry| in |
| // |proxies_| is bad for |retry_delay|, but may be reconsidered earlier if |
| - // |try_while_bad| is true. |
| + // |try_while_bad| is true. |net_error| should contain the network error |
| + // encountered when this proxy was tried if any, which is responsible for it |
| + // being put in the retry list. If the proxy is being added to the retry list |
| + // for a reason other than a network error, then |OK| should be passed in. |
|
Ryan Sleevi
2014/08/15 18:02:36
Ditto reword
Not at Google. Contact bengr
2014/08/15 19:56:53
Done.
|
| void AddProxyToRetryList(ProxyRetryInfoMap* proxy_retry_info, |
| base::TimeDelta retry_delay, |
| bool try_while_bad, |
| const ProxyServer& proxy_to_retry, |
| + int net_error, |
| const BoundNetLog& net_log) const; |
| // List of proxies. |