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

Issue 2117343007: Show download error message if sdcard is not available (Closed)

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

Description

Show download error message if sdcard is not available Currently when downloading a file without sdcard, Chrome shows the overwrite infobar. And if user acks that infobar, the file will be downloaded to Chrome's own dir. And the downloaded file cannot be opened by other apps, making it useless. This CL fixes that behavior by showing a "missing sdcard" message when sdcard is not available. Chrome will no longer try to generate a path under its own dir if sdcard is not available. If snackbar is available, the error message will be displayed on snackbar. Otherwise, a toast will be shown. BUG=624912 Committed: https://crrev.com/7cf649da41128daf23ce3f631fe19f89b8da6a76 Cr-Commit-Position: refs/heads/master@{#405833}

Patch Set 1 #

Total comments: 12

Patch Set 2 : nits #

Patch Set 3 : clean up document dir if no sdcard is found #

Total comments: 4

Patch Set 4 : adding more comments #

Patch Set 5 : fix test, remove document dir cleaning code, will do it in another CL #

Patch Set 6 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+118 lines, -41 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java View 1 2 3 4 5 2 chunks +57 lines, -34 lines 0 comments Download
M chrome/browser/android/download/download_controller.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/android/download/download_manager_service.h View 1 2 3 4 5 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/android/download/download_manager_service.cc View 1 2 3 4 5 1 chunk +15 lines, -0 lines 0 comments Download
M chrome/browser/download/download_path_reservation_tracker.cc View 1 2 3 4 5 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/download/download_path_reservation_tracker_unittest.cc View 1 2 3 4 5 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/download/download_target_determiner.cc View 1 2 3 4 5 2 chunks +23 lines, -7 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (12 generated)
qinmin
PTAL
4 years, 5 months ago (2016-07-06 23:15:31 UTC) #2
Ilya Sherman
histograms.xml lgtm
4 years, 5 months ago (2016-07-06 23:43:59 UTC) #3
Yaron
https://codereview.chromium.org/2117343007/diff/1/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java File chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java (right): https://codereview.chromium.org/2117343007/diff/1/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java#newcode1433 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java:1433: private void onDownloadCanceled(String fileName, boolean isExternalStorageMissing) { If you ...
4 years, 5 months ago (2016-07-07 19:24:24 UTC) #4
qinmin
https://codereview.chromium.org/2117343007/diff/1/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java File chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java (right): https://codereview.chromium.org/2117343007/diff/1/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java#newcode1433 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java:1433: private void onDownloadCanceled(String fileName, boolean isExternalStorageMissing) { On 2016/07/07 ...
4 years, 5 months ago (2016-07-07 21:09:48 UTC) #5
asanka
Should we add code to clean up the inaccessible files that may have been downloaded? ...
4 years, 5 months ago (2016-07-07 21:12:48 UTC) #6
Yaron
lgtm
4 years, 5 months ago (2016-07-07 22:00:58 UTC) #7
qinmin
On 2016/07/07 21:12:48, asanka wrote: > Should we add code to clean up the inaccessible ...
4 years, 5 months ago (2016-07-07 22:47:28 UTC) #8
qinmin
https://codereview.chromium.org/2117343007/diff/1/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java File chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java (right): https://codereview.chromium.org/2117343007/diff/1/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java#newcode1434 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java:1434: int reason = isExternalStorageMissing ? DownloadManager.ERROR_DEVICE_NOT_FOUND On 2016/07/07 21:12:48, ...
4 years, 5 months ago (2016-07-07 22:49:37 UTC) #10
qinmin
ping, asanka@, would you please take another look. Would like to submit this before you ...
4 years, 5 months ago (2016-07-11 16:59:36 UTC) #11
asanka
lgtm % comment change. I'm a bit concerned that removing DIR_USER_DOCUMENTS with no UI may ...
4 years, 5 months ago (2016-07-12 17:07:10 UTC) #12
qinmin
https://codereview.chromium.org/2117343007/diff/60001/chrome/browser/android/download/download_manager_service.cc File chrome/browser/android/download/download_manager_service.cc (right): https://codereview.chromium.org/2117343007/diff/60001/chrome/browser/android/download/download_manager_service.cc#newcode36 chrome/browser/android/download/download_manager_service.cc:36: void ClearUnusedDownloads() { On 2016/07/12 17:07:10, asanka wrote: > ...
4 years, 5 months ago (2016-07-12 18:13:04 UTC) #13
qinmin
Yaron, is it ok to nuke the Documents dir under Chrome app dir? This is ...
4 years, 5 months ago (2016-07-12 18:16:59 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/2117343007/100001
4 years, 5 months ago (2016-07-14 21:32:12 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/104334)
4 years, 5 months ago (2016-07-14 23:19:32 UTC) #19
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/2117343007/120001
4 years, 5 months ago (2016-07-15 17:49:05 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/36569) ios-device-gn on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 5 months ago (2016-07-15 17:51:37 UTC) #25
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/2117343007/140001
4 years, 5 months ago (2016-07-15 18:47:20 UTC) #28
commit-bot: I haz the power
Committed patchset #6 (id:140001)
4 years, 5 months ago (2016-07-15 19:56:57 UTC) #29
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-15 19:57:15 UTC) #30
commit-bot: I haz the power
4 years, 5 months ago (2016-07-15 19:59:31 UTC) #32
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/7cf649da41128daf23ce3f631fe19f89b8da6a76
Cr-Commit-Position: refs/heads/master@{#405833}

Powered by Google App Engine
This is Rietveld 408576698