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

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

Issue 12315019: Change ProxyRules to handle ProxyLists rather than just single ProxyServer instances. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/time.h" 10 #include "base/time.h"
(...skipping 26 matching lines...) Expand all
37 // Uses a specific proxy server, of the form: 37 // Uses a specific proxy server, of the form:
38 // proxy-uri = [<scheme> "://"] <hostname> [":" <port>] 38 // proxy-uri = [<scheme> "://"] <hostname> [":" <port>]
39 // This may optionally be a semi-colon delimited list of <proxy-uri>. 39 // This may optionally be a semi-colon delimited list of <proxy-uri>.
40 // It is OK to have LWS between entries. 40 // It is OK to have LWS between entries.
41 void UseNamedProxy(const std::string& proxy_uri_list); 41 void UseNamedProxy(const std::string& proxy_uri_list);
42 42
43 // Sets the proxy list to a single entry, |proxy_server|. 43 // Sets the proxy list to a single entry, |proxy_server|.
44 void UseProxyServer(const ProxyServer& proxy_server); 44 void UseProxyServer(const ProxyServer& proxy_server);
45 45
46 // Parses from the given PAC result. 46 // Parses from the given PAC result.
47 void UsePacString(const std::string& pac_string) { 47 void UsePacString(const std::string& pac_string);
48 proxy_list_.SetFromPacString(pac_string); 48
49 } 49 // Use the proxies from the given list.
50 void UseProxyList(const ProxyList& proxy_list);
50 51
51 // Returns true if this proxy info specifies a direct connection. 52 // Returns true if this proxy info specifies a direct connection.
52 bool is_direct() const { 53 bool is_direct() const {
53 // We don't implicitly fallback to DIRECT unless it was added to the list. 54 // We don't implicitly fallback to DIRECT unless it was added to the list.
54 if (is_empty()) 55 if (is_empty())
55 return false; 56 return false;
56 return proxy_list_.Get().is_direct(); 57 return proxy_list_.Get().is_direct();
57 } 58 }
58 59
59 bool is_direct_only() const { 60 bool is_direct_only() const {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 160
160 // How long it took to resolve the proxy. Times are both null if proxy was 161 // How long it took to resolve the proxy. Times are both null if proxy was
161 // determined synchronously without running a PAC. 162 // determined synchronously without running a PAC.
162 base::TimeTicks proxy_resolve_start_time_; 163 base::TimeTicks proxy_resolve_start_time_;
163 base::TimeTicks proxy_resolve_end_time_; 164 base::TimeTicks proxy_resolve_end_time_;
164 }; 165 };
165 166
166 } // namespace net 167 } // namespace net
167 168
168 #endif // NET_PROXY_PROXY_INFO_H_ 169 #endif // NET_PROXY_PROXY_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698