OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_CONFIG
_H_ | 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_CONFIG
_H_ |
6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_CONFIG
_H_ | 6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_CONFIG
_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 // expired. If proxy is bypassed, retry_delay (if not NULL) returns the delay | 179 // expired. If proxy is bypassed, retry_delay (if not NULL) returns the delay |
180 // of proxy_server. If proxy is not bypassed, retry_delay is not assigned. | 180 // of proxy_server. If proxy is not bypassed, retry_delay is not assigned. |
181 bool IsProxyBypassed(const net::ProxyRetryInfoMap& retry_map, | 181 bool IsProxyBypassed(const net::ProxyRetryInfoMap& retry_map, |
182 const net::ProxyServer& proxy_server, | 182 const net::ProxyServer& proxy_server, |
183 base::TimeDelta* retry_delay) const; | 183 base::TimeDelta* retry_delay) const; |
184 | 184 |
185 // Check whether the |proxy_rules| contain any of the data reduction proxies. | 185 // Check whether the |proxy_rules| contain any of the data reduction proxies. |
186 virtual bool ContainsDataReductionProxy( | 186 virtual bool ContainsDataReductionProxy( |
187 const net::ProxyConfig::ProxyRules& proxy_rules) const; | 187 const net::ProxyConfig::ProxyRules& proxy_rules) const; |
188 | 188 |
189 // Returns true if the Data Reduction Proxy promo may be shown. This is not | |
190 // tied to whether the Data Reduction Proxy is enabled. | |
191 bool promo_allowed() const; | |
192 | |
193 // Sets |lofi_off_| to true. | 189 // Sets |lofi_off_| to true. |
194 void SetLoFiModeOff(); | 190 void SetLoFiModeOff(); |
195 | 191 |
196 // Returns |lofi_off_|. | 192 // Returns |lofi_off_|. |
197 bool lofi_off() const { return lofi_off_; } | 193 bool lofi_off() const { return lofi_off_; } |
198 | 194 |
199 // Returns true when Lo-Fi Previews should be activated. Records metrics for | 195 // Returns true when Lo-Fi Previews should be activated. Records metrics for |
200 // Lo-Fi state changes. |request| is used to get the network quality estimator | 196 // Lo-Fi state changes. |request| is used to get the network quality estimator |
201 // from the URLRequestContext. |previews_decider| is used to check if | 197 // from the URLRequestContext. |previews_decider| is used to check if |
202 // |request| is locally blacklisted. | 198 // |request| is locally blacklisted. |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 bool is_captive_portal_; | 464 bool is_captive_portal_; |
469 | 465 |
470 base::WeakPtrFactory<DataReductionProxyConfig> weak_factory_; | 466 base::WeakPtrFactory<DataReductionProxyConfig> weak_factory_; |
471 | 467 |
472 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyConfig); | 468 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyConfig); |
473 }; | 469 }; |
474 | 470 |
475 } // namespace data_reduction_proxy | 471 } // namespace data_reduction_proxy |
476 | 472 |
477 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_CON
FIG_H_ | 473 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_CON
FIG_H_ |
OLD | NEW |