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

Unified Diff: chrome/browser/download/chrome_download_manager_delegate.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
Index: chrome/browser/download/chrome_download_manager_delegate.cc
diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc
index 528520cca56f5f5738c2a41d3ae1c7ba98965197..ffcb1e0ae5785e85581a1940d2eff92017790cd0 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
@@ -624,8 +624,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadUrlDone(
const content::DownloadTargetCallback& callback,
DownloadProtectionService::DownloadCheckResult result) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DownloadItem* download =
- download_manager_->GetActiveDownloadItem(download_id);
+ DownloadItem* download = download_manager_->GetDownload(download_id);
Randy Smith (Not in Mondays) 2012/09/11 19:02:21 So this seems like a behavior change that I don't
benjhayden 2012/09/12 18:17:25 Done.
if (!download)
return;
@@ -644,7 +643,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadUrlDone(
void ChromeDownloadManagerDelegate::CheckClientDownloadDone(
int32 download_id,
DownloadProtectionService::DownloadCheckResult result) {
- DownloadItem* item = download_manager_->GetActiveDownloadItem(download_id);
+ DownloadItem* item = download_manager_->GetDownload(download_id);
if (!item)
return;
@@ -689,7 +688,7 @@ void ChromeDownloadManagerDelegate::Observe(
int download_id = crx_installers_[installer];
crx_installers_.erase(installer.get());
- DownloadItem* item = download_manager_->GetActiveDownloadItem(download_id);
+ DownloadItem* item = download_manager_->GetDownload(download_id);
if (item)
item->DelayedDownloadOpened(installer->did_handle_successfully());
}
@@ -702,7 +701,7 @@ void ChromeDownloadManagerDelegate::CheckVisitedReferrerBeforeDone(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DownloadItem* download =
- download_manager_->GetActiveDownloadItem(download_id);
+ download_manager_->GetDownload(download_id);
if (!download)
return;
@@ -813,7 +812,7 @@ void ChromeDownloadManagerDelegate::SubstituteDriveDownloadPathCallback(
const FilePath& suggested_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DownloadItem* download =
- download_manager_->GetActiveDownloadItem(download_id);
+ download_manager_->GetDownload(download_id);
if (!download)
return;
@@ -835,7 +834,7 @@ void ChromeDownloadManagerDelegate::OnPathReservationAvailable(
bool reserved_path_verified) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DownloadItem* download =
- download_manager_->GetActiveDownloadItem(download_id);
+ download_manager_->GetDownload(download_id);
if (!download)
return;
if (should_prompt || !reserved_path_verified) {
@@ -862,7 +861,7 @@ void ChromeDownloadManagerDelegate::OnTargetPathDetermined(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
FilePath intermediate_path;
DownloadItem* download =
- download_manager_->GetActiveDownloadItem(download_id);
+ download_manager_->GetDownload(download_id);
if (!download)
return;

Powered by Google App Engine
This is Rietveld 408576698