Chromium Code Reviews| 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 // Returns true if the request is bypassed by all configured data reduction | |
|
bengr
2014/07/16 01:40:10
Before more specific. Does this return true if and
megjablon
2014/07/16 23:07:14
Done.
| |
| 96 // proxies. | |
| 97 bool WereDataReductionProxiesBypassed(const net::URLRequest* request) const; | |
| 98 | |
| 95 // Returns the data reduction proxy primary origin. | 99 // Returns the data reduction proxy primary origin. |
| 96 const GURL& origin() const { | 100 const GURL& origin() const { |
| 97 return origin_; | 101 return origin_; |
| 98 } | 102 } |
| 99 | 103 |
| 100 // Returns the data reduction proxy fallback origin. | 104 // Returns the data reduction proxy fallback origin. |
| 101 const GURL& fallback_origin() const { | 105 const GURL& fallback_origin() const { |
| 102 return fallback_origin_; | 106 return fallback_origin_; |
| 103 } | 107 } |
| 104 | 108 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 199 bool alt_allowed_; | 203 bool alt_allowed_; |
| 200 const bool promo_allowed_; | 204 const bool promo_allowed_; |
| 201 | 205 |
| 202 bool configured_on_command_line_; | 206 bool configured_on_command_line_; |
| 203 | 207 |
| 204 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyParams); | 208 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyParams); |
| 205 }; | 209 }; |
| 206 | 210 |
| 207 } // namespace data_reduction_proxy | 211 } // namespace data_reduction_proxy |
| 208 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PARAMS_H _ | 212 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PARAMS_H _ |
| OLD | NEW |