OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BASE_PROXY_DELEGATE_H_ | 5 #ifndef NET_BASE_PROXY_DELEGATE_H_ |
6 #define NET_BASE_PROXY_DELEGATE_H_ | 6 #define NET_BASE_PROXY_DELEGATE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "net/base/net_export.h" | 9 #include "net/base/net_export.h" |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... | |
28 | 28 |
29 virtual ~ProxyDelegate() { | 29 virtual ~ProxyDelegate() { |
30 } | 30 } |
31 | 31 |
32 // Called as the proxy is being resolved for |url|. Allows the delegate to | 32 // Called as the proxy is being resolved for |url|. Allows the delegate to |
33 // override the proxy resolution decision made by ProxyService. The delegate | 33 // override the proxy resolution decision made by ProxyService. The delegate |
34 // may override the decision by modifying the ProxyInfo |result|. | 34 // may override the decision by modifying the ProxyInfo |result|. |
35 virtual void OnResolveProxy(const GURL& url, | 35 virtual void OnResolveProxy(const GURL& url, |
36 int load_flags, | 36 int load_flags, |
37 const ProxyService& proxy_service, | 37 const ProxyService& proxy_service, |
38 const std::string& method, | |
bengr
2016/02/16 20:00:13
Move the method to just after the url.
RyanSturm
2016/02/17 21:46:11
Done.
| |
38 ProxyInfo* result) = 0; | 39 ProxyInfo* result) = 0; |
39 | 40 |
40 // Called when use of |bad_proxy| fails due to |net_error|. |net_error| is | 41 // Called when use of |bad_proxy| fails due to |net_error|. |net_error| is |
41 // the network error encountered, if any, and OK if the fallback was | 42 // the network error encountered, if any, and OK if the fallback was |
42 // for a reason other than a network error (e.g. the proxy service was | 43 // for a reason other than a network error (e.g. the proxy service was |
43 // explicitly directed to skip a proxy). | 44 // explicitly directed to skip a proxy). |
44 virtual void OnFallback(const ProxyServer& bad_proxy, | 45 virtual void OnFallback(const ProxyServer& bad_proxy, |
45 int net_error) = 0; | 46 int net_error) = 0; |
46 | 47 |
47 // Called after a proxy connection. Allows the delegate to read/write | 48 // Called after a proxy connection. Allows the delegate to read/write |
(...skipping 23 matching lines...) Expand all Loading... | |
71 // allowed to push cross-origin resources. | 72 // allowed to push cross-origin resources. |
72 virtual bool IsTrustedSpdyProxy(const net::ProxyServer& proxy_server) = 0; | 73 virtual bool IsTrustedSpdyProxy(const net::ProxyServer& proxy_server) = 0; |
73 | 74 |
74 private: | 75 private: |
75 DISALLOW_COPY_AND_ASSIGN(ProxyDelegate); | 76 DISALLOW_COPY_AND_ASSIGN(ProxyDelegate); |
76 }; | 77 }; |
77 | 78 |
78 } | 79 } |
79 | 80 |
80 #endif // NET_BASE_PROXY_DELEGATE_H_ | 81 #endif // NET_BASE_PROXY_DELEGATE_H_ |
OLD | NEW |