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

Unified Diff: content/browser/android/download_controller_android_impl.cc

Issue 16994004: Remove DownloadItem::Is*() in favor of DI::GetState() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@di-getstate-2
Patch Set: Rebased to fix new test, applied suggestions from bauerb and benjhayden Created 7 years, 6 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 | « chrome/browser/ui/webui/downloads_dom_handler.cc ('k') | content/browser/download/download_item_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/download_controller_android_impl.cc
diff --git a/content/browser/android/download_controller_android_impl.cc b/content/browser/android/download_controller_android_impl.cc
index d9b687a854d4cec68f974a97ce2116ebb6e0653b..7d27e64a19310dcdb4c220be6f6aff509648eb57 100644
--- a/content/browser/android/download_controller_android_impl.cc
+++ b/content/browser/android/download_controller_android_impl.cc
@@ -254,10 +254,11 @@ void DownloadControllerAndroidImpl::OnDownloadStarted(
void DownloadControllerAndroidImpl::OnDownloadUpdated(DownloadItem* item) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- if (item->IsDangerous() && !item->IsCancelled())
+ if (item->IsDangerous() &&
+ (item->GetState() != DownloadItem::CANCELLED))
OnDangerousDownload(item);
- if (!item->IsComplete())
+ if (item->GetState() != DownloadItem::COMPLETE)
return;
// Multiple OnDownloadUpdated() notifications may be issued while the download
« no previous file with comments | « chrome/browser/ui/webui/downloads_dom_handler.cc ('k') | content/browser/download/download_item_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698