Extensions+Network service: Requests made on behalf of a profile's request context are not proxied to WebRequest API. |
||||||
Issue description
This is the reason for failure of ExtensionWebRequestApiTest.WebRequestClientsGoogleComProtection with the network service.
Requests made by a browser from a profile's request context should be visible to the web request API. However this is not the case currently with network service. Reason is that requests made through the URLLoaderFactory obtained from the call to content::BrowserContext::GetDefaultStoragePartition(profile())
->GetURLLoaderFactoryForBrowserProcess() are not proxied through to the web request API.
This probably needs some plumbing similar to what is done for URLLoaderFactories relating to subresource loads and navigation requests. See WebRequestAPI::MaybeProxyURLLoaderFactory.
,
May 9 2018
Thanks.
,
May 10 2018
,
May 14 2018
,
May 29 2018
I'm not sure it's quite this simple though - I don't think we want WebRequest listeners to see arbitrary requests made by the browser process on the profile's behalf. It seems to me that features which need their requests to be visible to WebRequest should get their URLLoaderFactory elsewhere, or at least should have to explicitly opt-in to allowing interception so that StoragePartitionImpl can know it's OK to call ContentBrowserClient::WillCreateURLLoaderFactory (and thus possibly have proxies injected) before returning.
,
May 29 2018
>> I'm not sure it's quite this simple though - I don't think we want WebRequest listeners to see arbitrary requests made by the browser process on the profile's behalf. Isn't that the current behavior though? Unless the request is made from the system's request context.
,
Jun 1 2018
Huh, I guess you're right. We just filter sensitive hosts. OK, SGTM
,
Jun 1 2018
,
Jun 6 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/428b1d6eaee89f1f9caef8ee95aea358474a0448 commit 428b1d6eaee89f1f9caef8ee95aea358474a0448 Author: Ken Rockot <rockot@chromium.org> Date: Wed Jun 06 17:12:21 2018 Proxy browser requests through WebRequest API This enables browser-initiated requests to be proxied through the WebRequest API when the Network Service is enabled. Note that this only applies to requests made on via a profile's context, not the system context. This mirrors the behavior in the non-Network Service path today. Bug: 841002 Test: see buildbot filter changes Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo Change-Id: I1830959e1ba089974c546d933b4a6b51fb038779 Reviewed-on: https://chromium-review.googlesource.com/1083952 Commit-Queue: Ken Rockot <rockot@chromium.org> Reviewed-by: Karan Bhatia <karandeepb@chromium.org> Reviewed-by: John Abd-El-Malek <jam@chromium.org> Cr-Commit-Position: refs/heads/master@{#564937} [modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/chrome/browser/chrome_content_browser_client.cc [modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/chrome/browser/chrome_content_browser_client.h [modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/content/browser/frame_host/render_frame_host_impl.cc [modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/content/browser/loader/navigation_url_loader_impl.cc [modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/content/browser/storage_partition_impl.cc [modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/content/public/browser/content_browser_client.cc [modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/content/public/browser/content_browser_client.h [modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/extensions/browser/api/web_request/web_request_api.cc [modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.cc [modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.h [modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/extensions/shell/browser/shell_content_browser_client.cc [modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/extensions/shell/browser/shell_content_browser_client.h [modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter
,
Jun 6 2018
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by karandeepb@chromium.org
, May 8 2018Labels: -Pri-3 Pri-2
Owner: jam@chromium.org
Status: Assigned (was: Untriaged)