This should be done in a way that will work with RDH and the network service. It could be a simple test case for a new URLLoader implementation.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cf6f762f05c3d4aab0e127e556ab7852273d9807 commit cf6f762f05c3d4aab0e127e556ab7852273d9807 Author: jam <jam@chromium.org> Date: Wed May 03 22:16:28 2017 Generalize content::URLDataSource so that it can be used by the network service. -remove WillServiceRequest which wasn't used -change ShouldServiceRequest to take in the required fields, which are url, context and process ID BUG= 717714 Review-Url: https://codereview.chromium.org/2856093004 Cr-Commit-Position: refs/heads/master@{#469160} [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/chrome/browser/search/iframe_source.cc [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/chrome/browser/search/iframe_source.h [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/chrome/browser/search/iframe_source_unittest.cc [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/chrome/browser/search/instant_io_context.cc [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/chrome/browser/search/instant_io_context.h [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/chrome/browser/search/local_ntp_source.cc [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/chrome/browser/search/local_ntp_source.h [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/chrome/browser/search/thumbnail_source.cc [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/chrome/browser/search/thumbnail_source.h [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/chrome/browser/thumbnails/thumbnail_list_source.cc [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/chrome/browser/thumbnails/thumbnail_list_source.h [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/chrome/browser/ui/webui/fallback_icon_source.cc [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/chrome/browser/ui/webui/fallback_icon_source.h [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/chrome/browser/ui/webui/favicon_source.cc [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/chrome/browser/ui/webui/favicon_source.h [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/chrome/browser/ui/webui/large_icon_source.cc [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/chrome/browser/ui/webui/large_icon_source.h [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/chrome/browser/ui/webui/theme_source.cc [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/chrome/browser/ui/webui/theme_source.h [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/components/dom_distiller/content/browser/dom_distiller_viewer_source.h [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/content/browser/webui/url_data_manager_backend.cc [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/content/public/browser/url_data_source.cc [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/content/public/browser/url_data_source.h [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/ios/web/public/url_data_source_ios.h [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/ios/web/webui/url_data_manager_ios_backend.mm [modify] https://crrev.com/cf6f762f05c3d4aab0e127e556ab7852273d9807/ios/web/webui/url_data_source_ios.mm
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8c4edd07d3cf96c44d1995e491f8789a7d38a5fd commit 8c4edd07d3cf96c44d1995e491f8789a7d38a5fd Author: jam <jam@chromium.org> Date: Sat May 06 18:50:33 2017 Handle webuis when using the network service. Some notes: -once PlzNavigate and Mojo loading ship, then we can use this code path in production. at that point, URLDataManagerBackend should move to the UI thread which would avoid thread hops -NavigationURLLoaderNetworkService knows about this scheme, but that should be abstracted out later to support other schemes BUG= 717714 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2860903006 Cr-Commit-Position: refs/heads/master@{#469848} [modify] https://crrev.com/8c4edd07d3cf96c44d1995e491f8789a7d38a5fd/content/browser/BUILD.gn [modify] https://crrev.com/8c4edd07d3cf96c44d1995e491f8789a7d38a5fd/content/browser/DEPS [modify] https://crrev.com/8c4edd07d3cf96c44d1995e491f8789a7d38a5fd/content/browser/frame_host/render_frame_host_impl.cc [modify] https://crrev.com/8c4edd07d3cf96c44d1995e491f8789a7d38a5fd/content/browser/loader/navigation_url_loader_network_service.cc [modify] https://crrev.com/8c4edd07d3cf96c44d1995e491f8789a7d38a5fd/content/browser/loader/navigation_url_loader_network_service.h [modify] https://crrev.com/8c4edd07d3cf96c44d1995e491f8789a7d38a5fd/content/browser/loader/resource_request_info_impl.cc [modify] https://crrev.com/8c4edd07d3cf96c44d1995e491f8789a7d38a5fd/content/browser/storage_partition_impl_map.cc [modify] https://crrev.com/8c4edd07d3cf96c44d1995e491f8789a7d38a5fd/content/browser/tracing/DEPS [modify] https://crrev.com/8c4edd07d3cf96c44d1995e491f8789a7d38a5fd/content/browser/web_contents/web_contents_impl.cc [modify] https://crrev.com/8c4edd07d3cf96c44d1995e491f8789a7d38a5fd/content/browser/webui/url_data_manager_backend.cc [modify] https://crrev.com/8c4edd07d3cf96c44d1995e491f8789a7d38a5fd/content/browser/webui/url_data_manager_backend.h [modify] https://crrev.com/8c4edd07d3cf96c44d1995e491f8789a7d38a5fd/content/browser/webui/url_data_manager_backend_unittest.cc [add] https://crrev.com/8c4edd07d3cf96c44d1995e491f8789a7d38a5fd/content/browser/webui/web_ui_url_loader_factory.cc [add] https://crrev.com/8c4edd07d3cf96c44d1995e491f8789a7d38a5fd/content/browser/webui/web_ui_url_loader_factory.h [modify] https://crrev.com/8c4edd07d3cf96c44d1995e491f8789a7d38a5fd/third_party/zlib/google/compression_utils.cc [modify] https://crrev.com/8c4edd07d3cf96c44d1995e491f8789a7d38a5fd/third_party/zlib/google/compression_utils.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/165aa1cd8fb624a2f222c2049edd5b1b48597b63 commit 165aa1cd8fb624a2f222c2049edd5b1b48597b63 Author: jam <jam@chromium.org> Date: Mon May 08 19:48:58 2017 Move the new WebUI's code to read the data off the IO thread as it's generally from the memory-mapped resource file. To avoid extra thread hops, I call (and bind) URLLoaderClient on the thread where we do the reads. I've found it easier to read to remove the URLLoaderImpl and just pass the required data to static methods. BUG= 717714 Review-Url: https://codereview.chromium.org/2867083002 Cr-Commit-Position: refs/heads/master@{#470082} [modify] https://crrev.com/165aa1cd8fb624a2f222c2049edd5b1b48597b63/content/browser/webui/url_data_manager_backend.cc [modify] https://crrev.com/165aa1cd8fb624a2f222c2049edd5b1b48597b63/content/browser/webui/web_ui_url_loader_factory.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1a97290bbc1c6d83e4b7f9d84bd208a28acde4a7 commit 1a97290bbc1c6d83e4b7f9d84bd208a28acde4a7 Author: jam <jam@chromium.org> Date: Tue May 09 04:30:50 2017 Make the new WebUI's code handle all webui schemes, instead of just chrome://. The use case is to get the embedder specified schemes. This makes the NTP work. BUG= 717714 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2867853002 Cr-Commit-Position: refs/heads/master@{#470207} [modify] https://crrev.com/1a97290bbc1c6d83e4b7f9d84bd208a28acde4a7/content/browser/frame_host/render_frame_host_impl.cc [modify] https://crrev.com/1a97290bbc1c6d83e4b7f9d84bd208a28acde4a7/content/browser/loader/navigation_url_loader_network_service.cc [modify] https://crrev.com/1a97290bbc1c6d83e4b7f9d84bd208a28acde4a7/content/browser/storage_partition_impl_map.cc [modify] https://crrev.com/1a97290bbc1c6d83e4b7f9d84bd208a28acde4a7/content/browser/webui/url_data_manager_backend.cc [modify] https://crrev.com/1a97290bbc1c6d83e4b7f9d84bd208a28acde4a7/content/browser/webui/url_data_manager_backend.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d654ee5a83218d46fb8198d1787100f515014932 commit d654ee5a83218d46fb8198d1787100f515014932 Author: jam <jam@chromium.org> Date: Tue May 09 22:00:52 2017 Implement chrome://blob-internals with network service. BUG= 717714 Review-Url: https://codereview.chromium.org/2865243002 Cr-Commit-Position: refs/heads/master@{#470423} [modify] https://crrev.com/d654ee5a83218d46fb8198d1787100f515014932/content/browser/BUILD.gn [add] https://crrev.com/d654ee5a83218d46fb8198d1787100f515014932/content/browser/blob_storage/blob_internals_url_loader.cc [add] https://crrev.com/d654ee5a83218d46fb8198d1787100f515014932/content/browser/blob_storage/blob_internals_url_loader.h [modify] https://crrev.com/d654ee5a83218d46fb8198d1787100f515014932/content/browser/webui/web_ui_url_loader_factory.cc [modify] https://crrev.com/d654ee5a83218d46fb8198d1787100f515014932/storage/browser/blob/view_blob_internals_job.cc [modify] https://crrev.com/d654ee5a83218d46fb8198d1787100f515014932/storage/browser/blob/view_blob_internals_job.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/17d386e6b5412b5ade8103c66200ced8f0e06e7c commit 17d386e6b5412b5ade8103c66200ced8f0e06e7c Author: jam <jam@chromium.org> Date: Wed May 10 16:40:04 2017 Implement chrome://histograms with network service. BUG= 717714 Review-Url: https://codereview.chromium.org/2874623002 Cr-Commit-Position: refs/heads/master@{#470604} [modify] https://crrev.com/17d386e6b5412b5ade8103c66200ced8f0e06e7c/content/browser/BUILD.gn [modify] https://crrev.com/17d386e6b5412b5ade8103c66200ced8f0e06e7c/content/browser/histogram_internals_request_job.cc [modify] https://crrev.com/17d386e6b5412b5ade8103c66200ced8f0e06e7c/content/browser/histogram_internals_request_job.h [add] https://crrev.com/17d386e6b5412b5ade8103c66200ced8f0e06e7c/content/browser/histogram_internals_url_loader.cc [add] https://crrev.com/17d386e6b5412b5ade8103c66200ced8f0e06e7c/content/browser/histogram_internals_url_loader.h [modify] https://crrev.com/17d386e6b5412b5ade8103c66200ced8f0e06e7c/content/browser/webui/web_ui_url_loader_factory.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4374b957b1158e5a05c945adec770bdcc351c808 commit 4374b957b1158e5a05c945adec770bdcc351c808 Author: jam <jam@chromium.org> Date: Wed May 10 21:16:41 2017 Implement chrome://network-error with network service. BUG= 717714 Review-Url: https://codereview.chromium.org/2873913002 Cr-Commit-Position: refs/heads/master@{#470711} [modify] https://crrev.com/4374b957b1158e5a05c945adec770bdcc351c808/content/browser/BUILD.gn [add] https://crrev.com/4374b957b1158e5a05c945adec770bdcc351c808/content/browser/webui/network_error_url_loader.cc [add] https://crrev.com/4374b957b1158e5a05c945adec770bdcc351c808/content/browser/webui/network_error_url_loader.h [modify] https://crrev.com/4374b957b1158e5a05c945adec770bdcc351c808/content/browser/webui/url_data_manager_backend.cc [modify] https://crrev.com/4374b957b1158e5a05c945adec770bdcc351c808/content/browser/webui/url_data_manager_backend.h [modify] https://crrev.com/4374b957b1158e5a05c945adec770bdcc351c808/content/browser/webui/web_ui_url_loader_factory.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7f2980a6dacefd6a9458ab717f51634d51b00890 commit 7f2980a6dacefd6a9458ab717f51634d51b00890 Author: jam <jam@chromium.org> Date: Thu May 11 16:42:46 2017 Implement chrome://view-http-cache with network service. BUG= 717714 Review-Url: https://codereview.chromium.org/2870203002 Cr-Commit-Position: refs/heads/master@{#470978} [modify] https://crrev.com/7f2980a6dacefd6a9458ab717f51634d51b00890/content/browser/net/view_http_cache_job_factory.cc [add] https://crrev.com/7f2980a6dacefd6a9458ab717f51634d51b00890/content/browser/webui/web_ui_browsertest.cc [modify] https://crrev.com/7f2980a6dacefd6a9458ab717f51634d51b00890/content/browser/webui/web_ui_url_loader_factory.cc [modify] https://crrev.com/7f2980a6dacefd6a9458ab717f51634d51b00890/content/common/BUILD.gn [add] https://crrev.com/7f2980a6dacefd6a9458ab717f51634d51b00890/content/common/network_service.mojom [modify] https://crrev.com/7f2980a6dacefd6a9458ab717f51634d51b00890/content/network/BUILD.gn [modify] https://crrev.com/7f2980a6dacefd6a9458ab717f51634d51b00890/content/network/DEPS [add] https://crrev.com/7f2980a6dacefd6a9458ab717f51634d51b00890/content/network/cache_url_loader.cc [add] https://crrev.com/7f2980a6dacefd6a9458ab717f51634d51b00890/content/network/cache_url_loader.h [modify] https://crrev.com/7f2980a6dacefd6a9458ab717f51634d51b00890/content/network/manifest.json [modify] https://crrev.com/7f2980a6dacefd6a9458ab717f51634d51b00890/content/network/network_service.cc [modify] https://crrev.com/7f2980a6dacefd6a9458ab717f51634d51b00890/content/network/network_service.h [modify] https://crrev.com/7f2980a6dacefd6a9458ab717f51634d51b00890/content/public/app/mojo/content_browser_manifest.json [modify] https://crrev.com/7f2980a6dacefd6a9458ab717f51634d51b00890/content/test/BUILD.gn
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d3c312ef5df1fb4a6079c9df932adfcf295d880c commit d3c312ef5df1fb4a6079c9df932adfcf295d880c Author: jam <jam@chromium.org> Date: Thu May 11 23:58:34 2017 Reduce boilerplate when creating simple mojom::URLLoaders. Add new constructors for mojo::DataPipe and content::ResourceRequestCompletionStatus to do this. BUG= 717714 Review-Url: https://codereview.chromium.org/2875143002 Cr-Commit-Position: refs/heads/master@{#471129} [modify] https://crrev.com/d3c312ef5df1fb4a6079c9df932adfcf295d880c/content/browser/blob_storage/blob_internals_url_loader.cc [modify] https://crrev.com/d3c312ef5df1fb4a6079c9df932adfcf295d880c/content/browser/histogram_internals_url_loader.cc [modify] https://crrev.com/d3c312ef5df1fb4a6079c9df932adfcf295d880c/content/browser/webui/web_ui_url_loader_factory.cc [modify] https://crrev.com/d3c312ef5df1fb4a6079c9df932adfcf295d880c/content/common/resource_request_completion_status.cc [modify] https://crrev.com/d3c312ef5df1fb4a6079c9df932adfcf295d880c/content/common/resource_request_completion_status.h [modify] https://crrev.com/d3c312ef5df1fb4a6079c9df932adfcf295d880c/content/network/cache_url_loader.cc [modify] https://crrev.com/d3c312ef5df1fb4a6079c9df932adfcf295d880c/content/network/url_loader_impl.cc [modify] https://crrev.com/d3c312ef5df1fb4a6079c9df932adfcf295d880c/media/mojo/common/mojo_decoder_buffer_converter.cc [modify] https://crrev.com/d3c312ef5df1fb4a6079c9df932adfcf295d880c/media/mojo/common/mojo_decoder_buffer_converter_unittest.cc [modify] https://crrev.com/d3c312ef5df1fb4a6079c9df932adfcf295d880c/media/remoting/demuxer_stream_adapter.cc [modify] https://crrev.com/d3c312ef5df1fb4a6079c9df932adfcf295d880c/mojo/public/cpp/system/data_pipe.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7534c70bd82e16b47f06290f1355eec795e3c2fb commit 7534c70bd82e16b47f06290f1355eec795e3c2fb Author: jam <jam@chromium.org> Date: Fri May 12 22:58:57 2017 Enable webui browser tests with network service now that webui works. BUG= 717714 Review-Url: https://codereview.chromium.org/2878733007 Cr-Commit-Position: refs/heads/master@{#471475} [modify] https://crrev.com/7534c70bd82e16b47f06290f1355eec795e3c2fb/testing/buildbot/filters/mojo.fyi.network_content_browsertests.filter
Apologies, applied the wrong component in bulk.
Comment 1 by jam@chromium.org
, May 2 2017