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

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

Issue 1418663010: Adding WebContent-free Download (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing nits. 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.h
diff --git a/content/browser/download/download_manager_impl.h b/content/browser/download/download_manager_impl.h
index 372fd58b6169c8d383653017eedd0426116b0bf6..df650fccdba8f7503004b666baebdce7c1622ef8 100644
--- a/content/browser/download/download_manager_impl.h
+++ b/content/browser/download/download_manager_impl.h
@@ -8,9 +8,11 @@
#include <map>
#include <set>
#include <string>
+#include <vector>
#include "base/callback_forward.h"
#include "base/containers/hash_tables.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
@@ -18,7 +20,9 @@
#include "base/sequenced_task_runner_helpers.h"
#include "base/synchronization/lock.h"
#include "content/browser/download/download_item_impl_delegate.h"
+#include "content/browser/download/url_downloader.h"
#include "content/common/content_export.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/browser/download_manager.h"
#include "content/public/browser/download_manager_delegate.h"
#include "content/public/browser/download_url_parameters.h"
@@ -109,6 +113,8 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager,
scoped_ptr<DownloadFileFactory> file_factory);
virtual DownloadFileFactory* GetDownloadFileFactoryForTesting();
+ void RemoveUrlDownloader(UrlDownloader* downloader);
+
private:
typedef std::set<DownloadItem*> DownloadSet;
typedef base::hash_map<uint32, DownloadItemImpl*> DownloadMap;
@@ -168,6 +174,9 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager,
void ShowDownloadInShell(DownloadItemImpl* download) override;
void DownloadRemoved(DownloadItemImpl* download) override;
+ void AddUrlDownloader(
+ scoped_ptr<UrlDownloader, BrowserThread::DeleteOnIOThread> downloader);
+
// Factory for creation of downloads items.
scoped_ptr<DownloadItemFactory> item_factory_;
@@ -196,6 +205,9 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager,
net::NetLog* net_log_;
+ std::vector<scoped_ptr<UrlDownloader, BrowserThread::DeleteOnIOThread>>
+ url_downloaders_;
+
base::WeakPtrFactory<DownloadManagerImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl);

Powered by Google App Engine
This is Rietveld 408576698