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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 // OnCompleted or OnURLRequestDestroyed is called for this request. | 49 // OnCompleted or OnURLRequestDestroyed is called for this request. |
50 virtual void OnBeforeSendHeaders(URLRequest* request, | 50 virtual void OnBeforeSendHeaders(URLRequest* request, |
51 const ProxyInfo& proxy_info, | 51 const ProxyInfo& proxy_info, |
52 HttpRequestHeaders* headers) = 0; | 52 HttpRequestHeaders* headers) = 0; |
53 | 53 |
54 // Called immediately before a proxy tunnel request is sent. | 54 // Called immediately before a proxy tunnel request is sent. |
55 // Provides the embedder an opportunity to add extra request headers. | 55 // Provides the embedder an opportunity to add extra request headers. |
56 virtual void OnBeforeTunnelRequest(const HostPortPair& proxy_server, | 56 virtual void OnBeforeTunnelRequest(const HostPortPair& proxy_server, |
57 HttpRequestHeaders* extra_headers) = 0; | 57 HttpRequestHeaders* extra_headers) = 0; |
58 | 58 |
| 59 // Called when the connect attempt to a CONNECT proxy has completed. |
| 60 virtual void OnTunnelConnectCompleted(const HostPortPair& endpoint, |
| 61 const HostPortPair& proxy_server, |
| 62 int net_error) = 0; |
| 63 |
59 // Called after the response headers for the tunnel request are received. | 64 // Called after the response headers for the tunnel request are received. |
60 virtual void OnTunnelHeadersReceived( | 65 virtual void OnTunnelHeadersReceived( |
61 const HostPortPair& origin, | 66 const HostPortPair& origin, |
62 const HostPortPair& proxy_server, | 67 const HostPortPair& proxy_server, |
63 const HttpResponseHeaders& response_headers) = 0; | 68 const HttpResponseHeaders& response_headers) = 0; |
64 | 69 |
65 private: | 70 private: |
66 DISALLOW_COPY_AND_ASSIGN(ProxyDelegate); | 71 DISALLOW_COPY_AND_ASSIGN(ProxyDelegate); |
67 }; | 72 }; |
68 | 73 |
69 } | 74 } |
70 | 75 |
71 #endif // NET_BASE_PROXY_DELEGATE_H_ | 76 #endif // NET_BASE_PROXY_DELEGATE_H_ |
OLD | NEW |