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 COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_DELEGA
TE_H_ | 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_DELEGA
TE_H_ |
6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_DELEGA
TE_H_ | 6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_DELEGA
TE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "net/base/proxy_delegate.h" | 9 #include "net/base/proxy_delegate.h" |
10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 class DataReductionProxyDelegate : public net::ProxyDelegate { | 27 class DataReductionProxyDelegate : public net::ProxyDelegate { |
28 public: | 28 public: |
29 // ProxyDelegate instance is owned by io_thread. |auth_handler| and |config| | 29 // ProxyDelegate instance is owned by io_thread. |auth_handler| and |config| |
30 // outlives this class instance. | 30 // outlives this class instance. |
31 explicit DataReductionProxyDelegate( | 31 explicit DataReductionProxyDelegate( |
32 DataReductionProxyRequestOptions* request_options, | 32 DataReductionProxyRequestOptions* request_options, |
33 DataReductionProxyConfig* config); | 33 DataReductionProxyConfig* config); |
34 | 34 |
35 ~DataReductionProxyDelegate() override; | 35 ~DataReductionProxyDelegate() override; |
36 | 36 |
| 37 // net::ProxyDelegate implementation: |
37 void OnResolveProxy(const GURL& url, | 38 void OnResolveProxy(const GURL& url, |
38 int load_flags, | 39 int load_flags, |
39 const net::ProxyService& proxy_service, | 40 const net::ProxyService& proxy_service, |
40 net::ProxyInfo* result) override; | 41 net::ProxyInfo* result) override; |
41 | |
42 void OnFallback(const net::ProxyServer& bad_proxy, int net_error) override; | 42 void OnFallback(const net::ProxyServer& bad_proxy, int net_error) override; |
43 | |
44 void OnBeforeSendHeaders(net::URLRequest* request, | 43 void OnBeforeSendHeaders(net::URLRequest* request, |
45 const net::ProxyInfo& proxy_info, | 44 const net::ProxyInfo& proxy_info, |
46 net::HttpRequestHeaders* headers) override; | 45 net::HttpRequestHeaders* headers) override; |
47 | |
48 void OnBeforeTunnelRequest(const net::HostPortPair& proxy_server, | 46 void OnBeforeTunnelRequest(const net::HostPortPair& proxy_server, |
49 net::HttpRequestHeaders* extra_headers) override; | 47 net::HttpRequestHeaders* extra_headers) override; |
50 | |
51 void OnTunnelConnectCompleted(const net::HostPortPair& endpoint, | 48 void OnTunnelConnectCompleted(const net::HostPortPair& endpoint, |
52 const net::HostPortPair& proxy_server, | 49 const net::HostPortPair& proxy_server, |
53 int net_error) override; | 50 int net_error) override; |
54 | 51 bool IsTrustedSpdyProxy(const net::ProxyServer& proxy_server) override; |
55 void OnTunnelHeadersReceived( | 52 void OnTunnelHeadersReceived( |
56 const net::HostPortPair& origin, | 53 const net::HostPortPair& origin, |
57 const net::HostPortPair& proxy_server, | 54 const net::HostPortPair& proxy_server, |
58 const net::HttpResponseHeaders& response_headers) override; | 55 const net::HttpResponseHeaders& response_headers) override; |
59 | 56 |
60 private: | 57 private: |
61 DataReductionProxyRequestOptions* request_options_; | 58 DataReductionProxyRequestOptions* request_options_; |
62 const DataReductionProxyConfig* config_; | 59 const DataReductionProxyConfig* config_; |
63 | 60 |
64 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyDelegate); | 61 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyDelegate); |
65 }; | 62 }; |
66 | 63 |
67 } // namespace data_reduction_proxy | 64 } // namespace data_reduction_proxy |
68 | 65 |
69 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_DEL
EGATE_H_ | 66 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_DEL
EGATE_H_ |
OLD | NEW |