| 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 91208d9774d8c44e8b3d39343b4be85c3543d6bf..fccde2811681e1e9e5361031942c67567e1cf5dd 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
|
| @@ -794,12 +794,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 id The {@link ContentId} of the download.
|
| */
|
| - @VisibleForTesting
|
| - void cancelNotification(int notificationId, ContentId id) {
|
| + public void cancelNotification(int notificationId, ContentId id) {
|
| mNotificationManager.cancel(NOTIFICATION_NAMESPACE, notificationId);
|
| mDownloadSharedPreferenceHelper.removeSharedPreferenceEntry(id);
|
|
|
| @@ -813,7 +815,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 id The {@link ContentId} of the download.
|
| */
|
| @VisibleForTesting
|
|
|