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

Issue 2767373002: Implement GetJobResponse and merge JobData into DataManager. (Closed)

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

Description

Implement GetJobResponse and merge JobData into DataManager. This CL has two major changes. The first is the addition of the GetJobResponse call on the DataManager. This Creates a new (and likely temporary) BackgroundFetchJobResponseData which is owned by the JobInfo and exists to collect the information needed to construct the Response that will eventually be sent to Mojo. The second major change is merging the JobData back into the DataManager. The JobData was always intended as a cache layer to assist in fetches involving large numbers of files in a batch, but given the desire to reduce the memory footprint of Chrome and the relative rarity of these operations, the cache layer is being removed in favor of storage accesses. Minor changes: * More attempts to isolate the eventual storage interface. * Methods on the JobData which were moved to the DataManager are now virtual for testing. * DataManager takes a BrowserContext* instead of BackgroundFetchContext*. * Much of the batch management which was in JobData is now handled in BackgroundFetchJobInfo. BUG=692621 Review-Url: https://codereview.chromium.org/2767373002 Cr-Commit-Position: refs/heads/master@{#459793} Committed: https://chromium.googlesource.com/chromium/src/+/4a4b593243e2acdedd593b84db51de418a801663

Patch Set 1 #

Patch Set 2 : Cleanup #

Patch Set 3 : Cleanup bad #

Patch Set 4 : Removed temporary BackgroundFetchResponseData and updated GetJobResponse to return the vector of Bl… #

Patch Set 5 : cleanup #

Total comments: 24

Patch Set 6 : CR comment #

Total comments: 3

Patch Set 7 : Removed constness #

Patch Set 8 : Removed tests and updated switch statement with comment #

Total comments: 4

Patch Set 9 : Rebase with BackgroundFetchRegistrationId patch #

Patch Set 10 : Removed typedef and added DISALLOW_COPY_AND_ASSIGN #

