Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Issue 2956373002: Add support for subresource request loads in AppCache for the network service. (Closed)

Created:
3 years, 5 months ago by ananta
Modified:
3 years, 5 months ago
Reviewers:
michaeln, kinuko, jam
CC:
chromium-reviews, michaeln, creis+watch_chromium.org, nasko+codewatch_chromium.org, jam, darin-cc_chromium.org, rdsmith+watch_chromium.org, loading-reviews_chromium.org, mmenke
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add support for subresource request loads in AppCache for the network service. This patch builds on the earlier patch where we passed the URLLoaderFactory for AppCache to the renderer process. The renderer invokes CreateLoaderAndStart which comes to the AppCache factory. We then instantiate the AppCacheRequestHandler instance here and call into it to handle the request. The handler creates the AppCacheURLLoaderJob and passes itself to the job. The job controls the lifetime of the handler. The AppCacheSubresourceURLFactory class is passed the precreated AppCache host during init. We save maintain this as a weak reference in the class to protect against the case where the host dies while we are processing the call from the renderer. Added support to get a weak pointer in the AppCacheHost class. The AppCacheRequestHandler saves away the host as a weak reference during InitializeForNavigationNetworkService() and passes to the factory in MaybeCreateSubresourceFactory() The other changes are to pass the information from CreateLoaderAndStart() to the AppCacheRequestHandler class and from there to the job. A bug was fixed in the AppCacheURLLoaderJob where we weren't terminating the write correctly causing the renderer to not consider the load as complete. With this change normal subresource loads will work. Fallback support is not added yet and will happen in a followup. BUG=715632 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2956373002 Cr-Commit-Position: refs/heads/master@{#485834} Committed: https://chromium.googlesource.com/chromium/src/+/2533bff6fceb80f4ac6b582e4ffbf45bfde2a064

Patch Set 1 #

Patch Set 2 : Update the TestNavigationURLLoaderDelegate implementation with the GetRendererProcessId() method. #

Patch Set 3 : Fix redness #

Patch Set 4 : Remove forward declaration #

Patch Set 5 : Revert the change which passed frame_tree_node_id to URLLoaderRequestController as this is no longe… #

Patch Set 6 : Use the precreated AppCacheHost from the AppCacheNavigationHandleCore instance. #

Total comments: 3

Patch Set 7 : Moved the SubresourceLoadInfo structure to the appcache_url_loader_job.h/.cc files. #

Total comments: 12

Patch Set 8 : Address review comments #

Total comments: 4

Patch Set 9 : Address review comments #

Patch Set 10 : format changes #

Patch Set 11 : Rebased to tip #

Total comments: 5

Patch Set 12 : Address review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+274 lines, -54 lines) Patch
M content/browser/appcache/appcache_host.h View 1 2 3 4 5 6 7 3 chunks +6 lines, -0 lines 0 comments Download
M content/browser/appcache/appcache_host.cc View 1 2 3 4 5 6 7 8 9 2 chunks +14 lines, -5 lines 0 comments Download
M content/browser/appcache/appcache_request_handler.h View 1 2 3 4 5 6 5 chunks +20 lines, -6 lines 0 comments Download
M content/browser/appcache/appcache_request_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +27 lines, -5 lines 0 comments Download
M content/browser/appcache/appcache_subresource_url_factory.h View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +15 lines, -5 lines 0 comments Download
M content/browser/appcache/appcache_subresource_url_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +48 lines, -14 lines 0 comments Download
M content/browser/appcache/appcache_url_loader_job.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +59 lines, -4 lines 0 comments Download
M content/browser/appcache/appcache_url_loader_job.cc View 1 2 3 4 5 6 7 9 chunks +85 lines, -15 lines 0 comments Download

Messages

