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

Side by Side Diff: net/proxy/proxy_info.h

Issue 542029: Retry proxies which were cached as bad before giving up.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/http/http_network_transaction.cc ('k') | net/proxy/proxy_list.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_PROXY_PROXY_INFO_H_ 5 #ifndef NET_PROXY_PROXY_INFO_H_
6 #define NET_PROXY_PROXY_INFO_H_ 6 #define NET_PROXY_PROXY_INFO_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "net/proxy/proxy_config.h" 10 #include "net/proxy/proxy_config.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 // See description in ProxyList::ToPacString(). 62 // See description in ProxyList::ToPacString().
63 std::string ToPacString() const; 63 std::string ToPacString() const;
64 64
65 // Marks the current proxy as bad. Returns true if there is another proxy 65 // Marks the current proxy as bad. Returns true if there is another proxy
66 // available to try in proxy list_. 66 // available to try in proxy list_.
67 bool Fallback(ProxyRetryInfoMap* proxy_retry_info) { 67 bool Fallback(ProxyRetryInfoMap* proxy_retry_info) {
68 return proxy_list_.Fallback(proxy_retry_info); 68 return proxy_list_.Fallback(proxy_retry_info);
69 } 69 }
70 70
71 // Remove all proxies known to be bad from the proxy list. 71 // De-prioritizes the proxies that we have cached as not working, by moving
72 void RemoveBadProxies(const ProxyRetryInfoMap& proxy_retry_info) { 72 // them to the end of the proxy list.
73 proxy_list_.RemoveBadProxies(proxy_retry_info); 73 void DeprioritizeBadProxies(const ProxyRetryInfoMap& proxy_retry_info) {
74 proxy_list_.DeprioritizeBadProxies(proxy_retry_info);
74 } 75 }
75 76
76 // Delete any entry which doesn't have one of the specified proxy schemes. 77 // Delete any entry which doesn't have one of the specified proxy schemes.
77 void RemoveProxiesWithoutScheme(int scheme_bit_field) { 78 void RemoveProxiesWithoutScheme(int scheme_bit_field) {
78 proxy_list_.RemoveProxiesWithoutScheme(scheme_bit_field); 79 proxy_list_.RemoveProxiesWithoutScheme(scheme_bit_field);
79 } 80 }
80 81
81 private: 82 private:
82 friend class ProxyService; 83 friend class ProxyService;
83 84
84 // The ordered list of proxy servers (including DIRECT attempts) remaining to 85 // The ordered list of proxy servers (including DIRECT attempts) remaining to
85 // try. If proxy_list_ is empty, then there is nothing left to fall back to. 86 // try. If proxy_list_ is empty, then there is nothing left to fall back to.
86 ProxyList proxy_list_; 87 ProxyList proxy_list_;
87 88
88 // This value identifies the proxy config used to initialize this object. 89 // This value identifies the proxy config used to initialize this object.
89 ProxyConfig::ID config_id_; 90 ProxyConfig::ID config_id_;
90 }; 91 };
91 92
92 } // namespace net 93 } // namespace net
93 94
94 #endif // NET_PROXY_PROXY_INFO_H_ 95 #endif // NET_PROXY_PROXY_INFO_H_
OLDNEW
« no previous file with comments | « net/http/http_network_transaction.cc ('k') | net/proxy/proxy_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698