| Index: chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
|
| diff --git a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
|
| index d4204d7ed729d9b20ac3a5b4bc5749c1110507b6..7745c58602d81c83730216d5f5aafcba7f0eff80 100644
|
| --- a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
|
| +++ b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
|
| @@ -66,6 +66,7 @@
|
| #include "content/public/browser/service_worker_context.h"
|
| #include "content/public/browser/stream_info.h"
|
| #include "content/public/browser/web_contents.h"
|
| +#include "content/public/common/previews_state.h"
|
| #include "content/public/common/resource_response.h"
|
| #include "extensions/features/features.h"
|
| #include "net/base/load_flags.h"
|
| @@ -828,16 +829,19 @@ void ChromeResourceDispatcherHostDelegate::RequestComplete(
|
| base::TimeTicks::Now() - url_request->creation_time()));
|
| }
|
|
|
| -bool ChromeResourceDispatcherHostDelegate::ShouldEnableLoFiMode(
|
| +int ChromeResourceDispatcherHostDelegate::GetPreviewsState(
|
| const net::URLRequest& url_request,
|
| content::ResourceContext* resource_context) {
|
| ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
|
| data_reduction_proxy::DataReductionProxyIOData* data_reduction_proxy_io_data =
|
| io_data->data_reduction_proxy_io_data();
|
|
|
| - if (data_reduction_proxy_io_data)
|
| - return data_reduction_proxy_io_data->ShouldEnableLoFiMode(url_request);
|
| - return false;
|
| + if (data_reduction_proxy_io_data) {
|
| + return data_reduction_proxy_io_data->ShouldEnableLoFiMode(url_request)
|
| + ? content::SERVER_LOFI_ON
|
| + : content::PREVIEWS_OFF;
|
| + }
|
| + return content::PREVIEWS_OFF;
|
| }
|
|
|
| // static
|
|
|