| 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_NETWOR
K_DELEGATE_H_ | 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_NETWOR
K_DELEGATE_H_ |
| 6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_NETWOR
K_DELEGATE_H_ | 6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_NETWOR
K_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 const net::ProxyInfo& proxy_info, | 150 const net::ProxyInfo& proxy_info, |
| 151 const net::ProxyRetryInfoMap& proxy_retry_info) const; | 151 const net::ProxyRetryInfoMap& proxy_retry_info) const; |
| 152 | 152 |
| 153 // May add Brotli to Accept Encoding request header if |proxy_info| contains | 153 // May add Brotli to Accept Encoding request header if |proxy_info| contains |
| 154 // a proxy server that is expected to support Brotli encoding. | 154 // a proxy server that is expected to support Brotli encoding. |
| 155 void MaybeAddBrotliToAcceptEncodingHeader( | 155 void MaybeAddBrotliToAcceptEncodingHeader( |
| 156 const net::ProxyInfo& proxy_info, | 156 const net::ProxyInfo& proxy_info, |
| 157 net::HttpRequestHeaders* request_headers, | 157 net::HttpRequestHeaders* request_headers, |
| 158 const net::URLRequest& request) const; | 158 const net::URLRequest& request) const; |
| 159 | 159 |
| 160 // May add chrome-proxy-ect header to |request_headers| if adding of |
| 161 // chrome-proxy-ect is enabled via field trial and a valid estimate of |
| 162 // network quality is available. This method should be called only when the |
| 163 // resolved proxy for |request| is a data saver proxy. |
| 164 void MaybeAddChromeProxyECTHeader(net::HttpRequestHeaders* request_headers, |
| 165 const net::URLRequest& request) const; |
| 166 |
| 167 // Removes the chrome-proxy-ect header from |request_headers|. |
| 168 void RemoveChromeProxyECTHeader( |
| 169 net::HttpRequestHeaders* request_headers) const; |
| 170 |
| 160 // All raw Data Reduction Proxy pointers must outlive |this|. | 171 // All raw Data Reduction Proxy pointers must outlive |this|. |
| 161 DataReductionProxyConfig* data_reduction_proxy_config_; | 172 DataReductionProxyConfig* data_reduction_proxy_config_; |
| 162 | 173 |
| 163 DataReductionProxyBypassStats* data_reduction_proxy_bypass_stats_; | 174 DataReductionProxyBypassStats* data_reduction_proxy_bypass_stats_; |
| 164 | 175 |
| 165 DataReductionProxyRequestOptions* data_reduction_proxy_request_options_; | 176 DataReductionProxyRequestOptions* data_reduction_proxy_request_options_; |
| 166 | 177 |
| 167 DataReductionProxyIOData* data_reduction_proxy_io_data_; | 178 DataReductionProxyIOData* data_reduction_proxy_io_data_; |
| 168 | 179 |
| 169 const DataReductionProxyConfigurator* configurator_; | 180 const DataReductionProxyConfigurator* configurator_; |
| 170 | 181 |
| 171 std::unique_ptr<DataUseGroupProvider> data_use_group_provider_; | 182 std::unique_ptr<DataUseGroupProvider> data_use_group_provider_; |
| 172 | 183 |
| 173 base::ThreadChecker thread_checker_; | 184 base::ThreadChecker thread_checker_; |
| 174 | 185 |
| 175 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyNetworkDelegate); | 186 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyNetworkDelegate); |
| 176 }; | 187 }; |
| 177 } // namespace data_reduction_proxy | 188 } // namespace data_reduction_proxy |
| 178 | 189 |
| 179 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_NET
WORK_DELEGATE_H_ | 190 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_NET
WORK_DELEGATE_H_ |
| OLD | NEW |