Implement WebPackage Prewarming, to enable near-instant loading of a document that's loaded as a WebPackage. Details are still TBD and this will also need spec changes. Design doc that mentions the ideas: https://docs.google.com/document/d/1zXEGCl3GI4JShJFkwq_7jsIcxJNjlPUgb0RW2Flqt-c/edit#
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0d0424e6f93cf283c1fd37e99669b7e9fd878fbd commit 0d0424e6f93cf283c1fd37e99669b7e9fd878fbd Author: Kinuko Yasuda <kinuko@chromium.org> Date: Wed Feb 07 10:31:08 2018 Clean-up prefetch-related request flags. - Changes RequestExtraData::is_prefetch to is_for_no_state_prefetch - Centralizes where we set load_flags |= LOAD_PREFETCH - (Not removing download_to_network_cache_only_ yet per the TODO comment in request_extra_data.cc) Bug: 803776 Change-Id: Ic579ab5d3c45898cc44727296d57354a85c2df14 Reviewed-on: https://chromium-review.googlesource.com/906048 Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Commit-Queue: Kinuko Yasuda <kinuko@chromium.org> Cr-Commit-Position: refs/heads/master@{#534976} [modify] https://crrev.com/0d0424e6f93cf283c1fd37e99669b7e9fd878fbd/content/renderer/loader/request_extra_data.cc [modify] https://crrev.com/0d0424e6f93cf283c1fd37e99669b7e9fd878fbd/content/renderer/loader/request_extra_data.h [modify] https://crrev.com/0d0424e6f93cf283c1fd37e99669b7e9fd878fbd/content/renderer/loader/web_url_loader_impl.cc [modify] https://crrev.com/0d0424e6f93cf283c1fd37e99669b7e9fd878fbd/content/renderer/loader/web_url_request_util.cc [modify] https://crrev.com/0d0424e6f93cf283c1fd37e99669b7e9fd878fbd/content/renderer/render_frame_impl.cc
https://chromium-review.googlesource.com/c/chromium/src/+/906088 is also a related preliminary change (I put wrong bug # in it)
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3e68ee7c15f32974f53053d6a688a67b13c80f7e commit 3e68ee7c15f32974f53053d6a688a67b13c80f7e Author: Kinuko Yasuda <kinuko@chromium.org> Date: Thu Feb 08 15:40:25 2018 Add browsertest for prefetch So that we can test prefetch behavior more closely. (Plan to add a few more tests if this looks good) Bug: 803776 Change-Id: I39c90bbfa6ed138486af84af1926974c02869168 Reviewed-on: https://chromium-review.googlesource.com/907918 Commit-Queue: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Cr-Commit-Position: refs/heads/master@{#535393} [add] https://crrev.com/3e68ee7c15f32974f53053d6a688a67b13c80f7e/content/browser/loader/prefetch_browsertest.cc [modify] https://crrev.com/3e68ee7c15f32974f53053d6a688a67b13c80f7e/content/test/BUILD.gn
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5e06da6ad2f2e8e6984fb5ed57c236ecc66b8a6e commit 5e06da6ad2f2e8e6984fb5ed57c236ecc66b8a6e Author: Kinuko Yasuda <kinuko@chromium.org> Date: Fri Feb 09 10:17:40 2018 Add more prefetch browser tests - Double-prefetch should result in single network hit - Prefetching No-Cache should populate the cache for a certain period - Prefetching No-Store does not populate the cache - Prefetch a resource with link rel=preload would also trigger the preload Would like to have these to make sure that new code we're adding won't break the detailed assumptions. (We could also have some of these as layout tests maybe later) Bug: 803776 Change-Id: I5be6b9b9661148ad6759c9fbd15c340cf19233a6 Reviewed-on: https://chromium-review.googlesource.com/910548 Reviewed-by: Tsuyoshi Horo <horo@chromium.org> Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Commit-Queue: Kinuko Yasuda <kinuko@chromium.org> Cr-Commit-Position: refs/heads/master@{#535680} [modify] https://crrev.com/5e06da6ad2f2e8e6984fb5ed57c236ecc66b8a6e/content/browser/loader/prefetch_browsertest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/32a2565d1192ae82cca71741eef1d2d204b89507 commit 32a2565d1192ae82cca71741eef1d2d204b89507 Author: Kinuko Yasuda <kinuko@chromium.org> Date: Mon Feb 19 08:14:25 2018 Propagate URLLoader options to WebPackageLoader - Decide when to call ProceedWithResponse depending on the loader option (rather than checking kNetworkService flag), so that the same loader code can run for subresource loading too - Decide when to return SSLInfo back also depending on the loader option Bug: 803774, 803776 Change-Id: I1e5d4bddcfc054339ca4cd4b83068af6c1d0ec24 Reviewed-on: https://chromium-review.googlesource.com/923664 Commit-Queue: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Tsuyoshi Horo <horo@chromium.org> Cr-Commit-Position: refs/heads/master@{#537598} [modify] https://crrev.com/32a2565d1192ae82cca71741eef1d2d204b89507/content/browser/loader/navigation_url_loader_network_service.cc [modify] https://crrev.com/32a2565d1192ae82cca71741eef1d2d204b89507/content/browser/loader/web_package_loader.cc [modify] https://crrev.com/32a2565d1192ae82cca71741eef1d2d204b89507/content/browser/loader/web_package_loader.h [modify] https://crrev.com/32a2565d1192ae82cca71741eef1d2d204b89507/content/browser/loader/web_package_request_handler.cc [modify] https://crrev.com/32a2565d1192ae82cca71741eef1d2d204b89507/content/browser/loader/web_package_request_handler.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/db67b537f7c3bef2b5647a9f29295c8e593c0972 commit db67b537f7c3bef2b5647a9f29295c8e593c0972 Author: Kinuko Yasuda <kinuko@chromium.org> Date: Mon Feb 19 09:11:52 2018 Introduce prefetch urlloader (Partly as a preparation to add more logic for htxg-specific prefetch plumbing) Introduce prefetch-specific URLLoader which does: - Basically just forwards the request to the underlying network loader - Doesn't forward back the data to the renderer process, which used to be just discarded in the renderer process anyways. This is hooked as follows: - When NetworkService is enabled LinkLoader gets PrefetchURLLoaderFactory via PrefetchURLLoaderService and sets it as ResourceLoaderOptions. url_loader_factory. - When NetworkService is NOT enabled this is directly hooked from the ResourceMessageFilter. In both cases the URLLoaderFactory is owned by StoragePartition, partially because it makes various plumbing (including tests) easier. Optionally we can make it live longer than the client process, though it is not currently implemented. (So no behavior change is expected with this one) Bug: 803776 Change-Id: Ia4b33048a7c6d27a80044d99b62a1cc5faad5681 Reviewed-on: https://chromium-review.googlesource.com/912051 Commit-Queue: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Tsuyoshi Horo <horo@chromium.org> Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Cr-Commit-Position: refs/heads/master@{#537605} [modify] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/content/browser/BUILD.gn [modify] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/content/browser/frame_host/render_frame_host_impl.cc [modify] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/content/browser/loader/prefetch_browsertest.cc [add] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/content/browser/loader/prefetch_url_loader.cc [add] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/content/browser/loader/prefetch_url_loader.h [add] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/content/browser/loader/prefetch_url_loader_factory.cc [add] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/content/browser/loader/prefetch_url_loader_factory.h [modify] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/content/browser/loader/resource_dispatcher_host_unittest.cc [modify] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/content/browser/loader/resource_message_filter.cc [modify] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/content/browser/loader/resource_message_filter.h [modify] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/content/browser/loader/url_loader_factory_impl_unittest.cc [modify] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/content/browser/renderer_host/render_process_host_impl.cc [modify] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/content/browser/storage_partition_impl.cc [modify] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/content/browser/storage_partition_impl.h [modify] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/content/public/app/mojo/content_browser_manifest.json [modify] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/third_party/WebKit/Source/core/DEPS [modify] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/third_party/WebKit/Source/core/frame/LocalFrame.cpp [modify] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/third_party/WebKit/Source/core/frame/LocalFrame.h [modify] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/third_party/WebKit/Source/core/loader/LinkLoader.cpp [modify] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/third_party/WebKit/Source/platform/loader/fetch/ResourceLoaderOptions.h [modify] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/third_party/WebKit/Tools/Scripts/audit-non-blink-usage.py [modify] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/third_party/WebKit/common/BUILD.gn [add] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/third_party/WebKit/common/loader/OWNERS [add] https://crrev.com/db67b537f7c3bef2b5647a9f29295c8e593c0972/third_party/WebKit/common/loader/prefetch_url_loader_service.mojom
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/eeae69719b8101cedcbc4a27d0ae5a5124a7377e commit eeae69719b8101cedcbc4a27d0ae5a5124a7377e Author: Kinuko Yasuda <kinuko@chromium.org> Date: Tue Feb 20 08:38:11 2018 Make PrefetchURLLoaderFactory per-frame and pass frame_tree_node_id So that we can set up necessary throttles and resource/request contexts when Prefetch needs to create additional requests, e.g. for fetching certificate for Signed HTTP Exchanges. (The usage example of the throttles, resource_context and request_context_getter would look like: https://chromium-review.googlesource.com/c/chromium/src/+/920565) Bug: 803776 Change-Id: I71b1e7e8bb1178ecae89b4d9e37b60df658eba32 Reviewed-on: https://chromium-review.googlesource.com/923467 Reviewed-by: Tsuyoshi Horo <horo@chromium.org> Commit-Queue: Kinuko Yasuda <kinuko@chromium.org> Cr-Commit-Position: refs/heads/master@{#537738} [modify] https://crrev.com/eeae69719b8101cedcbc4a27d0ae5a5124a7377e/content/browser/BUILD.gn [modify] https://crrev.com/eeae69719b8101cedcbc4a27d0ae5a5124a7377e/content/browser/frame_host/render_frame_host_impl.cc [modify] https://crrev.com/eeae69719b8101cedcbc4a27d0ae5a5124a7377e/content/browser/loader/prefetch_browsertest.cc [modify] https://crrev.com/eeae69719b8101cedcbc4a27d0ae5a5124a7377e/content/browser/loader/prefetch_url_loader.cc [modify] https://crrev.com/eeae69719b8101cedcbc4a27d0ae5a5124a7377e/content/browser/loader/prefetch_url_loader.h [delete] https://crrev.com/3bacaaf183589f9664670c5492e3ad28948bb7eb/content/browser/loader/prefetch_url_loader_factory.cc [delete] https://crrev.com/3bacaaf183589f9664670c5492e3ad28948bb7eb/content/browser/loader/prefetch_url_loader_factory.h [add] https://crrev.com/eeae69719b8101cedcbc4a27d0ae5a5124a7377e/content/browser/loader/prefetch_url_loader_service.cc [add] https://crrev.com/eeae69719b8101cedcbc4a27d0ae5a5124a7377e/content/browser/loader/prefetch_url_loader_service.h [modify] https://crrev.com/eeae69719b8101cedcbc4a27d0ae5a5124a7377e/content/browser/loader/resource_message_filter.cc [modify] https://crrev.com/eeae69719b8101cedcbc4a27d0ae5a5124a7377e/content/browser/loader/resource_message_filter.h [modify] https://crrev.com/eeae69719b8101cedcbc4a27d0ae5a5124a7377e/content/browser/renderer_host/render_process_host_impl.cc [modify] https://crrev.com/eeae69719b8101cedcbc4a27d0ae5a5124a7377e/content/browser/storage_partition_impl.cc [modify] https://crrev.com/eeae69719b8101cedcbc4a27d0ae5a5124a7377e/content/browser/storage_partition_impl.h [modify] https://crrev.com/eeae69719b8101cedcbc4a27d0ae5a5124a7377e/content/browser/storage_partition_impl_map.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8edb9246a1bcda9544a7495522f10f1a083d7964 commit 8edb9246a1bcda9544a7495522f10f1a083d7964 Author: Kinuko Yasuda <kinuko@chromium.org> Date: Wed Feb 21 15:46:57 2018 Wire WebPackageLoader into PrefetchURLLoader Uses MockSignedExchangeHandler for tests, which is not super elegant but was handy. (Full tests with fully baked package could probably be added as a follow-up) Bug: 803776 Change-Id: Ide2817a4bb196b60271bdadf02c9ca0ac43d6011 Reviewed-on: https://chromium-review.googlesource.com/920565 Commit-Queue: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Tsuyoshi Horo <horo@chromium.org> Cr-Commit-Position: refs/heads/master@{#538115} [modify] https://crrev.com/8edb9246a1bcda9544a7495522f10f1a083d7964/content/browser/BUILD.gn [modify] https://crrev.com/8edb9246a1bcda9544a7495522f10f1a083d7964/content/browser/loader/prefetch_browsertest.cc [modify] https://crrev.com/8edb9246a1bcda9544a7495522f10f1a083d7964/content/browser/loader/prefetch_url_loader.cc [modify] https://crrev.com/8edb9246a1bcda9544a7495522f10f1a083d7964/content/browser/loader/prefetch_url_loader.h [modify] https://crrev.com/8edb9246a1bcda9544a7495522f10f1a083d7964/content/browser/loader/prefetch_url_loader_service.cc [modify] https://crrev.com/8edb9246a1bcda9544a7495522f10f1a083d7964/content/browser/loader/prefetch_url_loader_service.h [modify] https://crrev.com/8edb9246a1bcda9544a7495522f10f1a083d7964/content/browser/loader/resource_message_filter.cc [add] https://crrev.com/8edb9246a1bcda9544a7495522f10f1a083d7964/content/browser/web_package/mock_signed_exchange_handler.cc [add] https://crrev.com/8edb9246a1bcda9544a7495522f10f1a083d7964/content/browser/web_package/mock_signed_exchange_handler.h [modify] https://crrev.com/8edb9246a1bcda9544a7495522f10f1a083d7964/content/browser/web_package/signed_exchange_handler.cc [modify] https://crrev.com/8edb9246a1bcda9544a7495522f10f1a083d7964/content/browser/web_package/signed_exchange_handler.h [modify] https://crrev.com/8edb9246a1bcda9544a7495522f10f1a083d7964/content/browser/web_package/web_package_loader.cc [modify] https://crrev.com/8edb9246a1bcda9544a7495522f10f1a083d7964/content/browser/web_package/web_package_loader.h [add] https://crrev.com/8edb9246a1bcda9544a7495522f10f1a083d7964/content/browser/web_package/web_package_prefetch_handler.cc [add] https://crrev.com/8edb9246a1bcda9544a7495522f10f1a083d7964/content/browser/web_package/web_package_prefetch_handler.h [modify] https://crrev.com/8edb9246a1bcda9544a7495522f10f1a083d7964/content/test/BUILD.gn
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/babe4321511709c9f4abe32046dc8e7101272428 commit babe4321511709c9f4abe32046dc8e7101272428 Author: Kinuko Yasuda <kinuko@chromium.org> Date: Wed Feb 28 06:30:18 2018 Simply PrefetchURLLoader{Service,Factory} with dispatch_context Use the binding_set's dispatch_context to attach frame_tree_node_id info to the binding itself, so that we don't need to create separate objects for each frame's factory. R=horo@chromium.org Bug: 803776 Change-Id: I3a564ae2c75a82a82c4cbb720788f52137552f92 Reviewed-on: https://chromium-review.googlesource.com/937521 Commit-Queue: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Tsuyoshi Horo <horo@chromium.org> Cr-Commit-Position: refs/heads/master@{#539734} [modify] https://crrev.com/babe4321511709c9f4abe32046dc8e7101272428/content/browser/loader/prefetch_url_loader_service.cc [modify] https://crrev.com/babe4321511709c9f4abe32046dc8e7101272428/content/browser/loader/prefetch_url_loader_service.h
Comment 1 by kinuko@chromium.org
, Jan 19 2018