Unified diffs Side-by-side diffs Delta from patch set Stats (+787 lines, -437 lines) Patch
M content/browser/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/background_fetch/background_fetch_context.h View 1 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/background_fetch/background_fetch_context.cc View 2 chunks +11 lines, -15 lines 0 comments Download
M content/browser/background_fetch/background_fetch_data_manager.h View 1 2 3 4 5 6 7 8 9 2 chunks +59 lines, -15 lines 0 comments Download
M content/browser/background_fetch/background_fetch_data_manager.cc View 1 2 3 4 5 6 7 8 9 2 chunks +179 lines, -21 lines 0 comments Download
A content/browser/background_fetch/background_fetch_data_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +183 lines, -0 lines 0 comments Download
M content/browser/background_fetch/background_fetch_job_controller.h View 3 chunks +9 lines, -6 lines 0 comments Download
M content/browser/background_fetch/background_fetch_job_controller.cc View 1 2 3 4 5 6 7 5 chunks +25 lines, -17 lines 0 comments Download
M content/browser/background_fetch/background_fetch_job_controller_unittest.cc View 1 2 3 11 chunks +121 lines, -28 lines 0 comments Download
D content/browser/background_fetch/background_fetch_job_data.h View 1 chunk +0 lines, -64 lines 0 comments Download
D content/browser/background_fetch/background_fetch_job_data.cc View 1 chunk +0 lines, -76 lines 0 comments Download
D content/browser/background_fetch/background_fetch_job_data_unittest.cc View 1 chunk +0 lines, -180 lines 0 comments Download
M content/browser/background_fetch/background_fetch_job_info.h View 1 4 chunks +34 lines, -0 lines 0 comments Download
M content/browser/background_fetch/background_fetch_job_info.cc View 2 chunks +42 lines, -0 lines 0 comments Download
A content/browser/background_fetch/background_fetch_job_response_data.h View 1 2 3 4 5 6 7 8 9 1 chunk +46 lines, -0 lines 0 comments Download
A content/browser/background_fetch/background_fetch_job_response_data.cc View 1 2 3 1 chunk +33 lines, -0 lines 0 comments Download
M content/browser/background_fetch/background_fetch_request_info.h View 1 2 3 4 5 6 7 8 9 2 chunks +19 lines, -2 lines 0 comments Download
M content/browser/background_fetch/background_fetch_request_info.cc View 1 1 chunk +8 lines, -2 lines 0 comments Download
M content/public/test/fake_download_item.h View 3 chunks +4 lines, -1 line 0 comments Download
M content/public/test/fake_download_item.cc View 2 chunks +8 lines, -5 lines 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 32 (19 generated)
harkness
Currently very light on testing. I'll try to update with more tests tomorrow. One open ...
3 years, 9 months ago (2017-03-23 03:39:14 UTC) #1
Peter Beverloo
Hi Jen, Let me lead with a few higher level comments. - Conceptionally, my mental ...
3 years, 9 months ago (2017-03-25 03:38:51 UTC) #12
Peter Beverloo
On 2017/03/25 03:38:51, Peter Beverloo wrote: > Is it feasible to take bits from this ...
3 years, 9 months ago (2017-03-25 03:54:29 UTC) #13
harkness
At a high level, I was mostly thinking about the DataManager as a nice interface ...
3 years, 9 months ago (2017-03-26 16:13:18 UTC) #14
Peter Beverloo
Let's chat first thing tomorrow. > At a high level, I was mostly thinking about ...
3 years, 9 months ago (2017-03-26 22:32:39 UTC) #15
harkness
https://codereview.chromium.org/2767373002/diff/80001/content/browser/background_fetch/background_fetch_data_manager.cc File content/browser/background_fetch/background_fetch_data_manager.cc (right): https://codereview.chromium.org/2767373002/diff/80001/content/browser/background_fetch/background_fetch_data_manager.cc#newcode90 content/browser/background_fetch/background_fetch_data_manager.cc:90: *(request_infos.begin() + request_index); On 2017/03/26 22:32:39, Peter Beverloo wrote: ...
3 years, 9 months ago (2017-03-27 07:32:38 UTC) #16
harkness
https://codereview.chromium.org/2767373002/diff/100001/content/browser/background_fetch/background_fetch_job_controller.cc File content/browser/background_fetch/background_fetch_job_controller.cc (right): https://codereview.chromium.org/2767373002/diff/100001/content/browser/background_fetch/background_fetch_job_controller.cc#newcode92 content/browser/background_fetch/background_fetch_job_controller.cc:92: item->GetReceivedBytes()); On 2017/03/27 07:32:38, harkness wrote: > On 2017/03/26 ...
3 years, 9 months ago (2017-03-27 08:19:08 UTC) #17
harkness
+avi for file deletion and changes in content/public/test/fake_download_item.*
3 years, 9 months ago (2017-03-27 09:44:45 UTC) #23
Peter Beverloo
lgtm https://codereview.chromium.org/2767373002/diff/140001/content/browser/background_fetch/background_fetch_data_manager.h File content/browser/background_fetch/background_fetch_data_manager.h (right): https://codereview.chromium.org/2767373002/diff/140001/content/browser/background_fetch/background_fetch_data_manager.h#newcode38 content/browser/background_fetch/background_fetch_data_manager.h:38: BackgroundFetchRequestInfos request_infos); It's rather confusing that we use ...
3 years, 9 months ago (2017-03-27 10:01:14 UTC) #24
harkness
https://codereview.chromium.org/2767373002/diff/140001/content/browser/background_fetch/background_fetch_data_manager.h File content/browser/background_fetch/background_fetch_data_manager.h (right): https://codereview.chromium.org/2767373002/diff/140001/content/browser/background_fetch/background_fetch_data_manager.h#newcode38 content/browser/background_fetch/background_fetch_data_manager.h:38: BackgroundFetchRequestInfos request_infos); On 2017/03/27 10:01:14, Peter Beverloo wrote: > ...
3 years, 9 months ago (2017-03-27 11:47:49 UTC) #25
Avi (use Gerrit)
content/public lgtm
3 years, 9 months ago (2017-03-27 14:57:36 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/2767373002/180001
3 years, 9 months ago (2017-03-27 15:00:56 UTC) #29
commit-bot: I haz the power
3 years, 9 months ago (2017-03-27 16:16:10 UTC) #32
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/4a4b593243e2acdedd593b84db51...

Powered by Google App Engine
This is Rietveld 408576698