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

Issue 2160063002: Allow user to pause/resume incognito downloads (Closed)

Created:
4 years, 5 months ago by qinmin
Modified:
4 years, 4 months ago
Reviewers:
Ted C
CC:
chromium-reviews, asanka
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow user to pause/resume incognito downloads This CL includes the following fixes: 1. When an incognito download is paused, Chrome currently shows a cancel button on Android. There is no way for user to resume the download. However, user can pause and resume incognito download on desktop chrome. This change fixes the above behavior to allow paused incognito download to resume. It also fixes an issue that wrong profile is used when canceling/pausing incognito downloads. 2.The CL fixes the usage of isResumable(bad naming) field in DownloadSharedPreferenceEntry. When a download starts, isResumable is set to !isOffTheRecord. And this CL renames isResumable to isPublic in DownloadSharedPreferenceEntry. The isPublic field allows chrome to determine if a download should fail when browser is killed. 3. When a download is paused, we still need an isResumable(correct naming) variable due to the reason of interruption. So this CL separates download interruption handling from download pausing in DownloadManagerService. BUG=627613 Committed: https://crrev.com/e27efd43ed0ee9ed0c45cd88293536697ab747f5 Cr-Commit-Position: refs/heads/master@{#407640}

Patch Set 1 #

Total comments: 2

Patch Set 2 : use isOffTheRecord instead of isPublic #

Total comments: 2

Patch Set 3 : fix tests #

Patch Set 4 : fix clang warning #

Unified diffs Side-by-side diffs Delta from patch set Stats (+207 lines, -131 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/download/DownloadController.java View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java View 1 2 3 6 chunks +15 lines, -16 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java View 1 10 chunks +62 lines, -48 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotifier.java View 1 chunk +7 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java View 1 5 chunks +12 lines, -11 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java View 3 chunks +15 lines, -4 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadManagerServiceTest.java View 1 5 chunks +20 lines, -14 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadNotificationServiceTest.java View 1 2 6 chunks +39 lines, -9 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/download/MockDownloadNotificationService.java View 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/android/download/download_manager_service.h View 1 3 chunks +8 lines, -4 lines 0 comments Download
M chrome/browser/android/download/download_manager_service.cc View 1 6 chunks +16 lines, -22 lines 0 comments Download
M chrome/browser/android/download/download_manager_service_unittest.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 29 (15 generated)
qinmin
PTAL
4 years, 5 months ago (2016-07-18 22:03:30 UTC) #5
qinmin
ping
4 years, 5 months ago (2016-07-21 17:02:11 UTC) #6
qinmin
ping, Ted, would you please take a look?
4 years, 5 months ago (2016-07-25 17:21:44 UTC) #7
Ted C
https://codereview.chromium.org/2160063002/diff/1/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/2160063002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java#newcode24 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java:24: public final boolean isPublic; // Whether the download is ...
4 years, 5 months ago (2016-07-25 17:33:08 UTC) #8
qinmin
https://codereview.chromium.org/2160063002/diff/1/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/2160063002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java#newcode24 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java:24: public final boolean isPublic; // Whether the download is ...
4 years, 5 months ago (2016-07-25 19:56:01 UTC) #9
Ted C
lgtm https://codereview.chromium.org/2160063002/diff/20001/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadNotificationServiceTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadNotificationServiceTest.java (right): https://codereview.chromium.org/2160063002/diff/20001/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadNotificationServiceTest.java#newcode350 chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadNotificationServiceTest.java:350: assertFalse(entry.isPublic); does this need to get updated?
4 years, 5 months ago (2016-07-25 20:04:34 UTC) #10
qinmin
https://codereview.chromium.org/2160063002/diff/20001/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadNotificationServiceTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadNotificationServiceTest.java (right): https://codereview.chromium.org/2160063002/diff/20001/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadNotificationServiceTest.java#newcode350 chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadNotificationServiceTest.java:350: assertFalse(entry.isPublic); On 2016/07/25 20:04:34, Ted C wrote: > does ...
4 years, 5 months ago (2016-07-25 21:10:34 UTC) #11
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/2160063002/40001
4 years, 5 months ago (2016-07-25 21:11:36 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/101503) linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, ...
4 years, 5 months ago (2016-07-25 21:25:24 UTC) #16
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/2160063002/60001
4 years, 5 months ago (2016-07-25 21:59:20 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/101820)
4 years, 4 months ago (2016-07-25 22:57:24 UTC) #22
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/2160063002/80001
4 years, 4 months ago (2016-07-25 23:11:56 UTC) #25
commit-bot: I haz the power
Committed patchset #4 (id:80001)
4 years, 4 months ago (2016-07-26 00:05:25 UTC) #27
commit-bot: I haz the power
4 years, 4 months ago (2016-07-26 00:09:15 UTC) #29
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/e27efd43ed0ee9ed0c45cd88293536697ab747f5
Cr-Commit-Position: refs/heads/master@{#407640}

Powered by Google App Engine
This is Rietveld 408576698