| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/plugin_installer.h" | 5 #include "chrome/browser/plugin_installer.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/process.h" | 10 #include "base/process.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 case DownloadItem::CANCELLED: { | 89 case DownloadItem::CANCELLED: { |
| 90 DownloadCancelled(); | 90 DownloadCancelled(); |
| 91 break; | 91 break; |
| 92 } | 92 } |
| 93 case DownloadItem::REMOVING: { | 93 case DownloadItem::REMOVING: { |
| 94 DCHECK_EQ(kStateDownloading, state_); | 94 DCHECK_EQ(kStateDownloading, state_); |
| 95 state_ = kStateIdle; | 95 state_ = kStateIdle; |
| 96 break; | 96 break; |
| 97 } | 97 } |
| 98 case DownloadItem::INTERRUPTED: { | 98 case DownloadItem::INTERRUPTED: { |
| 99 InterruptReason reason = download->GetLastReason(); | 99 content::DownloadInterruptReason reason = download->GetLastReason(); |
| 100 DownloadError(InterruptReasonDebugString(reason)); | 100 DownloadError(content::InterruptReasonDebugString(reason)); |
| 101 break; | 101 break; |
| 102 } | 102 } |
| 103 case DownloadItem::MAX_DOWNLOAD_STATE: { | 103 case DownloadItem::MAX_DOWNLOAD_STATE: { |
| 104 NOTREACHED(); | 104 NOTREACHED(); |
| 105 return; | 105 return; |
| 106 } | 106 } |
| 107 } | 107 } |
| 108 download->RemoveObserver(this); | 108 download->RemoveObserver(this); |
| 109 } | 109 } |
| 110 | 110 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 DCHECK(state_ == kStateDownloading); | 186 DCHECK(state_ == kStateDownloading); |
| 187 state_ = kStateIdle; | 187 state_ = kStateIdle; |
| 188 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadError(msg)); | 188 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadError(msg)); |
| 189 } | 189 } |
| 190 | 190 |
| 191 void PluginInstaller::DownloadCancelled() { | 191 void PluginInstaller::DownloadCancelled() { |
| 192 DCHECK(state_ == kStateDownloading); | 192 DCHECK(state_ == kStateDownloading); |
| 193 state_ = kStateIdle; | 193 state_ = kStateIdle; |
| 194 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadCancelled()); | 194 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadCancelled()); |
| 195 } | 195 } |
| OLD | NEW |