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

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

Issue 2759193003: Downloads: Properly prune processed actions (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 108435aa619931d60450b1a5c060f88c613a270f..e7f39b2b185d9fd381fa82350f01448cc9dec5b0 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
@@ -114,6 +114,9 @@ public class SystemDownloadNotifier implements DownloadNotifier, Observer {
// If we lose the service mid-loop retrigger the service load and quit.
qinmin 2017/03/23 23:21:00 can this actually happen in the middle of a runnin
David Trainor- moved to gerrit 2017/03/24 00:32:35 I think the service can try to stop itself if it h
qinmin 2017/03/24 05:05:09 you mean service.stopself()? I don't think that ma
David Trainor- moved to gerrit 2017/03/25 03:56:24 Gah lost a big reply by closing the tab :(. So tl
if (mBoundService == null) {
startAndBindToServiceIfNeeded();
+ // Prune the list by pulling out the items we've already processed.
+ mPendingNotifications = new ArrayList<PendingNotificationInfo>(
+ mPendingNotifications.subList(i, mPendingNotifications.size()));
return;
}
updateDownloadNotification(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698