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

Unified Diff: chrome/browser/plugin_installer.cc

Issue 10665049: Make DownloadHistory observe manager, items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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/plugin_installer.cc
diff --git a/chrome/browser/plugin_installer.cc b/chrome/browser/plugin_installer.cc
index f79566211f87cc90e2960f9006b3814380020d66..bcfbecc28a1c8ec5f3d6f4e161b6d66bd7c8f229 100644
--- a/chrome/browser/plugin_installer.cc
+++ b/chrome/browser/plugin_installer.cc
@@ -150,11 +150,6 @@ void PluginInstaller::OnDownloadUpdated(DownloadItem* download) {
DownloadCancelled();
break;
}
- case DownloadItem::REMOVING: {
- DCHECK_EQ(INSTALLER_STATE_DOWNLOADING, state_);
- state_ = INSTALLER_STATE_IDLE;
- break;
- }
case DownloadItem::INTERRUPTED: {
content::DownloadInterruptReason reason = download->GetLastReason();
DownloadError(content::InterruptReasonDebugString(reason));
@@ -168,7 +163,10 @@ void PluginInstaller::OnDownloadUpdated(DownloadItem* download) {
download->RemoveObserver(this);
}
-void PluginInstaller::OnDownloadOpened(DownloadItem* download) {
+void PluginInstaller::OnDownloadDestroyed(DownloadItem* download) {
+ DCHECK_EQ(INSTALLER_STATE_DOWNLOADING, state_);
+ state_ = INSTALLER_STATE_IDLE;
+ download->RemoveObserver(this);
}
void PluginInstaller::AddObserver(PluginInstallerObserver* observer) {

Powered by Google App Engine
This is Rietveld 408576698