Chromium Code Reviews| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h |
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h |
| index 5bc7b57a8b9b61214535559f351d462ebba180d4..56279bdc5372e6d2d0361686b970abc000c5a671 100644 |
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h |
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h |
| @@ -42,6 +42,10 @@ class URLRequestContextGetter; |
| class URLRequestStatus; |
| } |
| +namespace previews { |
| +class PreviewsDecider; |
| +} |
| + |
| namespace data_reduction_proxy { |
| typedef base::Callback<void(const std::string&, |
| @@ -194,11 +198,13 @@ class DataReductionProxyConfig |
| // Returns true when Lo-Fi Previews should be activated. Records metrics for |
| // Lo-Fi state changes. |request| is used to get the network quality estimator |
| // from the URLRequestContext. |
| - bool ShouldEnableLoFi(const net::URLRequest& request); |
| + bool ShouldEnableLoFi(const net::URLRequest& request, |
| + previews::PreviewsDecider* previews_decider); |
|
megjablon
2017/05/09 19:58:33
Add comment for what |previews_decider| is for. Sa
RyanSturm
2017/05/09 22:35:19
Done.
|
| // Returns true when Lite Page Previews should be activated. |request| is used |
| // to get the network quality estimator from the URLRequestContext. |
| - bool ShouldEnableLitePages(const net::URLRequest& request); |
| + bool ShouldEnableLitePages(const net::URLRequest& request, |
| + previews::PreviewsDecider* previews_decider); |
| // Returns true if the data saver has been enabled by the user, and the data |
| // saver proxy is reachable. |
| @@ -294,15 +300,16 @@ class DataReductionProxyConfig |
| // Returns true when Lo-Fi Previews should be activated. Determines if Lo-Fi |
| // Previews should be activated by checking the Lo-Fi flags and if the network |
| // quality is prohibitively slow. |network_quality_estimator| may be NULL. |
| - bool ShouldEnableLoFiInternal( |
| - const net::NetworkQualityEstimator* network_quality_estimator); |
| + bool ShouldEnableLoFiInternal(const net::URLRequest& request, |
| + previews::PreviewsDecider* previews_decider); |
| // Returns true when Lite Page Previews should be activated. Determines if |
| // Lite Page Previewsmode should be activated by checking the Lite Page |
| // Previews flags and if the network quality is prohibitively slow. |
| // |network_quality_estimator| may be NULL. |
| bool ShouldEnableLitePagesInternal( |
| - const net::NetworkQualityEstimator* network_quality_estimator); |
| + const net::URLRequest& request, |
| + previews::PreviewsDecider* previews_decider); |
| // Returns true if the network quality is at least as poor as the one |
| // specified in the Auto Lo-Fi field trial parameters. |