Chromium Code Reviews| 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 // GetAlternativeProxy is called after the proxy is resolved but before the | |
|
RyanSturm
2016/08/19 19:03:23
s/GetAlternativeProxy is called/Called
tbansal1
2016/08/20 01:53:39
Done.
| |
| 72 // connection is established. |resolved_proxy_server| is the proxy server | |
| 73 // resolved by the proxy service for fetching |url|. GetAlternativeProxy | |
|
RyanSturm
2016/08/19 19:03:23
s/GetAlternativeProxy should set/ Sets
tbansal1
2016/08/20 01:53:39
Done.
| |
| 74 // should set |alternative_proxy_server| to an alternative proxy server, if | |
| 75 // one is available to fetch |url|. |alternative_proxy_server| is owned by | |
| 76 // the caller, and is guaranteed to be non-null. | |
| 77 virtual void GetAlternativeProxy( | |
| 78 const GURL& url, | |
| 79 const ProxyServer& resolved_proxy_server, | |
| 80 ProxyServer* alternative_proxy_server) const {} | |
| 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 |