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_BROWSER_DATA_REDUCTION_PROXY_PARAMS_H_ | 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PARAMS_H_ |
6 #define COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PARAMS_H_ | 6 #define COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PARAMS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // the proxy that matches. |proxy_info.proxy_servers.second| will contain the | 127 // the proxy that matches. |proxy_info.proxy_servers.second| will contain the |
128 // name of the data reduction proxy server that would be used if | 128 // name of the data reduction proxy server that would be used if |
129 // |proxy_info.proxy_server.first| is bypassed, if one exists. In addition, | 129 // |proxy_info.proxy_server.first| is bypassed, if one exists. In addition, |
130 // |proxy_info| will note if the proxy was a fallback, an alternative, or a | 130 // |proxy_info| will note if the proxy was a fallback, an alternative, or a |
131 // proxy for ssl; these are not mutually exclusive. |proxy_info| can be NULL | 131 // proxy for ssl; these are not mutually exclusive. |proxy_info| can be NULL |
132 // if the caller isn't interested in its values. Virtual for testing. | 132 // if the caller isn't interested in its values. Virtual for testing. |
133 virtual bool IsDataReductionProxy( | 133 virtual bool IsDataReductionProxy( |
134 const net::HostPortPair& host_port_pair, | 134 const net::HostPortPair& host_port_pair, |
135 DataReductionProxyTypeInfo* proxy_info) const; | 135 DataReductionProxyTypeInfo* proxy_info) const; |
136 | 136 |
137 // Returns true if this request will be sent through the data request proxy | |
138 // based on applying the param rules to the URL. We do not check bad proxy | |
139 // list. | |
140 virtual bool IsDataReductionProxyEligible(const net::URLRequest* request); | |
141 | |
142 // Returns true if this request would be bypassed by the data request proxy | 137 // Returns true if this request would be bypassed by the data request proxy |
143 // based on applying the |data_reduction_proxy_config| param rules to the | 138 // based on applying the |data_reduction_proxy_config| param rules to the |
144 // request URL. | 139 // request URL. |
145 bool IsBypassedByDataReductionProxyLocalRules( | 140 bool IsBypassedByDataReductionProxyLocalRules( |
146 const net::URLRequest& request, | 141 const net::URLRequest& request, |
147 const net::ProxyConfig& data_reduction_proxy_config) const; | 142 const net::ProxyConfig& data_reduction_proxy_config) const; |
148 | 143 |
149 // Checks if all configured data reduction proxies are in the retry map. | 144 // Checks if all configured data reduction proxies are in the retry map. |
150 // Returns true if the request is bypassed by all configured data reduction | 145 // Returns true if the request is bypassed by all configured data reduction |
151 // proxies and returns the bypass delay in delay_seconds (if not NULL). If | 146 // proxies and returns the bypass delay in delay_seconds (if not NULL). If |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 bool alt_allowed_; | 297 bool alt_allowed_; |
303 bool alt_fallback_allowed_; | 298 bool alt_fallback_allowed_; |
304 bool promo_allowed_; | 299 bool promo_allowed_; |
305 bool holdback_; | 300 bool holdback_; |
306 | 301 |
307 bool configured_on_command_line_; | 302 bool configured_on_command_line_; |
308 }; | 303 }; |
309 | 304 |
310 } // namespace data_reduction_proxy | 305 } // namespace data_reduction_proxy |
311 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PARAMS_H
_ | 306 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PARAMS_H
_ |
OLD | NEW |