URLLoader::ProceedWithResponse has to be removed. |
|||
Issue descriptionThe following patch will introduce URLLoader::ProceedWithResponse() https://chromium-review.googlesource.com/c/chromium/src/+/753384/6 This is temporary and must be removed in the future. It is used when the NavigationMojoResponse feature is enabled. The goal is to be able to pause/resume a loading on the IO thread while the NavigationThrottle::WillProcessResponse() checks are done on the IU thread. There are a few reason for this. One of them is the way the ResourceHandler works. The MojoAsyncResourceHandler is behind the InterceptingResourceHandler. If the loading is not paused by the MojoAsyncResourceHandler, the loading continue and the InterceptingResourceHandler could receive OnResponseComplete() while checks are done on the UI thread. In this case the InterceptingResourceHandler can intercept and continue a deferred or blocked navigation. This will not be needed in the future and must be removed.
,
Jan 23 2018
In the old path, eventually ChromeResourceDispatcherHostDelegate::RequestComplete would be called. https://cs.chromium.org/chromium/src/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc?l=873 This would trigger (when appropriate) page_load_metrics::MetricsWebContentsObserver::OnRequestComplete However, when ProceedWithResponse is bypassed altogether, the page load metrics aren't recorded, and this causes some of the tests to be broken for the NetworkService: https://cs.chromium.org/chromium/src/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter?l=98 (See PageLoadMetricsBrowserTest) arthursonzogni@, do you have a suggestion for how to get the PageLoadMetrics working properly?
,
Jan 23 2018
,
Jan 23 2018
comment 2:
URLLoader::ProceedWithResponse() will be used with the feature "NavigationMojoResponse" (disabled by default).
So it is currently not used (it has never been used in the past) and it will not be used with the NetworkService either.
BTW, your tests are also working fine with "NavigationMojoResponse" enabled.
This bug was about URLLoader::ProceedWithResponse(), but I think you are talking about NavigationURLLoader::ProceedWithResponse(), right?
With the NetworkService, AFAIU the ResourceDispatcherHost(Delegate)/Resource{Loader,Handler} are no more used.
I took a look, page_load_metrics::MetricsWebContentsObserver::OnRequestComplete is is called by a ResourceDispatcherHostDelegate.
So that's why it is no more called.
I guess the ones implementing the NetworkService need to find a way to replace everything that was done in a ResourceDispatcherHostDelegate.
I don't have any "good" suggestions to give.
Maybe a passthrough NavigationThrottle can be added at the end and observe NavigationThrottle::WillProcessResponse?
|
|||
►
Sign in to add a comment |
|||
Comment 1 by bugdroid1@chromium.org
, Dec 21 2017