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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java

Issue 2446643004: Fixing a crash when clicking download notification while Chrome is killed (Closed)
Patch Set: nit Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java b/chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java
index 530ba2e6876eb9556e83c7609517fd521f7bff84..4305ae1cf224ab59242c50720dbd895b990b416e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java
@@ -55,6 +55,7 @@ public class SystemDownloadNotifier implements DownloadNotifier {
public boolean canDownloadWhileMetered;
public boolean canResolve;
public long systemDownloadId;
+ public boolean isSupportedMimeType;
public PendingNotificationInfo(int type, DownloadInfo downloadInfo) {
this.type = type;
@@ -178,11 +179,12 @@ public class SystemDownloadNotifier implements DownloadNotifier {
@Override
public void notifyDownloadSuccessful(DownloadInfo downloadInfo, long systemDownloadId,
- boolean canResolve) {
+ boolean canResolve, boolean isSupportedMimeType) {
PendingNotificationInfo info =
new PendingNotificationInfo(DOWNLOAD_NOTIFICATION_TYPE_SUCCESS, downloadInfo);
info.canResolve = canResolve;
info.systemDownloadId = systemDownloadId;
+ info.isSupportedMimeType = isSupportedMimeType;
updateDownloadNotification(info);
}
@@ -281,7 +283,8 @@ public class SystemDownloadNotifier implements DownloadNotifier {
case DOWNLOAD_NOTIFICATION_TYPE_SUCCESS:
final int notificationId = mBoundService.notifyDownloadSuccessful(
info.getDownloadGuid(), info.getFilePath(), info.getFileName(),
- notificationInfo.systemDownloadId, info.isOfflinePage());
+ notificationInfo.systemDownloadId, info.isOfflinePage(),
+ notificationInfo.isSupportedMimeType);
onSuccessNotificationShown(notificationInfo, notificationId);
stopServiceIfNeeded();
break;

Powered by Google App Engine
This is Rietveld 408576698