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

Issue 2768953002: Initial work to move downloads to ContentIds (Closed)

Created:
3 years, 9 months ago by David Trainor- moved to gerrit
Modified:
3 years, 8 months ago
Reviewers:
qinmin, gone, fgorski
CC:
chromium-reviews, asanka, dewittj+watch_chromium.org, Peter Beverloo, fgorski+watch_chromium.org, romax+watch_chromium.org, petewil+watch_chromium.org, chili+watch_chromium.org, agrieve+watch_chromium.org, harkness+watch_chromium.org, dimich+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Initial work to move downloads to ContentIds Right now the DownloadNotificationService identifies downloads by a GUID and a boolean, which lets it both uniquely identify that item and associate it with an underlying provider (download or offline page). We're moving all downloaded content to be identified by a ContentId and represented as an OfflineItem. As part of that work (based on need priority) we're moving the DownloadNotificationService to use ContentIds instead of a GUID and boolean. Migration details: 1. Downloads will be given the namespace LEGACY_DOWNLOADS until they are migrated. 2. Offline pages will be given the namespace LEGACY_OFFLINE_PAGES until they are migrated. 3. The backend provider will be determined by the ContentId based on the legacy constants mentioned above. BUG=691805 Review-Url: https://codereview.chromium.org/2768953002 Cr-Commit-Position: refs/heads/master@{#460319} Committed: https://chromium.googlesource.com/chromium/src/+/8b97a74f58c8b45a85de5c5521a58a54a0935700

Patch Set 1 #

Total comments: 2

Patch Set 2 : Tweaks based on self review #

Patch Set 3 : Fixed refactor build break #

Patch Set 4 : Add comments, fix equality bug #

Patch Set 5 : Added missing override #

Total comments: 18

Patch Set 6 : Updated serialization code, added tests, fixed tests #

Patch Set 7 : Fix test breaks #

Patch Set 8 : Fix checkdeps and fix assert #

Patch Set 9 : Rebased #

Patch Set 10 : Rebased again #

Patch Set 11 : Rebase because of a conflict... with a single. import. :( #

Unified diffs Side-by-side diffs Delta from patch set Stats (+723 lines, -397 lines) Patch
M chrome/android/BUILD.gn View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastReceiver.java View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/download/DownloadInfo.java View 1 2 6 chunks +18 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/download/DownloadItem.java View 1 2 3 4 5 6 5 chunks +15 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java View 1 2 3 4 5 6 7 8 5 chunks +16 lines, -14 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java View 1 2 3 4 5 6 25 chunks +167 lines, -167 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/download/DownloadServiceDelegate.java View 1 chunk +8 lines, -5 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java View 1 2 3 4 5 7 chunks +202 lines, -68 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceHelper.java View 7 chunks +20 lines, -19 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSnackbarController.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java View 1 2 3 4 3 chunks +12 lines, -13 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/download/ui/DownloadHistoryAdapter.java View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/offlinepages/downloads/OfflinePageDownloadBridge.java View 3 chunks +9 lines, -8 lines 0 comments Download
M chrome/android/javatests/DEPS View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadManagerServiceTest.java View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadNotificationServiceTest.java View 1 2 3 4 5 6 11 chunks +42 lines, -43 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/download/MockDownloadNotificationService.java View 3 chunks +16 lines, -18 lines 0 comments Download
M chrome/android/junit/DEPS View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntryTest.java View 1 2 3 4 5 11 chunks +96 lines, -29 lines 0 comments Download
M components/offline_items_collection/core/BUILD.gn View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/ContentId.java View 1 2 3 4 5 6 7 2 chunks +24 lines, -2 lines 0 comments Download
A components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/LegacyHelpers.java View 1 2 3 4 5 1 chunk +53 lines, -0 lines 0 comments Download
M components/offline_items_collection/core/offline_item.h View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M components/offline_items_collection/core/offline_item.cc View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 58 (43 generated)
David Trainor- moved to gerrit
https://codereview.chromium.org/2768953002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadItem.java File chrome/android/java/src/org/chromium/chrome/browser/download/DownloadItem.java (right): https://codereview.chromium.org/2768953002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadItem.java#newcode60 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadItem.java:60: mContentId.id = getId(); TODO(me): Is this right? https://codereview.chromium.org/2768953002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java File ...
3 years, 9 months ago (2017-03-22 21:36:00 UTC) #2
David Trainor- moved to gerrit
Hey all! This patch attempts to migrate the DownloadNotificationService to use ContentIds for all download ...
3 years, 9 months ago (2017-03-23 02:23:09 UTC) #17
gone
lgtm I know you said you have some corrections to this CL, but for the ...
3 years, 9 months ago (2017-03-24 01:52:17 UTC) #18
fgorski
mostly looks good, but think about the version upgrade. https://codereview.chromium.org/2768953002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java File chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java (right): https://codereview.chromium.org/2768953002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java#newcode66 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java:66: ...
3 years, 9 months ago (2017-03-24 16:49:32 UTC) #19
qinmin
lgtm % comment https://codereview.chromium.org/2768953002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java File chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java (right): https://codereview.chromium.org/2768953002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java#newcode72 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java:72: } else if (version == 4 ...
3 years, 9 months ago (2017-03-24 21:17:25 UTC) #20
David Trainor- moved to gerrit
ptal thanks! https://codereview.chromium.org/2768953002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadItem.java File chrome/android/java/src/org/chromium/chrome/browser/download/DownloadItem.java (right): https://codereview.chromium.org/2768953002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadItem.java#newcode57 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadItem.java:57: * @return A {@link ContentId} that represents ...
3 years, 9 months ago (2017-03-24 22:12:01 UTC) #21
fgorski
lgtm. Thanks for breaking down the preference version parsing.
3 years, 8 months ago (2017-03-28 22:25:49 UTC) #38
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/2768953002/160001
3 years, 8 months ago (2017-03-28 22:37:55 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/396893)
3 years, 8 months ago (2017-03-28 23:24:45 UTC) #43
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/2768953002/180001
3 years, 8 months ago (2017-03-28 23:30:43 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/350190)
3 years, 8 months ago (2017-03-29 01:12:56 UTC) #48
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/2768953002/180001
3 years, 8 months ago (2017-03-29 04:17:59 UTC) #50
commit-bot: I haz the power
Failed to apply patch for chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadManagerServiceTest.java: While running git apply --index -3 -p1; error: patch ...
3 years, 8 months ago (2017-03-29 05:39:34 UTC) #52
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/2768953002/200001
3 years, 8 months ago (2017-03-29 05:49:03 UTC) #55
commit-bot: I haz the power
3 years, 8 months ago (2017-03-29 07:39:56 UTC) #58
Message was sent while issue was closed.
Committed patchset #11 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/8b97a74f58c8b45a85de5c5521a5...

Powered by Google App Engine
This is Rietveld 408576698