| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc
|
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc
|
| index 6752c415e7861dbec641209707bdcbf868b57226..dcba55a78278e4d2969d01def100cdde46f86960 100644
|
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc
|
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc
|
| @@ -380,10 +380,17 @@ void DataReductionProxyNetworkDelegate::OnCompletedInternal(
|
| net_error);
|
|
|
| net::HttpRequestHeaders request_headers;
|
| - if (data_reduction_proxy_io_data_ && request->response_headers() &&
|
| - IsEmptyImagePreview(*(request->response_headers()))) {
|
| + bool server_lofi = data_reduction_proxy_io_data_ &&
|
| + request->response_headers() &&
|
| + IsEmptyImagePreview(*(request->response_headers()));
|
| + bool client_lofi =
|
| + !server_lofi && data_reduction_proxy_io_data_ &&
|
| + data_reduction_proxy_io_data_->lofi_decider() &&
|
| + data_reduction_proxy_io_data_->lofi_decider()->IsClientLoFiImageRequest(
|
| + *request);
|
| + if (server_lofi || client_lofi) {
|
| data_reduction_proxy_io_data_->lofi_ui_service()->OnLoFiReponseReceived(
|
| - *request);
|
| + *request, server_lofi /* is_server_lofi */);
|
| } else if (data_reduction_proxy_io_data_ && request->response_headers() &&
|
| IsLitePagePreview(*(request->response_headers()))) {
|
| RecordLitePageTransformationType(LITE_PAGE);
|
|
|