Chromium Code Reviews| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.h |
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.h |
| index a9da5b928fd1c8a92da4475a34fabc87fe7be742..d912dcb768f2deda44e9aa55835b7ec87a71799a 100644 |
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.h |
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.h |
| @@ -1,43 +1,53 @@ |
| // Copyright 2014 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_DELEGATE_H_ |
| #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_DELEGATE_H_ |
| #include "base/macros.h" |
| #include "net/base/proxy_delegate.h" |
| +#include "net/proxy/proxy_retry_info.h" |
| #include "url/gurl.h" |
| namespace net { |
| class HostPortPair; |
| class HttpRequestHeaders; |
| class HttpResponseHeaders; |
| +class NetLog; |
| +class ProxyConfig; |
| class ProxyInfo; |
| class ProxyServer; |
| class ProxyService; |
| class URLRequest; |
| } |
| namespace data_reduction_proxy { |
| +class DataReductionProxyBypassStats; |
| class DataReductionProxyConfig; |
| +class DataReductionProxyConfigurator; |
| +class DataReductionProxyEventCreator; |
| class DataReductionProxyRequestOptions; |
| class DataReductionProxyDelegate : public net::ProxyDelegate { |
| public: |
| // ProxyDelegate instance is owned by io_thread. |auth_handler| and |config| |
| // outlives this class instance. |
| explicit DataReductionProxyDelegate( |
| DataReductionProxyRequestOptions* request_options, |
| - DataReductionProxyConfig* config); |
| + DataReductionProxyConfig* config, |
| + const DataReductionProxyConfigurator* configurator, |
| + DataReductionProxyEventCreator* event_creator, |
| + DataReductionProxyBypassStats* bypass_stats, |
| + net::NetLog* net_log); |
| ~DataReductionProxyDelegate() override; |
| // net::ProxyDelegate implementation: |
| void OnResolveProxy(const GURL& url, |
| int load_flags, |
| const net::ProxyService& proxy_service, |
| net::ProxyInfo* result) override; |
| void OnFallback(const net::ProxyServer& bad_proxy, int net_error) override; |
| void OnBeforeSendHeaders(net::URLRequest* request, |
| @@ -50,17 +60,27 @@ class DataReductionProxyDelegate : public net::ProxyDelegate { |
| int net_error) override; |
| bool IsTrustedSpdyProxy(const net::ProxyServer& proxy_server) override; |
| void OnTunnelHeadersReceived( |
| const net::HostPortPair& origin, |
| const net::HostPortPair& proxy_server, |
| const net::HttpResponseHeaders& response_headers) override; |
| private: |
| DataReductionProxyRequestOptions* request_options_; |
| const DataReductionProxyConfig* config_; |
| + const DataReductionProxyConfigurator* configurator_; |
| + DataReductionProxyEventCreator* event_creator_; |
| + DataReductionProxyBypassStats* bypass_stats_; |
| + net::NetLog* net_log_; |
| DISALLOW_COPY_AND_ASSIGN(DataReductionProxyDelegate); |
| }; |
| +void OnResolveProxyHandler(const GURL& url, |
|
bengr
2016/02/08 23:23:29
Why is this visible? Can you just put this in an a
RyanSturm
2016/02/09 00:46:02
This is tested directly in a couple unittests: htt
|
| + int load_flags, |
| + const net::ProxyConfig& data_reduction_proxy_config, |
| + const net::ProxyRetryInfoMap& proxy_retry_info, |
| + const DataReductionProxyConfig* config, |
| + net::ProxyInfo* result); |
| } // namespace data_reduction_proxy |
| #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_DELEGATE_H_ |