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

Issue 2724783002: Make the BackgroundFetchJobController a per-job object (Closed)

Created:
3 years, 9 months ago by harkness
Modified:
3 years, 9 months ago
Reviewers:
Peter Beverloo, awdf
CC:
chromium-reviews, Peter Beverloo, darin-cc_chromium.org, jam, harkness+watch_chromium.org, awdf+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make the BackgroundFetchJobController a per-job object In previous code, the BackgroundFetchJobController had information about all jobs in progress. In this CL, multiple job controllers are instantiated, and each controller monitors a single job. This allows the controller to be later used as an Observer for the particular files in its job. Also changed in this CL is the ownership model for the JobData. Instead of the DataManager keeping ownership of the JobData, the ownership is passed to the JobController. The Context then keeps ownership of all created JobControllers and calls Shutdown on the controllers before the DataManager is destroyed. There is still temporary storage for the JobInfo and RequestInfos which will eventually be written to permanent storage, but these temporary data structures have been more explicitly called out as temporary. BUG=692544 Review-Url: https://codereview.chromium.org/2724783002 Cr-Commit-Position: refs/heads/master@{#455869} Committed: https://chromium.googlesource.com/chromium/src/+/35b3ce0d6309b6cc8ad83084aa0e0365ae1e2b5a

Patch Set 1 #

Total comments: 30

Patch Set 2 : Fixed destructor threading and nits #

Total comments: 6

Patch Set 3 : nits and formatting. #

Patch Set 4 : Fix protection for DeleteOnIOThread template issue. #

Patch Set 5 : ACTUALLY fix the compile error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+165 lines, -90 lines) Patch
M content/browser/background_fetch/background_fetch_context.h View 1 2 3 4 3 chunks +20 lines, -4 lines 0 comments Download
M content/browser/background_fetch/background_fetch_context.cc View 1 3 chunks +27 lines, -6 lines 0 comments Download
M content/browser/background_fetch/background_fetch_data_manager.h View 1 2 2 chunks +15 lines, -11 lines 0 comments Download
M content/browser/background_fetch/background_fetch_data_manager.cc View 1 3 chunks +24 lines, -11 lines 0 comments Download
M content/browser/background_fetch/background_fetch_data_manager_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/background_fetch/background_fetch_job_controller.h View 1 2 2 chunks +17 lines, -14 lines 0 comments Download
M content/browser/background_fetch/background_fetch_job_controller.cc View 1 2 2 chunks +21 lines, -19 lines 0 comments Download
M content/browser/background_fetch/background_fetch_job_controller_unittest.cc View 1 2 3 chunks +22 lines, -17 lines 0 comments Download
M content/browser/background_fetch/background_fetch_job_data.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/background_fetch/background_fetch_job_data.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/background_fetch/background_fetch_job_info.h View 3 chunks +4 lines, -3 lines 0 comments Download
M content/browser/background_fetch/background_fetch_job_info.cc View 1 1 chunk +10 lines, -0 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 27 (16 generated)
harkness
Let's talk about the ownership model changes on a whiteboard before you start the code ...
3 years, 9 months ago (2017-03-01 11:23:12 UTC) #2
harkness
3 years, 9 months ago (2017-03-07 17:26:06 UTC) #8
Peter Beverloo
https://codereview.chromium.org/2724783002/diff/1/content/browser/background_fetch/background_fetch_context.cc File content/browser/background_fetch/background_fetch_context.cc (right): https://codereview.chromium.org/2724783002/diff/1/content/browser/background_fetch/background_fetch_context.cc#newcode32 content/browser/background_fetch/background_fetch_context.cc:32: DCHECK_CURRENTLY_ON(BrowserThread::UI); There is nothing that ensures that this gets ...
3 years, 9 months ago (2017-03-08 14:27:05 UTC) #9
harkness
https://codereview.chromium.org/2724783002/diff/1/content/browser/background_fetch/background_fetch_context.cc File content/browser/background_fetch/background_fetch_context.cc (right): https://codereview.chromium.org/2724783002/diff/1/content/browser/background_fetch/background_fetch_context.cc#newcode32 content/browser/background_fetch/background_fetch_context.cc:32: DCHECK_CURRENTLY_ON(BrowserThread::UI); On 2017/03/08 14:27:04, Peter Beverloo wrote: > There ...
3 years, 9 months ago (2017-03-09 13:33:26 UTC) #10
Peter Beverloo
lgtm https://codereview.chromium.org/2724783002/diff/1/content/browser/background_fetch/background_fetch_context.cc File content/browser/background_fetch/background_fetch_context.cc (right): https://codereview.chromium.org/2724783002/diff/1/content/browser/background_fetch/background_fetch_context.cc#newcode53 content/browser/background_fetch/background_fetch_context.cc:53: // any status to the DataManager. On 2017/03/09 ...
3 years, 9 months ago (2017-03-09 15:18:58 UTC) #11
harkness
https://codereview.chromium.org/2724783002/diff/1/content/browser/background_fetch/background_fetch_context.cc File content/browser/background_fetch/background_fetch_context.cc (right): https://codereview.chromium.org/2724783002/diff/1/content/browser/background_fetch/background_fetch_context.cc#newcode53 content/browser/background_fetch/background_fetch_context.cc:53: // any status to the DataManager. On 2017/03/09 15:18:57, ...
3 years, 9 months ago (2017-03-09 18:35:31 UTC) #14
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/2724783002/40001
3 years, 9 months ago (2017-03-09 18:36:03 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: win_clang on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/184425)
3 years, 9 months ago (2017-03-09 19:07:26 UTC) #17
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/2724783002/60001
3 years, 9 months ago (2017-03-09 19:56:53 UTC) #20
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/2724783002/80001
3 years, 9 months ago (2017-03-09 20:14:58 UTC) #24
commit-bot: I haz the power
3 years, 9 months ago (2017-03-09 21:37:40 UTC) #27
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/35b3ce0d6309b6cc8ad83084aa0e...

Powered by Google App Engine
This is Rietveld 408576698