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

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

Issue 2689373003: Introduce ParallelDownloadJob. (Closed)
Patch Set: nits. Created 3 years, 10 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: content/browser/download/download_manager_impl.h
diff --git a/content/browser/download/download_manager_impl.h b/content/browser/download/download_manager_impl.h
index edf17777986c5213f1841df60c4f376359f701ba..b035d906285087d841585b866e694a4a8ae9cde2 100644
--- a/content/browser/download/download_manager_impl.h
+++ b/content/browser/download/download_manager_impl.h
@@ -40,6 +40,7 @@ class DownloadRequestHandleInterface;
class ResourceContext;
class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager,
+ public UrlDownloader::Delegate,
private DownloadItemImplDelegate {
public:
using DownloadItemImplCreated = base::Callback<void(DownloadItemImpl*)>;
@@ -112,6 +113,13 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager,
DownloadItem* GetDownload(uint32_t id) override;
DownloadItem* GetDownloadByGuid(const std::string& guid) override;
+ // UrlDownloader::Delegate implementation.
+ void OnUrlDownloaderStarted(
+ std::unique_ptr<DownloadCreateInfo> download_create_info,
+ std::unique_ptr<ByteStreamReader> stream_reader,
+ const DownloadUrlParameters::OnStartedCallback& callback) override;
+ void OnUrlDownloaderStopped(UrlDownloader* downloader) override;
+
// For testing; specifically, accessed from TestFileErrorInjector.
void SetDownloadItemFactoryForTesting(
std::unique_ptr<DownloadItemFactory> item_factory);
@@ -119,8 +127,6 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager,
std::unique_ptr<DownloadFileFactory> file_factory);
virtual DownloadFileFactory* GetDownloadFileFactoryForTesting();
- void RemoveUrlDownloader(UrlDownloader* downloader);
-
// Helper function to initiate a download request. This function initiates
// the download using functionality provided by the
// ResourceDispatcherHostImpl::BeginURLRequest function. The function returns
« no previous file with comments | « content/browser/download/download_job_unittest.cc ('k') | content/browser/download/download_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698