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

Unified Diff: chrome/browser/plugins/plugin_installer.cc

Issue 10912183: Remove DownloadManager::GetDownloadItem in favor of GetDownload() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | « chrome/browser/extensions/webstore_installer.cc ('k') | chrome/browser/ui/webui/downloads_dom_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugins/plugin_installer.cc
diff --git a/chrome/browser/plugins/plugin_installer.cc b/chrome/browser/plugins/plugin_installer.cc
index 79e06813df9a7411fd102b3589402ba736c2d91f..32ac455b5ff84f74f5e2848dfd8a377c8c7c9c28 100644
--- a/chrome/browser/plugins/plugin_installer.cc
+++ b/chrome/browser/plugins/plugin_installer.cc
@@ -230,8 +230,13 @@ void PluginInstaller::DownloadStarted(
DownloadError(msg);
return;
}
- DownloadItem* download_item =
- dlm->GetActiveDownloadItem(download_id.local());
+ DownloadItem* download_item = dlm->GetDownload(download_id.local());
+ // TODO(benjhayden): DCHECK(item && item->IsInProgress()) after figuring out
+ // why DownloadStarted may get net:OK but an invalid id.
+ if (!download_item) {
+ DownloadError("Download not found");
+ return;
+ }
download_item->SetOpenWhenComplete(true);
download_item->AddObserver(this);
}
« no previous file with comments | « chrome/browser/extensions/webstore_installer.cc ('k') | chrome/browser/ui/webui/downloads_dom_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698