| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_TEST_PROXY_DELEGATE_H_ | 5 #ifndef NET_BASE_TEST_PROXY_DELEGATE_H_ |
| 6 #define NET_BASE_TEST_PROXY_DELEGATE_H_ | 6 #define NET_BASE_TEST_PROXY_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "net/base/host_port_pair.h" | 10 #include "net/base/host_port_pair.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 void VerifyOnTunnelRequestCompleted(const std::string& endpoint, | 45 void VerifyOnTunnelRequestCompleted(const std::string& endpoint, |
| 46 const std::string& proxy_server) const; | 46 const std::string& proxy_server) const; |
| 47 | 47 |
| 48 void VerifyOnTunnelHeadersReceived(const std::string& origin, | 48 void VerifyOnTunnelHeadersReceived(const std::string& origin, |
| 49 const std::string& proxy_server, | 49 const std::string& proxy_server, |
| 50 const std::string& status_line) const; | 50 const std::string& status_line) const; |
| 51 | 51 |
| 52 // ProxyDelegate implementation: | 52 // ProxyDelegate implementation: |
| 53 void OnResolveProxy(const GURL& url, | 53 void OnResolveProxy(const GURL& url, |
| 54 const std::string& method, | 54 const std::string& method, |
| 55 int load_flags, | |
| 56 const ProxyService& proxy_service, | 55 const ProxyService& proxy_service, |
| 57 ProxyInfo* result) override; | 56 ProxyInfo* result) override; |
| 58 void OnTunnelConnectCompleted(const HostPortPair& endpoint, | 57 void OnTunnelConnectCompleted(const HostPortPair& endpoint, |
| 59 const HostPortPair& proxy_server, | 58 const HostPortPair& proxy_server, |
| 60 int net_error) override; | 59 int net_error) override; |
| 61 void OnFallback(const ProxyServer& bad_proxy, int net_error) override; | 60 void OnFallback(const ProxyServer& bad_proxy, int net_error) override; |
| 62 void OnBeforeTunnelRequest(const HostPortPair& proxy_server, | 61 void OnBeforeTunnelRequest(const HostPortPair& proxy_server, |
| 63 HttpRequestHeaders* extra_headers) override; | 62 HttpRequestHeaders* extra_headers) override; |
| 64 void OnTunnelHeadersReceived( | 63 void OnTunnelHeadersReceived( |
| 65 const HostPortPair& origin, | 64 const HostPortPair& origin, |
| 66 const HostPortPair& proxy_server, | 65 const HostPortPair& proxy_server, |
| 67 const HttpResponseHeaders& response_headers) override; | 66 const HttpResponseHeaders& response_headers) override; |
| 68 bool IsTrustedSpdyProxy(const net::ProxyServer& proxy_server) override; | 67 bool IsTrustedSpdyProxy(const net::ProxyServer& proxy_server) override; |
| 69 | 68 |
| 70 private: | 69 private: |
| 71 bool on_before_tunnel_request_called_; | 70 bool on_before_tunnel_request_called_; |
| 72 bool on_tunnel_request_completed_called_; | 71 bool on_tunnel_request_completed_called_; |
| 73 bool on_tunnel_headers_received_called_; | 72 bool on_tunnel_headers_received_called_; |
| 74 net::ProxyServer trusted_spdy_proxy_; | 73 net::ProxyServer trusted_spdy_proxy_; |
| 75 HostPortPair on_tunnel_request_completed_endpoint_; | 74 HostPortPair on_tunnel_request_completed_endpoint_; |
| 76 HostPortPair on_tunnel_request_completed_proxy_server_; | 75 HostPortPair on_tunnel_request_completed_proxy_server_; |
| 77 HostPortPair on_tunnel_headers_received_origin_; | 76 HostPortPair on_tunnel_headers_received_origin_; |
| 78 HostPortPair on_tunnel_headers_received_proxy_server_; | 77 HostPortPair on_tunnel_headers_received_proxy_server_; |
| 79 std::string on_tunnel_headers_received_status_line_; | 78 std::string on_tunnel_headers_received_status_line_; |
| 80 }; | 79 }; |
| 81 | 80 |
| 82 } // namespace net | 81 } // namespace net |
| 83 | 82 |
| 84 #endif // NET_BASE_TEST_PROXY_DELEGATE_H_ | 83 #endif // NET_BASE_TEST_PROXY_DELEGATE_H_ |
| OLD | NEW |