New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 758136 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: 12
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 752616



Sign in to add a comment

PlzNavigate, Devtools: Blocking iframe requests happens after the response has been received.

Project Member Reported by arthurso...@chromium.org, Aug 23 2017

Issue description

Since https://codereview.chromium.org/1295903005, users of devtools can block specific network requests. See https://developers.google.com/web/updates/2017/04/devtools-release-notes#block-requests

With PlzNavigate and when the subresource is an iframe, the request is sent and blocked only afterwards. It needs to be blocked before. 

+CC dgozman@ FYI.
 
Description: Show this description
Cc: allada@chromium.org
allada@ is currently working on moving this feature to the new devtools request interceptor, so it makes sense to ensure that interceptor works with PlzNavigate as expected.
Blockedon: 752616
I am glad to hear that, it makes sense. I took a look at the design doc. https://docs.google.com/document/d/1nEN0SqC1jEpHgKuQPrppwSabC8JRAuJb7MSTGCe2Pzg/edit
The devtool request interceptor mainly lives on the browser-side in content/browser, which is nicer if we want it to work with PlzNavigate. It certainly works very well today. I saw in the design doc that PlzNavigate was taken into account.

So maybe it doesn't worth to try to fix it. It is probably better for me to take a look at devtools_url_request_interceptor instead and try to make it fail with PlzNavigate. Thanks!
Owner: caseq@chromium.org
After some discussion we have the following plan:
- move the implementation to browser;
- mark matching requests in renderer as "skip cache" to avoid the situation where the request does not reach the network at all.
Project Member

Comment 6 by bugdroid1@chromium.org, Nov 7 2017

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

commit 3030f2b45faa8314b2a2bc95788801df2572a828
Author: Andrey Kosyakov <caseq@chromium.org>
Date: Tue Nov 07 02:10:11 2017

DevTools: encapsulate navigation interception logic in request interceptor

This moved the logic to track and cancel navigation requsts from NetworkHandler
to DevToolsURLRequestInterceptor & co, so that the interface of interceptor to
NetworkHandler is much simpler. The overall goal is to untangle interceptor
from the network handler to make it reusable.

Bug: 758136
Change-Id: Idcecf2871ff4ebccdb1844910eaa4f63285fa581
Reviewed-on: https://chromium-review.googlesource.com/752055
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Alex Clarke <alexclarke@chromium.org>
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#514355}
[modify] https://crrev.com/3030f2b45faa8314b2a2bc95788801df2572a828/content/browser/devtools/devtools_interceptor_controller.cc
[modify] https://crrev.com/3030f2b45faa8314b2a2bc95788801df2572a828/content/browser/devtools/devtools_interceptor_controller.h
[modify] https://crrev.com/3030f2b45faa8314b2a2bc95788801df2572a828/content/browser/devtools/devtools_url_interceptor_request_job.cc
[modify] https://crrev.com/3030f2b45faa8314b2a2bc95788801df2572a828/content/browser/devtools/devtools_url_interceptor_request_job.h
[modify] https://crrev.com/3030f2b45faa8314b2a2bc95788801df2572a828/content/browser/devtools/devtools_url_request_interceptor.cc
[modify] https://crrev.com/3030f2b45faa8314b2a2bc95788801df2572a828/content/browser/devtools/devtools_url_request_interceptor.h
[modify] https://crrev.com/3030f2b45faa8314b2a2bc95788801df2572a828/content/browser/devtools/protocol/network_handler.cc
[modify] https://crrev.com/3030f2b45faa8314b2a2bc95788801df2572a828/content/browser/devtools/protocol/network_handler.h

Project Member

Comment 7 by bugdroid1@chromium.org, Nov 8 2017

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

commit 8945ee184364eccc91f0b18d90bbdf9cecdf8565
Author: Andrey Kosyakov <caseq@chromium.org>
Date: Wed Nov 08 01:04:13 2017

DevTools: extract a structure for intercepted request info sent to front-end

This reduces all the parameters request interceptor sends to front-end to
a single structure, which is then sent via a method of NetworkHandler.

Bug: 758136
Change-Id: I896d8467295d8130bfa9ab7b10fd47bdd096afc3
Reviewed-on: https://chromium-review.googlesource.com/752199
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Alex Clarke <alexclarke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#514691}
[modify] https://crrev.com/8945ee184364eccc91f0b18d90bbdf9cecdf8565/content/browser/devtools/devtools_url_interceptor_request_job.cc
[modify] https://crrev.com/8945ee184364eccc91f0b18d90bbdf9cecdf8565/content/browser/devtools/devtools_url_interceptor_request_job.h
[modify] https://crrev.com/8945ee184364eccc91f0b18d90bbdf9cecdf8565/content/browser/devtools/devtools_url_request_interceptor.cc
[modify] https://crrev.com/8945ee184364eccc91f0b18d90bbdf9cecdf8565/content/browser/devtools/devtools_url_request_interceptor.h
[modify] https://crrev.com/8945ee184364eccc91f0b18d90bbdf9cecdf8565/content/browser/devtools/protocol/network_handler.cc
[modify] https://crrev.com/8945ee184364eccc91f0b18d90bbdf9cecdf8565/content/browser/devtools/protocol/network_handler.h

Project Member

Comment 8 by bugdroid1@chromium.org, Nov 16 2017

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

commit 417adfb818795738bf5b32afea457b4ffe6495e3
Author: Andrey Kosyakov <caseq@chromium.org>
Date: Thu Nov 16 06:35:58 2017

DevTools: untangle request interceptor from network handler, make it reusable

This removes the dependency of DevToolsURLRequestInterceptor from NetworkHandler
(aside from couple of static methods) and replaces the instance of NetworkHandler
with a single callback. This also fixes crbug.com.777516 (managing active
interception job by target id), which would be a problem for multi-client mode.

Bug: 758136,  777516 
Change-Id: Ic065cb5c9683069ff115bbf06409f1e5cc7afcf4
Reviewed-on: https://chromium-review.googlesource.com/752502
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517002}
[modify] https://crrev.com/417adfb818795738bf5b32afea457b4ffe6495e3/content/browser/devtools/devtools_interceptor_controller.cc
[modify] https://crrev.com/417adfb818795738bf5b32afea457b4ffe6495e3/content/browser/devtools/devtools_interceptor_controller.h
[modify] https://crrev.com/417adfb818795738bf5b32afea457b4ffe6495e3/content/browser/devtools/devtools_url_interceptor_request_job.cc
[modify] https://crrev.com/417adfb818795738bf5b32afea457b4ffe6495e3/content/browser/devtools/devtools_url_interceptor_request_job.h
[modify] https://crrev.com/417adfb818795738bf5b32afea457b4ffe6495e3/content/browser/devtools/devtools_url_request_interceptor.cc
[modify] https://crrev.com/417adfb818795738bf5b32afea457b4ffe6495e3/content/browser/devtools/devtools_url_request_interceptor.h
[modify] https://crrev.com/417adfb818795738bf5b32afea457b4ffe6495e3/content/browser/devtools/protocol/network_handler.cc
[modify] https://crrev.com/417adfb818795738bf5b32afea457b4ffe6495e3/content/browser/devtools/protocol/network_handler.h

Owner: jarhar@chromium.org

Sign in to add a comment