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

Unified Diff: content/browser/download/download_manager_impl.cc

Issue 1533583002: [Downloads] Factor out request handling logic between DRH and UD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Why aren't there tests for sniffed MIME types? Created 5 years 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: content/browser/download/download_manager_impl.cc
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index 89c63df9e13685d3b8b7ca876d93cfd6c19f7d08..44322c6430c84eb9938d7ffed266bfcf9759d105 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -134,10 +134,10 @@ scoped_ptr<UrlDownloader, BrowserThread::DeleteOnIOThread> BeginDownload(
return nullptr;
}
return scoped_ptr<UrlDownloader, BrowserThread::DeleteOnIOThread>(
- UrlDownloader::BeginDownload(
- download_manager, request.Pass(), params->referrer(), false,
- params->prefer_cache(), true, save_info.Pass(), download_id,
- params->callback())
+ UrlDownloader::BeginDownload(download_manager, request.Pass(),
+ params->referrer(), params->prefer_cache(),
+ save_info.Pass(), download_id,
+ params->callback())
.release());
}
@@ -378,7 +378,7 @@ void DownloadManagerImpl::StartDownloadWithId(
// If the download is no longer known to the DownloadManager, then it was
// removed after it was resumed. Ignore. If the download is cancelled
// while resuming, then also ignore the request.
- info->request_handle.CancelRequest();
+ info->request_handle->CancelRequest();
if (!on_started.is_null())
on_started.Run(NULL, DOWNLOAD_INTERRUPT_REASON_USER_CANCELED);
return;
@@ -411,9 +411,7 @@ void DownloadManagerImpl::StartDownloadWithId(
delegate_->ApplicationClientIdForFileScanning());
}
- scoped_ptr<DownloadRequestHandleInterface> req_handle(
- new DownloadRequestHandle(info->request_handle));
- download->Start(download_file.Pass(), req_handle.Pass());
+ download->Start(download_file.Pass(), info->request_handle.Pass());
// For interrupted downloads, Start() will transition the state to
// IN_PROGRESS and consumers will be notified via OnDownloadUpdated().

Powered by Google App Engine
This is Rietveld 408576698