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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
61 // Called after the response headers for the tunnel request are received. | 61 // Called after the response headers for the tunnel request are received. |
62 virtual void OnTunnelHeadersReceived( | 62 virtual void OnTunnelHeadersReceived( |
63 const HostPortPair& origin, | 63 const HostPortPair& origin, |
64 const HostPortPair& proxy_server, | 64 const HostPortPair& proxy_server, |
65 const HttpResponseHeaders& response_headers) = 0; | 65 const HttpResponseHeaders& response_headers) = 0; |
66 | 66 |
67 // Returns true if |proxy_server| is a trusted SPDY/HTTP2 proxy that is | 67 // Returns true if |proxy_server| is a trusted SPDY/HTTP2 proxy that is |
68 // allowed to push cross-origin resources. | 68 // allowed to push cross-origin resources. |
69 virtual bool IsTrustedSpdyProxy(const net::ProxyServer& proxy_server) = 0; | 69 virtual bool IsTrustedSpdyProxy(const net::ProxyServer& proxy_server) = 0; |
70 | 70 |
71 // Called after the proxy is resolved but before the connection is | |
72 // established. |resolved_proxy_server| is the proxy server resolved by the | |
73 // proxy service for fetching |url|. Sets |alternative_proxy_server| to an | |
74 // alternative proxy server, if one is available to fetch |url|. | |
75 // |alternative_proxy_server| is owned by the caller, and is guaranteed to be | |
76 // non-null. | |
77 virtual void GetAlternativeProxy( | |
78 const GURL& url, | |
79 const ProxyServer& resolved_proxy_server, | |
80 ProxyServer* alternative_proxy_server) const {} | |
Ryan Hamilton
2016/08/25 18:39:28
nit: The other methods in this class are pure so I
tbansal1
2016/08/25 18:42:02
Is it okay if I change the other methods to be not
Ryan Hamilton
2016/08/25 18:50:26
I think it's best to do it now because it forces u
tbansal1
2016/08/25 20:20:19
Going with your first suggestion of changing them
| |
81 | |
82 // Notifies the ProxyDelegate that |alternative_proxy_server| is broken. | |
83 virtual void OnAlternativeProxyBroken( | |
84 const ProxyServer& alternative_proxy_server) {} | |
85 | |
71 private: | 86 private: |
72 DISALLOW_COPY_AND_ASSIGN(ProxyDelegate); | 87 DISALLOW_COPY_AND_ASSIGN(ProxyDelegate); |
73 }; | 88 }; |
74 | 89 |
75 } | 90 } |
76 | 91 |
77 #endif // NET_BASE_PROXY_DELEGATE_H_ | 92 #endif // NET_BASE_PROXY_DELEGATE_H_ |
OLD | NEW |