Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_SERVICE_H_ | 5 #ifndef NET_PROXY_PROXY_SERVICE_H_ |
| 6 #define NET_PROXY_PROXY_SERVICE_H_ | 6 #define NET_PROXY_PROXY_SERVICE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 115 // the caller will not need to cancel the request. | 115 // the caller will not need to cancel the request. |
| 116 // | 116 // |
| 117 // We use the three possible proxy access types in the following order, | 117 // We use the three possible proxy access types in the following order, |
| 118 // doing fallback if one doesn't work. See "pac_script_decider.h" | 118 // doing fallback if one doesn't work. See "pac_script_decider.h" |
| 119 // for the specifics. | 119 // for the specifics. |
| 120 // 1. WPAD auto-detection | 120 // 1. WPAD auto-detection |
| 121 // 2. PAC URL | 121 // 2. PAC URL |
| 122 // 3. named proxy | 122 // 3. named proxy |
| 123 // | 123 // |
| 124 // Profiling information for the request is saved to |net_log| if non-NULL. | 124 // Profiling information for the request is saved to |net_log| if non-NULL. |
| 125 int ResolveProxy(const GURL& url, | 125 // This method is virtual for unit testing. |
|
eroman
2014/09/23 20:50:42
Can your tests can instead use: ProxyService::Crea
bemasc
2014/09/24 18:34:37
Done.
| |
| 126 int load_flags, | 126 virtual int ResolveProxy(const GURL& url, |
| 127 ProxyInfo* results, | 127 int load_flags, |
| 128 const net::CompletionCallback& callback, | 128 ProxyInfo* results, |
| 129 PacRequest** pac_request, | 129 const net::CompletionCallback& callback, |
| 130 NetworkDelegate* network_delegate, | 130 PacRequest** pac_request, |
| 131 const BoundNetLog& net_log); | 131 NetworkDelegate* network_delegate, |
| 132 const BoundNetLog& net_log); | |
| 132 | 133 |
| 133 // This method is called after a failure to connect or resolve a host name. | 134 // This method is called after a failure to connect or resolve a host name. |
| 134 // It gives the proxy service an opportunity to reconsider the proxy to use. | 135 // It gives the proxy service an opportunity to reconsider the proxy to use. |
| 135 // The |results| parameter contains the results returned by an earlier call | 136 // The |results| parameter contains the results returned by an earlier call |
| 136 // to ResolveProxy. The |net_error| parameter contains the network error | 137 // to ResolveProxy. The |net_error| parameter contains the network error |
| 137 // code associated with the failure. See "net/base/net_error_list.h" for a | 138 // code associated with the failure. See "net/base/net_error_list.h" for a |
| 138 // list of possible values. The semantics of this call are otherwise | 139 // list of possible values. The semantics of this call are otherwise |
| 139 // similar to ResolveProxy. | 140 // similar to ResolveProxy. |
| 140 // | 141 // |
| 141 // NULL can be passed for |pac_request| if the caller will not need to | 142 // NULL can be passed for |pac_request| if the caller will not need to |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 428 | 429 |
| 429 // Whether child ProxyScriptDeciders should use QuickCheck | 430 // Whether child ProxyScriptDeciders should use QuickCheck |
| 430 bool quick_check_enabled_; | 431 bool quick_check_enabled_; |
| 431 | 432 |
| 432 DISALLOW_COPY_AND_ASSIGN(ProxyService); | 433 DISALLOW_COPY_AND_ASSIGN(ProxyService); |
| 433 }; | 434 }; |
| 434 | 435 |
| 435 } // namespace net | 436 } // namespace net |
| 436 | 437 |
| 437 #endif // NET_PROXY_PROXY_SERVICE_H_ | 438 #endif // NET_PROXY_PROXY_SERVICE_H_ |
| OLD | NEW |