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

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

Created:
3 years, 5 months ago by ananta
Modified:
3 years, 5 months ago
Reviewers:
michaeln, jam
CC:
chromium-reviews, jam, darin-cc_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add support for subresource request fallback in AppCache for the network service.. This patch builds on patch https://codereview.chromium.org/2956373002/ for adding fallback support for subresource requests. This is implemented by passing a proxy URLLoaderClient interface to the network URL service for subresource requests which are sent to the network. We intercept the OnReceiveResponse, OnReceiveRedirect and OnComplete calls for supporting fallback responses in these cases. We could potentially look at moving fallback response reading to the renderer in a later patchset. The changes in this patchset are as below: 1. Add support for passing the ResourceResponseHead to the AppCacheURLLoaderJob. This is required for supporting fallback responses. The request handler looks at headers in the response and the status code to make a call whether a fallback is required. 2. AppCacheRequestHandler::MaybeLoadFallbackForResponse() and MaybeLoadFallbackForRedirect() have changed to allow for the fact that they are called in the network service code by the AppCacheURLLoaderJob. We don't create new job for delivering the fallback in this case. 3. Added methods in the AppCacheRequest class to return the URLRequest override and URLLoader override respectively. Next step is to add support for main resource fallback. BUG=715632 Review-Url: https://codereview.chromium.org/2974733002 Cr-Commit-Position: refs/heads/master@{#487640} Committed: https://chromium.googlesource.com/chromium/src/+/2ec636380ffa2f4df27e3525a32f7aae6658b58b

Patch Set 1 #

Patch Set 2 : Rebased to tip #

Patch Set 3 : Revert changes to AppCacheSubresourceURLFactory #

Patch Set 4 : Fix build failures #

Total comments: 21

Patch Set 5 : Address first round of review comments #

Total comments: 4

Patch Set 6 : Fix DCHECK #

Total comments: 5

Patch Set 7 : Close the network service binding handle when we are delivering a fallback #

Total comments: 14

Patch Set 8 : Address next round of review comments #

