| Index: content/browser/loader/resource_dispatcher_host_impl.cc | 
| diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc | 
| index e9253e595a21d1f12280603be819bcb609ea01ea..5e3a877224c199604ca9b9c63175c3a500127e08 100644 | 
| --- a/content/browser/loader/resource_dispatcher_host_impl.cc | 
| +++ b/content/browser/loader/resource_dispatcher_host_impl.cc | 
| @@ -358,14 +358,17 @@ void LogResourceRequestTimeOnUI( | 
| } | 
| } | 
|  | 
| -bool IsUsingLoFi(LoFiState lofi_state, | 
| -                 ResourceDispatcherHostDelegate* delegate, | 
| -                 const net::URLRequest& request, | 
| -                 ResourceContext* resource_context, | 
| -                 bool is_main_frame) { | 
| -  if (lofi_state == LOFI_UNSPECIFIED && delegate && is_main_frame) | 
| -    return delegate->ShouldEnableLoFiMode(request, resource_context); | 
| -  return lofi_state == LOFI_ON; | 
| +int GetPreviewsState(int previews_state, | 
| +                     ResourceDispatcherHostDelegate* delegate, | 
| +                     const net::URLRequest& request, | 
| +                     ResourceContext* resource_context, | 
| +                     bool is_main_frame) { | 
| +  // previews_state is set to PREVIEWS_OFF when reloading with Lo-Fi disabled. | 
| +  // A previews_state of zero means that the state has not been set, and the | 
| +  // browser process should decide whether or not to request Preview types. | 
| +  if (previews_state == 0 && delegate && is_main_frame) | 
| +    return delegate->GetPreviewsState(request, resource_context); | 
| +  return previews_state; | 
| } | 
|  | 
| // The following functions simplify code paths where the UI thread notifies the | 
| @@ -1559,9 +1562,9 @@ void ResourceDispatcherHostImpl::ContinuePendingBeginRequest( | 
| do_not_prompt_for_login, request_data.referrer_policy, | 
| request_data.visibility_state, resource_context, report_raw_headers, | 
| !is_sync_load, | 
| -      IsUsingLoFi(request_data.lofi_state, delegate_, *new_request, | 
| -                  resource_context, | 
| -                  request_data.resource_type == RESOURCE_TYPE_MAIN_FRAME), | 
| +      GetPreviewsState(request_data.previews_state, delegate_, *new_request, | 
| +                       resource_context, | 
| +                       request_data.resource_type == RESOURCE_TYPE_MAIN_FRAME), | 
| support_async_revalidation ? request_data.headers : std::string(), | 
| request_data.request_body, request_data.initiated_in_secure_context); | 
| // Request takes ownership. | 
| @@ -1851,6 +1854,7 @@ ResourceRequestInfoImpl* ResourceDispatcherHostImpl::CreateRequestInfo( | 
| int child_id, | 
| int render_view_route_id, | 
| int render_frame_route_id, | 
| +    int previews_state, | 
| bool download, | 
| ResourceContext* context) { | 
| return new ResourceRequestInfoImpl( | 
| @@ -1871,12 +1875,12 @@ ResourceRequestInfoImpl* ResourceDispatcherHostImpl::CreateRequestInfo( | 
| false,     // do_not_prompt_for_login | 
| blink::WebReferrerPolicyDefault, blink::WebPageVisibilityStateVisible, | 
| context, | 
| -      false,          // report_raw_headers | 
| -      true,           // is_async | 
| -      false,          // is_using_lofi | 
| -      std::string(),  // original_headers | 
| -      nullptr,        // body | 
| -      false);         // initiated_in_secure_context | 
| +      false,           // report_raw_headers | 
| +      true,            // is_async | 
| +      previews_state,  // previews_state | 
| +      std::string(),   // original_headers | 
| +      nullptr,         // body | 
| +      false);          // initiated_in_secure_context | 
| } | 
|  | 
| void ResourceDispatcherHostImpl::OnRenderViewHostCreated(int child_id, | 
| @@ -2244,9 +2248,9 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest( | 
| // same mechanism as the cookie one. | 
| blink::WebPageVisibilityStateVisible, resource_context, | 
| info.report_raw_headers, | 
| -      true,  // is_async | 
| -      IsUsingLoFi(info.common_params.lofi_state, delegate_, *new_request, | 
| -                  resource_context, info.is_main_frame), | 
| +      true,   // is_async | 
| +      GetPreviewsState(info.common_params.previews_state, delegate_, | 
| +                       *new_request, resource_context, info.is_main_frame), | 
| // The original_headers field is for stale-while-revalidate but the | 
| // feature doesn't work with PlzNavigate, so it's just a placeholder | 
| // here. | 
| @@ -2419,15 +2423,16 @@ void ResourceDispatcherHostImpl::InitializeURLRequest( | 
| int render_process_host_id, | 
| int render_view_routing_id, | 
| int render_frame_routing_id, | 
| +    int previews_state, | 
| ResourceContext* context) { | 
| DCHECK_CURRENTLY_ON(BrowserThread::IO); | 
| DCHECK(!request->is_pending()); | 
|  | 
| SetReferrerForRequest(request, referrer); | 
|  | 
| -  ResourceRequestInfoImpl* info = | 
| -      CreateRequestInfo(render_process_host_id, render_view_routing_id, | 
| -                        render_frame_routing_id, is_download, context); | 
| +  ResourceRequestInfoImpl* info = CreateRequestInfo( | 
| +      render_process_host_id, render_view_routing_id, render_frame_routing_id, | 
| +      previews_state, is_download, context); | 
| // Request takes ownership. | 
| info->AssociateWithRequest(request); | 
| } | 
|  |