Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4177)

Unified Diff: chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc

Issue 2864333003: Use the Previews Black List for server previews (Closed)
Patch Set: . Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/previews/previews_infobar_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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::
« no previous file with comments | « no previous file | chrome/browser/previews/previews_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698