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

Issue 1809203006: Switch to use download GUID to indentify download items (Closed)

Created:
4 years, 9 months ago by qinmin
Modified:
4 years, 9 months ago
Reviewers:
Ted C, Mark Mentovai, Torne
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Switch to use download GUID to indentify download items Download GUID is introduced by http://crrev.com/eef62b0282ec19ebc040785d0b7ac36de398cbc1 Unlike download Id, the GUID can live across browser sessions and will not be reused. This change switches the java class to also use the GUID. Chrome will temporarily use the old download Id as the notification Id. This is because the android notification requires an int to identify it, rather than a string. In the future, we will generate the notification Id from java side. The download Ids generated by the Android DownloadManager are not affected by this CL. However, they are only used in OMA downloads and when we call addCompletedDownload(). BUG=593020 Committed: https://crrev.com/30ac0f57a0fcae1a13e6374c05927a04caf526e5 Cr-Commit-Position: refs/heads/master@{#383443}

Patch Set 1 #

Patch Set 2 : adding TODOs and small refactoring #

Patch Set 3 : packing download info inside DownloadItem #

Total comments: 5

Patch Set 4 : adding GuidUtils.java #

Total comments: 1

Patch Set 5 : rebase and move GUID check into java #

Patch Set 6 : fix merge error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+752 lines, -512 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java View 1 2 3 4 5 chunks +11 lines, -10 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/download/DownloadItem.java View 1 2 1 chunk +82 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java View 1 2 3 4 5 35 chunks +216 lines, -189 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java View 1 2 3 4 12 chunks +92 lines, -124 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotifier.java View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java View 1 2 3 4 1 chunk +96 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSnackbarController.java View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/download/OMADownloadHandler.java View 1 2 12 chunks +34 lines, -28 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java View 1 2 3 4 6 chunks +17 lines, -14 lines 0 comments Download
M chrome/android/java_sources.gni View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadManagerServiceTest.java View 1 2 3 4 5 10 chunks +17 lines, -19 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadNotificationServiceTest.java View 1 2 3 4 4 chunks +22 lines, -18 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadTestBase.java View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/download/MockDownloadNotificationService.java View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/download/SystemDownloadNotifierTest.java View 3 chunks +8 lines, -3 lines 0 comments Download
M chrome/browser/android/download/chrome_download_delegate.cc View 1 chunk +9 lines, -6 lines 0 comments Download
M chrome/browser/android/download/download_manager_service.h View 3 chunks +16 lines, -7 lines 0 comments Download
M chrome/browser/android/download/download_manager_service.cc View 1 2 3 4 3 chunks +37 lines, -25 lines 0 comments Download
M chrome/browser/android/download/download_manager_service_unittest.cc View 1 2 3 4 5 chunks +13 lines, -8 lines 0 comments Download
M chrome/browser/android/download/mock_download_controller_android.h View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/android/download/mock_download_controller_android.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/android/download_controller_android_impl.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/android/download_controller_android_impl.cc View 1 2 3 4 6 chunks +18 lines, -9 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java View 1 chunk +2 lines, -2 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/DownloadController.java View 1 2 3 4 8 chunks +25 lines, -18 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/DownloadInfo.java View 1 2 3 4 6 chunks +16 lines, -16 lines 0 comments Download
M content/public/browser/android/download_controller_android.h View 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 37 (15 generated)
qinmin
PTAL
4 years, 9 months ago (2016-03-18 22:30:30 UTC) #2
Ted C
ufft...this makes somewhat hard to read code harder to read. Can we isolate the ids ...
4 years, 9 months ago (2016-03-22 00:20:06 UTC) #3
qinmin
On 2016/03/22 00:20:06, Ted C wrote: > ufft...this makes somewhat hard to read code harder ...
4 years, 9 months ago (2016-03-23 23:29:21 UTC) #4
qinmin
On 2016/03/23 23:29:21, qinmin wrote: > On 2016/03/22 00:20:06, Ted C wrote: > > ufft...this ...
4 years, 9 months ago (2016-03-24 07:34:47 UTC) #6
Ted C
https://codereview.chromium.org/1809203006/diff/60001/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/1809203006/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java#newcode39 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java:39: static DownloadSharedPreferenceEntry parseFromString(String sharedPrefString) { all previous shared preferences ...
4 years, 9 months ago (2016-03-24 20:52:21 UTC) #7
qinmin
https://codereview.chromium.org/1809203006/diff/60001/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/1809203006/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java#newcode39 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java:39: static DownloadSharedPreferenceEntry parseFromString(String sharedPrefString) { On 2016/03/24 20:52:21, Ted ...
4 years, 9 months ago (2016-03-24 22:56:07 UTC) #8
qinmin
+yfriedman for base/android/ OWNER
4 years, 9 months ago (2016-03-24 23:04:55 UTC) #10
Ted C
lgtm https://codereview.chromium.org/1809203006/diff/60001/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/1809203006/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java#newcode39 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java:39: static DownloadSharedPreferenceEntry parseFromString(String sharedPrefString) { On 2016/03/24 22:56:07, ...
4 years, 9 months ago (2016-03-25 00:18:02 UTC) #11
Ted C
https://codereview.chromium.org/1809203006/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/1809203006/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java#newcode18 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java:18: private static final int VERSION = 1; oh you ...
4 years, 9 months ago (2016-03-25 00:18:34 UTC) #12
qinmin
+torne for base/android OWNER +mark for base/OWNER
4 years, 9 months ago (2016-03-25 14:35:29 UTC) #14
Mark Mentovai
LGTM in base. I didn’t look in base/android or at anything else.
4 years, 9 months ago (2016-03-25 14:41:17 UTC) #15
asanka
On 2016/03/25 at 14:41:17, mark wrote: > LGTM in base. I didn’t look in base/android ...
4 years, 9 months ago (2016-03-25 15:23:37 UTC) #16
Ted C
On 2016/03/25 15:23:37, asanka wrote: > On 2016/03/25 at 14:41:17, mark wrote: > > LGTM ...
4 years, 9 months ago (2016-03-25 16:20:28 UTC) #17
qinmin
On 2016/03/25 16:20:28, Ted C wrote: > On 2016/03/25 15:23:37, asanka wrote: > > On ...
4 years, 9 months ago (2016-03-25 16:29:21 UTC) #18
qinmin
On 2016/03/25 16:29:21, qinmin wrote: > On 2016/03/25 16:20:28, Ted C wrote: > > On ...
4 years, 9 months ago (2016-03-25 16:44:59 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1809203006/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1809203006/100001
4 years, 9 months ago (2016-03-25 22:54:33 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/43795)
4 years, 9 months ago (2016-03-25 23:10:02 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1809203006/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1809203006/120001
4 years, 9 months ago (2016-03-26 00:21:19 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/41141)
4 years, 9 months ago (2016-03-26 01:28:28 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1809203006/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1809203006/160001
4 years, 9 months ago (2016-03-26 03:36:26 UTC) #34
commit-bot: I haz the power
Committed patchset #6 (id:160001)
4 years, 9 months ago (2016-03-26 04:13:50 UTC) #35
commit-bot: I haz the power
4 years, 9 months ago (2016-03-26 04:15:08 UTC) #37
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/30ac0f57a0fcae1a13e6374c05927a04caf526e5
Cr-Commit-Position: refs/heads/master@{#383443}

Powered by Google App Engine
This is Rietveld 408576698