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

Unified Diff: chrome/browser/ui/webui/downloads_dom_handler.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: 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
Index: chrome/browser/ui/webui/downloads_dom_handler.cc
diff --git a/chrome/browser/ui/webui/downloads_dom_handler.cc b/chrome/browser/ui/webui/downloads_dom_handler.cc
index 3600c5f5cdd41c4816669f6475e97ecfb57e4d19..3b50c9af54d6496d2f7c286e94c704da9a01c892 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler.cc
+++ b/chrome/browser/ui/webui/downloads_dom_handler.cc
@@ -358,7 +358,8 @@ void DownloadsDOMHandler::HandleDrag(const base::ListValue* args) {
content::DownloadItem* file = GetDownloadByValue(args);
content::WebContents* web_contents = GetWebUIWebContents();
// |web_contents| is only NULL in the test.
- if (!file || !web_contents || !file->IsComplete())
+ if (!file || !web_contents ||
Bernhard Bauer 2013/06/13 19:07:23 It might be slightly more readable if you break th
+ (file->GetState() != content::DownloadItem::COMPLETE))
return;
gfx::Image* icon = g_browser_process->icon_manager()->LookupIconFromFilepath(
file->GetTargetFilePath(), IconLoader::NORMAL);

Powered by Google App Engine
This is Rietveld 408576698