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 154f28f0fc415a463a836944ad95249484fa5bc8..d29edfedb72b17b013d97591b35c9fe9fa95b8c5 100644 |
--- a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc |
+++ b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc |
@@ -863,12 +863,21 @@ content::PreviewsState ChromeResourceDispatcherHostDelegate::GetPreviewsState( |
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) |
- ? content::SERVER_LOFI_ON |
- : content::PREVIEWS_OFF; |
+ content::PreviewsState previews_state = content::PREVIEWS_UNSPECIFIED; |
bengr
2017/02/15 00:03:47
Why do you need separate values for UNSPECIFIED an
megjablon
2017/02/16 04:29:09
For requesting the original page with previews off
|
+ |
+ if (data_reduction_proxy_io_data && |
bengr
2017/02/15 00:03:47
Style nit:
if (drp_io_data) {
if (drp_io_data->
megjablon
2017/02/16 04:29:09
Done.
|
+ data_reduction_proxy_io_data->ShouldEnableLoFi(url_request)) { |
+ previews_state |= content::SERVER_LOFI_ON; |
+ } |
+ |
+ if (data_reduction_proxy_io_data && |
+ data_reduction_proxy_io_data->ShouldEnableLitePages(url_request)) { |
+ previews_state |= content::SERVER_LITE_PAGE_ON; |
} |
- return content::PREVIEWS_OFF; |
+ |
+ if (previews_state == content::PREVIEWS_UNSPECIFIED) |
+ return content::PREVIEWS_OFF; |
+ return previews_state; |
} |
// static |