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

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

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
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/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 11 matching lines...) Expand all
22 class NET_EXPORT ProxyInfo { 22 class NET_EXPORT ProxyInfo {
23 public: 23 public:
24 ProxyInfo(); 24 ProxyInfo();
25 ~ProxyInfo(); 25 ~ProxyInfo();
26 // Default copy-constructor and assignment operator are OK! 26 // Default copy-constructor and assignment operator are OK!
27 27
28 // Uses the same proxy server as the given |proxy_info|. 28 // Uses the same proxy server as the given |proxy_info|.
29 void Use(const ProxyInfo& proxy_info); 29 void Use(const ProxyInfo& proxy_info);
30 30
31 // Uses a direct connection. 31 // Uses a direct connection.
32 //
33 // Note that this method resets this instance unlike Fallback(), etc. which
34 // only modify |proxy_list_|. For example, since |config_id_| is cleared, the
35 // ProxyService may recognize this instance as a new config after UseDirect()
36 // call.
32 void UseDirect(); 37 void UseDirect();
33 38
34 // Uses a direct connection. did_bypass_proxy() will return true to indicate 39 // Uses a direct connection. did_bypass_proxy() will return true to indicate
35 // that the direct connection is the result of configured proxy bypass rules. 40 // that the direct connection is the result of configured proxy bypass rules.
41 //
42 // See also the note for UseDirect().
36 void UseDirectWithBypassedProxy(); 43 void UseDirectWithBypassedProxy();
37 44
38 // Uses a specific proxy server, of the form: 45 // Uses a specific proxy server, of the form:
39 // proxy-uri = [<scheme> "://"] <hostname> [":" <port>] 46 // proxy-uri = [<scheme> "://"] <hostname> [":" <port>]
40 // This may optionally be a semi-colon delimited list of <proxy-uri>. 47 // This may optionally be a semi-colon delimited list of <proxy-uri>.
41 // It is OK to have LWS between entries. 48 // It is OK to have LWS between entries.
49 //
50 // See also the note for UseDirect().
42 void UseNamedProxy(const std::string& proxy_uri_list); 51 void UseNamedProxy(const std::string& proxy_uri_list);
43 52
44 // Sets the proxy list to a single entry, |proxy_server|. 53 // Sets the proxy list to a single entry, |proxy_server|.
54 //
55 // See also the note for UseDirect().
45 void UseProxyServer(const ProxyServer& proxy_server); 56 void UseProxyServer(const ProxyServer& proxy_server);
46 57
47 // Parses from the given PAC result. 58 // Parses from the given PAC result.
59 //
60 // See also the note for UseDirect().
48 void UsePacString(const std::string& pac_string); 61 void UsePacString(const std::string& pac_string);
49 62
50 // Uses the proxies from the given list. 63 // Uses the proxies from the given list.
64 //
65 // See also the note for UseDirect().
51 void UseProxyList(const ProxyList& proxy_list); 66 void UseProxyList(const ProxyList& proxy_list);
52 67
53 // Uses the proxies from the given list, but does not otherwise reset the 68 // Uses the proxies from the given list, but does not otherwise reset the
54 // proxy configuration. 69 // proxy configuration.
55 void OverrideProxyList(const ProxyList& proxy_list); 70 void OverrideProxyList(const ProxyList& proxy_list);
56 71
57 // Returns true if this proxy info specifies a direct connection. 72 // Returns true if this proxy info specifies a direct connection.
58 bool is_direct() const { 73 bool is_direct() const {
59 // We don't implicitly fallback to DIRECT unless it was added to the list. 74 // We don't implicitly fallback to DIRECT unless it was added to the list.
60 if (is_empty()) 75 if (is_empty())
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 196
182 // How long it took to resolve the proxy. Times are both null if proxy was 197 // How long it took to resolve the proxy. Times are both null if proxy was
183 // determined synchronously without running a PAC. 198 // determined synchronously without running a PAC.
184 base::TimeTicks proxy_resolve_start_time_; 199 base::TimeTicks proxy_resolve_start_time_;
185 base::TimeTicks proxy_resolve_end_time_; 200 base::TimeTicks proxy_resolve_end_time_;
186 }; 201 };
187 202
188 } // namespace net 203 } // namespace net
189 204
190 #endif // NET_PROXY_PROXY_INFO_H_ 205 #endif // NET_PROXY_PROXY_INFO_H_
OLDNEW
« no previous file with comments | « net/proxy/proxy_config_source.cc ('k') | net/proxy/proxy_service.cc » ('j') | shell/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698