When resource loading hints are received, Blink should block the loading of the resources specified in the resource loading hints.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/14283672631cb8dcaefe140817d6f9a74f133ced commit 14283672631cb8dcaefe140817d6f9a74f133ced Author: Tarun Bansal <tbansal@chromium.org> Date: Mon Jul 16 20:02:47 2018 Send UI service provided resource loading hints to renderer Currently, we send an empty string as a resource loading hint to the renderer when doing previews resource loading hints optimization. This CL changes the browser's behavior to send the resource loading hints that are provided by Previews UI service. The CL also enables browsertest to modify the list of hints that are sent to the renderer. This will be used in a browsertest in a subsequent CL to verify that subresources that match the pattern are not loaded. Bug: 856243 , 856247 Change-Id: I29a393dd37090fcb8dc5706669e88e0ae91f47db Reviewed-on: https://chromium-review.googlesource.com/1136885 Reviewed-by: Ryan Sturm <ryansturm@chromium.org> Commit-Queue: Tarun Bansal <tbansal@chromium.org> Cr-Commit-Position: refs/heads/master@{#575395} [modify] https://crrev.com/14283672631cb8dcaefe140817d6f9a74f133ced/chrome/browser/previews/resource_loading_hints/resource_loading_hints_browsertest.cc [modify] https://crrev.com/14283672631cb8dcaefe140817d6f9a74f133ced/chrome/browser/previews/resource_loading_hints/resource_loading_hints_web_contents_observer.cc [modify] https://crrev.com/14283672631cb8dcaefe140817d6f9a74f133ced/chrome/browser/previews/resource_loading_hints/resource_loading_hints_web_contents_observer.h [modify] https://crrev.com/14283672631cb8dcaefe140817d6f9a74f133ced/components/previews/content/previews_ui_service.cc [modify] https://crrev.com/14283672631cb8dcaefe140817d6f9a74f133ced/components/previews/content/previews_ui_service.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/833dac7668fd47051c7955e2f23eb1590eec0556 commit 833dac7668fd47051c7955e2f23eb1590eec0556 Author: Tarun Bansal <tbansal@chromium.org> Date: Fri Jul 20 16:37:13 2018 Disable loading of subresources based on previews resource loading hints Currently, the browser provides the renderer with previews resource loading hints when the relevant experiment is enabled. This CL adds logic to disable loading of subresources when their URL matches the provided resource loading hints. The CL does not provide appropriate plumbing to dev tools when a resource load is blocked. That plumbing would be completed in a subsequent CL. Change-Id: I7df4db03cfa39e569c7641a1bd72406038e24b21 Bug: 856247 , 854666 Reviewed-on: https://chromium-review.googlesource.com/1139903 Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Doug Arnett <dougarnett@chromium.org> Commit-Queue: Tarun Bansal <tbansal@chromium.org> Cr-Commit-Position: refs/heads/master@{#576898} [modify] https://crrev.com/833dac7668fd47051c7955e2f23eb1590eec0556/chrome/browser/previews/resource_loading_hints/resource_loading_hints_browsertest.cc [modify] https://crrev.com/833dac7668fd47051c7955e2f23eb1590eec0556/chrome/test/data/previews/resource_loading_hints.html [modify] https://crrev.com/833dac7668fd47051c7955e2f23eb1590eec0556/chrome/test/data/previews/resource_loading_hints_with_no_transform_header.html [modify] https://crrev.com/833dac7668fd47051c7955e2f23eb1590eec0556/third_party/blink/renderer/core/BUILD.gn [modify] https://crrev.com/833dac7668fd47051c7955e2f23eb1590eec0556/third_party/blink/renderer/core/frame/local_frame.cc [modify] https://crrev.com/833dac7668fd47051c7955e2f23eb1590eec0556/third_party/blink/renderer/core/loader/BUILD.gn [modify] https://crrev.com/833dac7668fd47051c7955e2f23eb1590eec0556/third_party/blink/renderer/core/loader/base_fetch_context.cc [modify] https://crrev.com/833dac7668fd47051c7955e2f23eb1590eec0556/third_party/blink/renderer/core/loader/base_fetch_context.h [modify] https://crrev.com/833dac7668fd47051c7955e2f23eb1590eec0556/third_party/blink/renderer/core/loader/base_fetch_context_test.cc [modify] https://crrev.com/833dac7668fd47051c7955e2f23eb1590eec0556/third_party/blink/renderer/core/loader/document_loader.cc [modify] https://crrev.com/833dac7668fd47051c7955e2f23eb1590eec0556/third_party/blink/renderer/core/loader/document_loader.h [modify] https://crrev.com/833dac7668fd47051c7955e2f23eb1590eec0556/third_party/blink/renderer/core/loader/frame_fetch_context.cc [modify] https://crrev.com/833dac7668fd47051c7955e2f23eb1590eec0556/third_party/blink/renderer/core/loader/frame_fetch_context.h [add] https://crrev.com/833dac7668fd47051c7955e2f23eb1590eec0556/third_party/blink/renderer/core/loader/previews_resource_loading_hints.cc [add] https://crrev.com/833dac7668fd47051c7955e2f23eb1590eec0556/third_party/blink/renderer/core/loader/previews_resource_loading_hints.h [modify] https://crrev.com/833dac7668fd47051c7955e2f23eb1590eec0556/third_party/blink/renderer/core/loader/previews_resource_loading_hints_receiver_impl.cc [modify] https://crrev.com/833dac7668fd47051c7955e2f23eb1590eec0556/third_party/blink/renderer/core/loader/previews_resource_loading_hints_receiver_impl.h [add] https://crrev.com/833dac7668fd47051c7955e2f23eb1590eec0556/third_party/blink/renderer/core/loader/previews_resource_loading_hints_test.cc [modify] https://crrev.com/833dac7668fd47051c7955e2f23eb1590eec0556/third_party/blink/renderer/core/loader/worker_fetch_context.cc [modify] https://crrev.com/833dac7668fd47051c7955e2f23eb1590eec0556/third_party/blink/renderer/core/loader/worker_fetch_context.h
Comment 1 by tbansal@chromium.org
, Jun 25 2018