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

Unified Diff: chrome/browser/android/download/download_manager_service.cc

Issue 2317193002: [Download Home] Don't show canceled downloads (Closed)
Patch Set: Created 4 years, 3 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/browser/android/download/download_manager_service.cc
diff --git a/chrome/browser/android/download/download_manager_service.cc b/chrome/browser/android/download/download_manager_service.cc
index 3c7e9fba92f79feea815d84a86e9fedca2920cf0..5e4a8475a01bfec900365b10ea6e52d04aefcb91 100644
--- a/chrome/browser/android/download/download_manager_service.cc
+++ b/chrome/browser/android/download/download_manager_service.cc
@@ -238,8 +238,11 @@ void DownloadManagerService::OnHistoryQueryComplete() {
void DownloadManagerService::OnDownloadUpdated(
content::DownloadManager* manager, content::DownloadItem* item) {
+ if (java_ref_.is_null())
+ return;
+
// Ignore anything that isn't a completed download notification.
- if (!item->IsDone() || java_ref_.is_null())
+ if (item->GetState() != content::DownloadItem::DownloadState::COMPLETE)
return;
JNIEnv* env = base::android::AttachCurrentThread();
« 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