|
|
Created:
4 years, 6 months ago by qinmin Modified:
4 years, 6 months ago Reviewers:
michaelbai CC:
chromium-reviews, asanka Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionFix an issue that filename is missing in download failure notification
When resuming a download, it is possible that the download is not in
history db.
In this case, native code won't be able to provide the filename.
We need to get the file name from sharedpreferences
BUG=614867
Committed: https://crrev.com/c916d5295b2c636581db6271c242e35bf7394411
Cr-Commit-Position: refs/heads/master@{#396321}
Patch Set 1 : #Patch Set 2 : rebase #Messages
Total messages: 21 (12 generated)
qinmin@chromium.org changed reviewers: + tedchoc@chromium.org
PTAL
qinmin@chromium.org changed reviewers: + michaelbai@chromium.org - tedchoc@chromium.org
+michaelbai as Ted is OOO
rubber stamp LGTM
The CQ bit was checked by qinmin@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2007983007/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2007983007/1
The CQ bit was unchecked by qinmin@chromium.org
Patchset #1 (id:1) has been deleted
The CQ bit was checked by qinmin@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from michaelbai@chromium.org Link to the patchset: https://codereview.chromium.org/2007983007/#ps20001 (title: " ")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2007983007/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2007983007/20001
The CQ bit was unchecked by commit-bot@chromium.org
Failed to apply patch for chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java: While running git apply --index -3 -p1; error: patch failed: chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java:15 Falling back to three-way merge... Applied patch to 'chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java' with conflicts. U chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java Patch: chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java Index: chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java index 6650be754492f4e727a3611fb3330abf78a109ae..17aa535f1f8d2d9ca28a178f359f80a9fa6ae393 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java @@ -15,6 +15,7 @@ import android.content.SharedPreferences; import android.os.Binder; import android.os.IBinder; import android.support.v4.app.NotificationCompat; +import android.text.TextUtils; import org.chromium.base.ContextUtils; import org.chromium.base.Log; @@ -235,6 +236,14 @@ public class DownloadNotificationService extends Service { * @param fileName GUID of the download. */ public void notifyDownloadFailed(int notificationId, String downloadGuid, String fileName) { + // If the download is not in history db, fileName could be empty. Get it from + // SharedPreferences. + if (TextUtils.isEmpty(fileName)) { + DownloadSharedPreferenceEntry entry = getDownloadSharedPreferenceEntry(downloadGuid); + if (entry == null) return; + fileName = entry.fileName; + } + NotificationCompat.Builder builder = buildNotification( android.R.drawable.stat_sys_download_done, fileName, mContext.getResources().getString(R.string.download_notification_failed));
The CQ bit was unchecked by commit-bot@chromium.org
The CQ bit was checked by qinmin@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from michaelbai@chromium.org Link to the patchset: https://codereview.chromium.org/2007983007/#ps40001 (title: "rebase")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2007983007/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2007983007/40001
Message was sent while issue was closed.
Committed patchset #2 (id:40001)
Message was sent while issue was closed.
Description was changed from ========== Fix an issue that filename is missing in download failure notification When resuming a download, it is possible that the download is not in history db. In this case, native code won't be able to provide the filename. We need to get the file name from sharedpreferences BUG=614867 ========== to ========== Fix an issue that filename is missing in download failure notification When resuming a download, it is possible that the download is not in history db. In this case, native code won't be able to provide the filename. We need to get the file name from sharedpreferences BUG=614867 Committed: https://crrev.com/c916d5295b2c636581db6271c242e35bf7394411 Cr-Commit-Position: refs/heads/master@{#396321} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/c916d5295b2c636581db6271c242e35bf7394411 Cr-Commit-Position: refs/heads/master@{#396321} |