Total messages: 61 (47 generated)
ananta
3 years, 5 months ago (2017-06-28 20:21:47 UTC) #12
jam
I think you can pass in the frame tree node id in InitializeForNavigationNetworkService, which is ...
3 years, 5 months ago (2017-06-29 15:16:50 UTC) #17
ananta
On 2017/06/29 15:16:50, jam wrote: > I think you can pass in the frame tree ...
3 years, 5 months ago (2017-06-29 22:11:08 UTC) #19
jam
nice, this looks better thanks. I'm not very familiar with the appcache code tho, so ...
3 years, 5 months ago (2017-06-30 01:31:16 UTC) #24
ananta
It would be great if we could land this if things look ok. I will ...
3 years, 5 months ago (2017-06-30 01:39:07 UTC) #25
ananta
https://codereview.chromium.org/2956373002/diff/100001/content/browser/appcache/appcache_subresource_url_factory.h File content/browser/appcache/appcache_subresource_url_factory.h (right): https://codereview.chromium.org/2956373002/diff/100001/content/browser/appcache/appcache_subresource_url_factory.h#newcode24 content/browser/appcache/appcache_subresource_url_factory.h:24: struct SubresourceLoadInfo { On 2017/06/30 01:39:06, ananta wrote: > ...
3 years, 5 months ago (2017-06-30 01:53:42 UTC) #26
kinuko
RequestHandler and Job ownership relationship looks a bit unclear, let me leave some comments... https://codereview.chromium.org/2956373002/diff/120001/content/browser/appcache/appcache_host.h ...
3 years, 5 months ago (2017-07-03 06:34:15 UTC) #32
ananta
https://codereview.chromium.org/2956373002/diff/120001/content/browser/appcache/appcache_host.h File content/browser/appcache/appcache_host.h (right): https://codereview.chromium.org/2956373002/diff/120001/content/browser/appcache/appcache_host.h#newcode361 content/browser/appcache/appcache_host.h:361: // get destroyed last. On 2017/07/03 06:34:15, kinuko wrote: ...
3 years, 5 months ago (2017-07-03 07:36:47 UTC) #33
kinuko
Thanks, this looks reasonable to me for the scope this CL covers. https://codereview.chromium.org/2956373002/diff/140001/content/browser/appcache/appcache_request_handler.cc File content/browser/appcache/appcache_request_handler.cc ...
3 years, 5 months ago (2017-07-04 05:47:49 UTC) #38
ananta
https://codereview.chromium.org/2956373002/diff/140001/content/browser/appcache/appcache_request_handler.cc File content/browser/appcache/appcache_request_handler.cc (right): https://codereview.chromium.org/2956373002/diff/140001/content/browser/appcache/appcache_request_handler.cc#newcode338 content/browser/appcache/appcache_request_handler.cc:338: // The job owns us from this point on. ...
3 years, 5 months ago (2017-07-05 13:31:03 UTC) #39
michaeln
i think this lgtm https://codereview.chromium.org/2956373002/diff/200001/content/browser/appcache/appcache_request_handler.cc File content/browser/appcache/appcache_request_handler.cc (right): https://codereview.chromium.org/2956373002/diff/200001/content/browser/appcache/appcache_request_handler.cc#newcode333 content/browser/appcache/appcache_request_handler.cc:333: if (job_.get() && !is_main_resource() && ...
3 years, 5 months ago (2017-07-11 00:14:58 UTC) #48
kinuko
https://codereview.chromium.org/2956373002/diff/200001/content/browser/appcache/appcache_subresource_url_factory.cc File content/browser/appcache/appcache_subresource_url_factory.cc (right): https://codereview.chromium.org/2956373002/diff/200001/content/browser/appcache/appcache_subresource_url_factory.cc#newcode74 content/browser/appcache/appcache_subresource_url_factory.cc:74: return; On 2017/07/11 00:14:58, michaeln wrote: > What happens ...
3 years, 5 months ago (2017-07-11 07:28:22 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2956373002/220001
3 years, 5 months ago (2017-07-12 00:33:57 UTC) #56
commit-bot: I haz the power
3 years, 5 months ago (2017-07-12 04:08:27 UTC) #61
Message was sent while issue was closed.
Committed patchset #12 (id:220001) as
https://chromium.googlesource.com/chromium/src/+/2533bff6fceb80f4ac6b582e4ffb...

Powered by Google App Engine
This is Rietveld 408576698