| 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 0a2881c3935ddbf8f5c5a81cb02c0d8df8bbb334..2eae237170a48804a8578e64674fccf4c0389a02 100644
|
| --- a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
|
| +++ b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
|
| @@ -891,18 +891,22 @@ content::PreviewsState ChromeResourceDispatcherHostDelegate::GetPreviewsState(
|
|
|
| content::PreviewsState previews_state = content::PREVIEWS_UNSPECIFIED;
|
|
|
| - if (data_reduction_proxy_io_data) {
|
| - if (data_reduction_proxy_io_data->ShouldEnableLoFi(url_request))
|
| + previews::PreviewsIOData* previews_io_data = io_data->previews_io_data();
|
| + if (data_reduction_proxy_io_data && previews_io_data) {
|
| + if (data_reduction_proxy_io_data->ShouldEnableLoFi(url_request,
|
| + previews_io_data)) {
|
| previews_state |= content::SERVER_LOFI_ON;
|
| - if (data_reduction_proxy_io_data->ShouldEnableLitePages(url_request))
|
| + }
|
| + if (data_reduction_proxy_io_data->ShouldEnableLitePages(url_request,
|
| + previews_io_data)) {
|
| previews_state |= content::SERVER_LITE_PAGE_ON;
|
| + }
|
|
|
| - previews::PreviewsIOData* previews_io_data = io_data->previews_io_data();
|
| // Check that data saver is enabled, the user isn't opted out of LoFi for
|
| // the session, and the user is eligible for previews.
|
| if (data_reduction_proxy_io_data->IsEnabled() &&
|
| !data_reduction_proxy_io_data->config()->lofi_off() &&
|
| - previews_io_data && previews::params::IsClientLoFiEnabled() &&
|
| + previews::params::IsClientLoFiEnabled() &&
|
| previews_io_data->ShouldAllowPreviewAtECT(
|
| url_request, previews::PreviewsType::LOFI,
|
| previews::params::
|
|
|