Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h |
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h |
index 22a90a8397ef904afa505e90fc2191e04653bade..a763177b7e11c8a982a66107d3c2be47bb37babe 100644 |
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h |
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h |
@@ -36,6 +36,10 @@ class URLRequestContextGetter; |
class URLRequestInterceptor; |
} |
+namespace previews { |
+class PreviewsDecider; |
+} |
+ |
namespace data_reduction_proxy { |
class DataReductionProxyBypassStats; |
@@ -98,12 +102,18 @@ class DataReductionProxyIOData : public DataReductionProxyEventStorageDelegate { |
// Returns true when Lo-Fi Previews should be activated. When Lo-Fi is |
// active, URL requests are modified to request low fidelity versions of the |
// resources, except when the user is in the Lo-Fi control group. |
- bool ShouldEnableLoFi(const net::URLRequest& request); |
+ // |previews_decider| is a non-null object that determines eligibility of |
+ // showing the preview based on past opt outs. |
+ bool ShouldEnableLoFi(const net::URLRequest& request, |
+ previews::PreviewsDecider* previews_decider); |
// Returns true when Lite Page Previews should be activated. When Lite Pages |
// are active, a low fidelity transcoded page is requested on the main frame |
- // resource, except when the user is in the control group. |
- bool ShouldEnableLitePages(const net::URLRequest& request); |
+ // resource, except when the user is in the control group. |previews_decider| |
+ // is a non-null object that determines eligibility of showing the preview |
+ // based on past opt outs. |
+ bool ShouldEnableLitePages(const net::URLRequest& request, |
+ previews::PreviewsDecider* previews_decider); |
// Sets Lo-Fi mode off in |config_|. |
void SetLoFiModeOff(); |