| 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 4658f1de5a0d4b2a3302202a0ee2122702532f7b..58d47749dd6ff15fded94f41ce9ca3755456729f 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
|
| @@ -796,12 +796,14 @@ public class DownloadNotificationService extends Service {
|
| }
|
|
|
| /**
|
| - * Cancel a download notification.
|
| + * Removes a download notification and all associated tracking. This method relies on the
|
| + * caller to provide the notification id, which is useful in the case where the internal
|
| + * tracking doesn't exist (e.g. in the case of a successful download, where we show the download
|
| + * completed notification and remove our internal state tracking).
|
| * @param notificationId Notification ID of the download
|
| * @param downloadGuid GUID of the download.
|
| */
|
| - @VisibleForTesting
|
| - void cancelNotification(int notificationId, String downloadGuid) {
|
| + public void cancelNotification(int notificationId, String downloadGuid) {
|
| mNotificationManager.cancel(NOTIFICATION_NAMESPACE, notificationId);
|
| mDownloadSharedPreferenceHelper.removeSharedPreferenceEntry(downloadGuid);
|
|
|
| @@ -816,7 +818,8 @@ public class DownloadNotificationService extends Service {
|
| }
|
|
|
| /**
|
| - * Called when a download is canceled.
|
| + * Called when a download is canceled. This method uses internal tracking to try to find the
|
| + * notification id to cancel.
|
| * @param downloadGuid GUID of the download.
|
| */
|
| @VisibleForTesting
|
|
|