| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // bypassed, if one exists. |proxy_servers| can be NULL if the caller isn't | 85 // bypassed, if one exists. |proxy_servers| can be NULL if the caller isn't |
| 86 // interested in its values. Virtual for testing. | 86 // interested in its values. Virtual for testing. |
| 87 virtual bool IsDataReductionProxy(const net::HostPortPair& host_port_pair, | 87 virtual bool IsDataReductionProxy(const net::HostPortPair& host_port_pair, |
| 88 std::pair<GURL, GURL>* proxy_servers) const; | 88 std::pair<GURL, GURL>* proxy_servers) const; |
| 89 | 89 |
| 90 // Returns true if this request will be sent through the data request proxy | 90 // Returns true if this request will be sent through the data request proxy |
| 91 // based on applying the param rules to the URL. We do not check bad proxy | 91 // based on applying the param rules to the URL. We do not check bad proxy |
| 92 // list. | 92 // list. |
| 93 virtual bool IsDataReductionProxyEligible(const net::URLRequest* request); | 93 virtual bool IsDataReductionProxyEligible(const net::URLRequest* request); |
| 94 | 94 |
| 95 // Checks if all configured data reduction proxies are in the retry map. |
| 96 // Returns true if the request is bypassed by all configured data reduction |
| 97 // proxies. If there are no configured data reduction proxies, returns false. |
| 98 bool WereDataReductionProxiesBypassed(const net::URLRequest* request) const; |
| 99 |
| 95 // Returns the data reduction proxy primary origin. | 100 // Returns the data reduction proxy primary origin. |
| 96 const GURL& origin() const { | 101 const GURL& origin() const { |
| 97 return origin_; | 102 return origin_; |
| 98 } | 103 } |
| 99 | 104 |
| 100 // Returns the data reduction proxy fallback origin. | 105 // Returns the data reduction proxy fallback origin. |
| 101 const GURL& fallback_origin() const { | 106 const GURL& fallback_origin() const { |
| 102 return fallback_origin_; | 107 return fallback_origin_; |
| 103 } | 108 } |
| 104 | 109 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 bool alt_allowed_; | 204 bool alt_allowed_; |
| 200 const bool promo_allowed_; | 205 const bool promo_allowed_; |
| 201 | 206 |
| 202 bool configured_on_command_line_; | 207 bool configured_on_command_line_; |
| 203 | 208 |
| 204 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyParams); | 209 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyParams); |
| 205 }; | 210 }; |
| 206 | 211 |
| 207 } // namespace data_reduction_proxy | 212 } // namespace data_reduction_proxy |
| 208 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PARAMS_H
_ | 213 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PARAMS_H
_ |
| OLD | NEW |