Patch Set 9 : Format changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+218 lines, -33 lines) Patch
M content/browser/appcache/appcache_job.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/appcache/appcache_request.h View 2 chunks +10 lines, -0 lines 0 comments Download
M content/browser/appcache/appcache_request.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M content/browser/appcache/appcache_request_handler.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/appcache/appcache_request_handler.cc View 1 2 3 4 5 6 4 chunks +25 lines, -5 lines 0 comments Download
M content/browser/appcache/appcache_url_loader_job.h View 1 2 3 4 5 6 7 8 chunks +36 lines, -4 lines 0 comments Download
M content/browser/appcache/appcache_url_loader_job.cc View 1 2 3 4 5 6 7 8 12 chunks +112 lines, -20 lines 0 comments Download
M content/browser/appcache/appcache_url_loader_request.h View 2 chunks +7 lines, -0 lines 0 comments Download
M content/browser/appcache/appcache_url_loader_request.cc View 4 chunks +9 lines, -1 line 0 comments Download
M content/browser/appcache/appcache_url_request.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/appcache/appcache_url_request.cc View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (25 generated)
ananta
Changes from the https://codereview.chromium.org/2956373002/ patch are also showing up here. Will look into that. This ...
3 years, 5 months ago (2017-07-09 03:20:13 UTC) #2
ananta
Patch should be ready for review.
3 years, 5 months ago (2017-07-14 20:31:45 UTC) #11
michaeln
https://codereview.chromium.org/2974733002/diff/60001/content/browser/appcache/appcache_request_handler.cc File content/browser/appcache/appcache_request_handler.cc (right): https://codereview.chromium.org/2974733002/diff/60001/content/browser/appcache/appcache_request_handler.cc#newcode134 content/browser/appcache/appcache_request_handler.cc:134: // the existing job to deliver the fallback response. ...
3 years, 5 months ago (2017-07-17 21:04:55 UTC) #12
ananta
https://codereview.chromium.org/2974733002/diff/60001/content/browser/appcache/appcache_request_handler.cc File content/browser/appcache/appcache_request_handler.cc (right): https://codereview.chromium.org/2974733002/diff/60001/content/browser/appcache/appcache_request_handler.cc#newcode134 content/browser/appcache/appcache_request_handler.cc:134: // the existing job to deliver the fallback response. ...
3 years, 5 months ago (2017-07-18 00:19:04 UTC) #13
michaeln
https://codereview.chromium.org/2974733002/diff/60001/content/browser/appcache/appcache_url_loader_job.cc File content/browser/appcache/appcache_url_loader_job.cc (right): https://codereview.chromium.org/2974733002/diff/60001/content/browser/appcache/appcache_url_loader_job.cc#newcode193 content/browser/appcache/appcache_url_loader_job.cc:193: if (!sub_resource_handler_->MaybeLoadFallbackForResponse(nullptr)) On 2017/07/18 00:19:03, ananta wrote: > On ...
3 years, 5 months ago (2017-07-18 01:40:37 UTC) #18
ananta
https://codereview.chromium.org/2974733002/diff/60001/content/browser/appcache/appcache_url_loader_job.cc File content/browser/appcache/appcache_url_loader_job.cc (right): https://codereview.chromium.org/2974733002/diff/60001/content/browser/appcache/appcache_url_loader_job.cc#newcode193 content/browser/appcache/appcache_url_loader_job.cc:193: if (!sub_resource_handler_->MaybeLoadFallbackForResponse(nullptr)) On 2017/07/18 01:40:36, michaeln wrote: > On ...
3 years, 5 months ago (2017-07-18 02:06:50 UTC) #19
ananta
https://codereview.chromium.org/2974733002/diff/60001/content/browser/appcache/appcache_url_loader_job.cc File content/browser/appcache/appcache_url_loader_job.cc (right): https://codereview.chromium.org/2974733002/diff/60001/content/browser/appcache/appcache_url_loader_job.cc#newcode193 content/browser/appcache/appcache_url_loader_job.cc:193: if (!sub_resource_handler_->MaybeLoadFallbackForResponse(nullptr)) On 2017/07/18 02:06:49, ananta wrote: > On ...
3 years, 5 months ago (2017-07-18 02:11:39 UTC) #20
michaeln
https://codereview.chromium.org/2974733002/diff/120001/content/browser/appcache/appcache_url_loader_job.cc File content/browser/appcache/appcache_url_loader_job.cc (right): https://codereview.chromium.org/2974733002/diff/120001/content/browser/appcache/appcache_url_loader_job.cc#newcode206 content/browser/appcache/appcache_url_loader_job.cc:206: loader_client_proxy_binding_.Close(); This turns off the network loaders delegate callbacks ...
3 years, 5 months ago (2017-07-18 19:19:23 UTC) #25
ananta
https://codereview.chromium.org/2974733002/diff/120001/content/browser/appcache/appcache_url_loader_job.cc File content/browser/appcache/appcache_url_loader_job.cc (right): https://codereview.chromium.org/2974733002/diff/120001/content/browser/appcache/appcache_url_loader_job.cc#newcode206 content/browser/appcache/appcache_url_loader_job.cc:206: loader_client_proxy_binding_.Close(); On 2017/07/18 19:19:22, michaeln wrote: > This turns ...
3 years, 5 months ago (2017-07-18 19:52:40 UTC) #27
michaeln
lgtm and thanx for fixing up the names!
3 years, 5 months ago (2017-07-18 21:41:54 UTC) #29
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/2974733002/160001
3 years, 5 months ago (2017-07-18 22:38:33 UTC) #33
commit-bot: I haz the power
3 years, 5 months ago (2017-07-18 22:44:10 UTC) #37
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://chromium.googlesource.com/chromium/src/+/2ec636380ffa2f4df27e3525a32f...

Powered by Google App Engine
This is Rietveld 408576698