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

Issue 2865613002: Add an abstraction for a job in the AppCacheRequestHandler class. (Closed)

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

Description

Add an abstraction for a job in the AppCacheRequestHandler class. The abstraction is in the form of an AppCacheJob base class which has two subclasses. 1. AppCacheURLRequestJob : This is the current URLRequestJob implementation which relies on URLRequest interception to serve requests from the cache. 2. AppCacheURLLoaderJob : This will eventually be the job mechanism for the URLLoader based AppCache functionality (network service). The AppCacheJob provides a number of methods like DeliverAppCachedResponse(), DeliverNetworkResponse(), DeliverErrorResponse(), etc which allow the job to control the content being served out. The expectation is that with this abstraction, we should have minimal changes in core AppCache functionality for the URLLoader work. We will mostly be an AppCache consumer. BUG=715632 Review-Url: https://codereview.chromium.org/2865613002 Cr-Commit-Position: refs/heads/master@{#470227} Committed: https://chromium.googlesource.com/chromium/src/+/46f3e94b444a8fa09c22cdd0b0d3313414feb0c1

Patch Set 1 #

Patch Set 2 : Fix comments, the code in AppCacheInterceptor to deref the job only if it non null #

Patch Set 3 : Fix build failures #

Total comments: 13

Patch Set 4 : Address review comments #

Patch Set 5 : git cl format #

Patch Set 6 : Fix compile failures #

Unified diffs Side-by-side diffs Delta from patch set Stats (+615 lines, -310 lines) Patch
M content/browser/BUILD.gn View 2 chunks +4 lines, -0 lines 0 comments Download
M content/browser/appcache/appcache_interceptor.cc View 1 4 chunks +11 lines, -5 lines 0 comments Download
A content/browser/appcache/appcache_job.h View 1 2 3 1 chunk +116 lines, -0 lines 0 comments Download
A content/browser/appcache/appcache_job.cc View 1 2 3 4 5 1 chunk +47 lines, -0 lines 0 comments Download
M content/browser/appcache/appcache_request.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/appcache/appcache_request_handler.h View 6 chunks +9 lines, -9 lines 0 comments Download
M content/browser/appcache/appcache_request_handler.cc View 1 2 3 4 13 chunks +24 lines, -28 lines 0 comments Download
M content/browser/appcache/appcache_request_handler_unittest.cc View 24 chunks +166 lines, -137 lines 0 comments Download
A content/browser/appcache/appcache_url_loader_job.h View 1 2 3 1 chunk +54 lines, -0 lines 0 comments Download
A content/browser/appcache/appcache_url_loader_job.cc View 1 2 1 chunk +53 lines, -0 lines 0 comments Download
M content/browser/appcache/appcache_url_request_job.h View 1 2 5 chunks +26 lines, -55 lines 0 comments Download
M content/browser/appcache/appcache_url_request_job.cc View 8 chunks +80 lines, -53 lines 0 comments Download
M content/browser/appcache/appcache_url_request_job_unittest.cc View 7 chunks +23 lines, -23 lines 0 comments Download

Messages

Total messages: 35 (26 generated)
ananta
3 years, 7 months ago (2017-05-05 04:18:49 UTC) #2
jam
https://codereview.chromium.org/2865613002/diff/40001/content/browser/appcache/appcache_job.h File content/browser/appcache/appcache_job.h (right): https://codereview.chromium.org/2865613002/diff/40001/content/browser/appcache/appcache_job.h#newcode30 content/browser/appcache/appcache_job.h:30: // Interface for an AppCache job. Subclasses implement this ...
3 years, 7 months ago (2017-05-05 23:15:25 UTC) #11
ananta
https://codereview.chromium.org/2865613002/diff/40001/content/browser/appcache/appcache_job.h File content/browser/appcache/appcache_job.h (right): https://codereview.chromium.org/2865613002/diff/40001/content/browser/appcache/appcache_job.h#newcode30 content/browser/appcache/appcache_job.h:30: // Interface for an AppCache job. Subclasses implement this ...
3 years, 7 months ago (2017-05-06 03:01:35 UTC) #12
jam
lgtm with one comment https://codereview.chromium.org/2865613002/diff/40001/content/browser/appcache/appcache_job.h File content/browser/appcache/appcache_job.h (right): https://codereview.chromium.org/2865613002/diff/40001/content/browser/appcache/appcache_job.h#newcode35 content/browser/appcache/appcache_job.h:35: public base::SupportsWeakPtr<AppCacheJob> { On 2017/05/06 ...
3 years, 7 months ago (2017-05-08 14:03:12 UTC) #25
jam
thanks for the in-person explanation (GetWeakPtr won't work since type needs to be for the ...
3 years, 7 months ago (2017-05-08 21:51:41 UTC) #26
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/2865613002/100001
3 years, 7 months ago (2017-05-08 21:55:22 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/173211) linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, ...
3 years, 7 months ago (2017-05-08 22:47:12 UTC) #30
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/2865613002/100001
3 years, 7 months ago (2017-05-09 02:03:20 UTC) #32
commit-bot: I haz the power
3 years, 7 months ago (2017-05-09 04:56:49 UTC) #35
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/46f3e94b444a8fa09c22cdd0b0d3...

Powered by Google App Engine
This is Rietveld 408576698