New issue
Advanced search Search tips

Issue 782922 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Task



Sign in to add a comment

PreviewsState update from mainframe response should be moved out of renderer (refactor)

Project Member Reported by dougarnett@chromium.org, Nov 8 2017

Issue description

There is logic in ContentPreviewsRenderFrameObserver::GetPreviewsStateFromResponse to look at headers and decide how to update server-oriented PreviewsState bits. This logic should be moved up to ChromeResourceDispatcherHostDelegate::OnResponseStarted() so that PreviewsState can be updated for both browser and render processes.

This would allow us to check same type of header objects for flywheel protocol (ie, not check webkit headers) and skip header check in PreviewsInfoBarTabHelper.

 
Labels: -Pri-3 M-65 Pri-1
Actually, for adding NoScript Preview (or other client side previews), we will need to make the PreviewsState update decision in I/O thread upon starting the response and plumb single outcome to both renderer (for WebURLResponse) and UI thread (NavigationData for PreviewsInfoBar). It may be that ChromeResourceDispatcherHostDelegate::GetNavigationData() is the better place to make this update with the current layering constraints. [Alternatively, we could consider moving DataReductionProxyNetworkDelegate (and the previews component) out of layered core components and into content aware code.]
Status: Started (was: Assigned)

Comment 3 by efoo@chromium.org, Dec 5 2017

Components: Blink>Previews

Comment 4 by efoo@chromium.org, Dec 5 2017

Components: -UI>Browser>Previews
dougarnett, is this correctly marked as a P1?
Labels: -Pri-1 Pri-2
Setting as P2 - only an issue for launching NoScript
Project Member

Comment 7 by bugdroid1@chromium.org, Dec 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1921bb351242e3ada575cc85858957f9c56106a8

commit 1921bb351242e3ada575cc85858957f9c56106a8
Author: Doug Arnett <dougarnett@chromium.org>
Date: Wed Dec 13 06:59:34 2017

Makes navigation commit-time decision for previews in one location

This is a refactor to consolidate the commit-time previews decision
in one place (in ChromeResourceDispatcherHostDelegate) for both
server-determined and client-determined previews with propagation
of decision to renderer (via PreviewsState in mainframe response
info) and UI thread (via PreviewsUserData).

Bug:  782922 , 725645
Change-Id: I8f7e5ef3a8a45b9ba2e1bbc07f09bfb9670e16b1
Reviewed-on: https://chromium-review.googlesource.com/807305
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Reviewed-by: Scott Little <sclittle@chromium.org>
Reviewed-by: Ryan Sturm <ryansturm@chromium.org>
Commit-Queue: Doug Arnett <dougarnett@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523705}
[modify] https://crrev.com/1921bb351242e3ada575cc85858957f9c56106a8/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
[modify] https://crrev.com/1921bb351242e3ada575cc85858957f9c56106a8/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.h
[modify] https://crrev.com/1921bb351242e3ada575cc85858957f9c56106a8/chrome/browser/loader/chrome_resource_dispatcher_host_delegate_unittest.cc
[modify] https://crrev.com/1921bb351242e3ada575cc85858957f9c56106a8/chrome/browser/previews/previews_infobar_tab_helper.cc
[modify] https://crrev.com/1921bb351242e3ada575cc85858957f9c56106a8/chrome/browser/previews/previews_infobar_tab_helper_unittest.cc
[modify] https://crrev.com/1921bb351242e3ada575cc85858957f9c56106a8/components/data_reduction_proxy/content/browser/content_lofi_decider.cc
[modify] https://crrev.com/1921bb351242e3ada575cc85858957f9c56106a8/components/data_reduction_proxy/content/browser/content_lofi_decider.h
[modify] https://crrev.com/1921bb351242e3ada575cc85858957f9c56106a8/components/data_reduction_proxy/content/browser/content_lofi_decider_unittest.cc
[modify] https://crrev.com/1921bb351242e3ada575cc85858957f9c56106a8/components/data_reduction_proxy/content/renderer/content_previews_render_frame_observer.cc
[modify] https://crrev.com/1921bb351242e3ada575cc85858957f9c56106a8/components/data_reduction_proxy/content/renderer/content_previews_render_frame_observer.h
[modify] https://crrev.com/1921bb351242e3ada575cc85858957f9c56106a8/components/data_reduction_proxy/content/renderer/content_previews_render_frame_observer_unittest.cc
[modify] https://crrev.com/1921bb351242e3ada575cc85858957f9c56106a8/components/previews/content/previews_content_util.cc
[modify] https://crrev.com/1921bb351242e3ada575cc85858957f9c56106a8/components/previews/content/previews_content_util.h
[modify] https://crrev.com/1921bb351242e3ada575cc85858957f9c56106a8/components/previews/content/previews_content_util_unittest.cc
[modify] https://crrev.com/1921bb351242e3ada575cc85858957f9c56106a8/components/previews/core/previews_user_data.cc
[modify] https://crrev.com/1921bb351242e3ada575cc85858957f9c56106a8/components/previews/core/previews_user_data.h
[modify] https://crrev.com/1921bb351242e3ada575cc85858957f9c56106a8/content/browser/loader/mojo_async_resource_handler_unittest.cc
[modify] https://crrev.com/1921bb351242e3ada575cc85858957f9c56106a8/content/browser/loader/resource_dispatcher_host_browsertest.cc
[modify] https://crrev.com/1921bb351242e3ada575cc85858957f9c56106a8/content/browser/loader/resource_dispatcher_host_impl.cc
[modify] https://crrev.com/1921bb351242e3ada575cc85858957f9c56106a8/content/public/browser/resource_dispatcher_host_delegate.cc
[modify] https://crrev.com/1921bb351242e3ada575cc85858957f9c56106a8/content/public/browser/resource_dispatcher_host_delegate.h

Status: Fixed (was: Started)

Sign in to add a comment