Allow extensions to intercept service worker navigation preload requests.
Heavily based on an original CL by Charles Vazac <cvazac@akamai.com> at https://chromium-review.googlesource.com/c/chromium/src/+/1396938 Service worker navigation preload[1] is a web platform feature that involves sending a request to network at the same time as starting up the service worker for a navigation. This network request was not visible to extensions. This CL: - Modifies the network service path for service worker navigation preload requests so that the embedder is aware of them. - In web_request_permissions.cc, if a request is not considered a browser side navigation, it becomes opaque to extensions. This CL makes it so that service worker navigation preload requests[1] are exempted from that. This CL deletes the unit test for navigation preload in ServiceWorkerNavigationLoaderTest. It was too much hassle getting that to work with a TestWebContents because the infrastructure for enabling NetworkService in content_unittests is not set up yet so unittest_test_suite.cc typically disables NetworkService (issue 901092). We have sufficient navigation preload test coverage in browser tests and web tests. [1] https://w3c.github.io/ServiceWorker/#navigationpreloadmanager Bug: 914062 Change-Id: I4c91521e55c1103a1a67d973e595094b78357c34 Reviewed-on: https://chromium-review.googlesource.com/c/1491168Reviewed-by:Kinuko Yasuda <kinuko@chromium.org> Reviewed-by:
Varun Khaneja <vakh@chromium.org> Reviewed-by:
Karan Bhatia <karandeepb@chromium.org> Commit-Queue: Matt Falkenhagen <falken@chromium.org> Cr-Commit-Position: refs/heads/master@{#636598}
Showing
This diff is collapsed.
Please register or sign in to comment