Chromium Code Reviews| Index: content/browser/download/download_file_manager.h |
| diff --git a/content/browser/download/download_file_manager.h b/content/browser/download/download_file_manager.h |
| index da86124439a1ca6bb6d83df209afe3b6addb17a3..12767d06bdd88d7e670c7684fb8176cbf0897a7c 100644 |
| --- a/content/browser/download/download_file_manager.h |
| +++ b/content/browser/download/download_file_manager.h |
| @@ -47,6 +47,7 @@ |
| #include "base/gtest_prod_util.h" |
| #include "base/hash_tables.h" |
| #include "base/memory/ref_counted.h" |
| +#include "base/memory/scoped_ptr.h" |
| #include "base/timer.h" |
| #include "content/browser/download/download_id.h" |
| #include "content/browser/download/interrupt_reasons.h" |
| @@ -69,7 +70,21 @@ class DownloadBuffer; |
| class CONTENT_EXPORT DownloadFileManager |
| : public base::RefCountedThreadSafe<DownloadFileManager> { |
| public: |
| - explicit DownloadFileManager(ResourceDispatcherHost* rdh); |
| + class DownloadFileFactory { |
| + public: |
| + virtual ~DownloadFileFactory() {} |
| + |
| + virtual DownloadFile* CreateFile( |
| + DownloadCreateInfo* info, |
| + const DownloadRequestHandle& request_handle, |
| + DownloadManager* download_manager) = 0; |
| + }; |
| + |
| + // Takes ownership of the factory. |
| + // Passing in a NULL for |factory| will cause the default |
|
Randy Smith (Not in Mondays)
2011/12/07 20:57:41
nit: "the" to "a", since we're talking about objec
ahendrickson
2011/12/07 21:11:17
Done.
|
| + // |DownloadFileFactory| to be used. |
| + DownloadFileManager(ResourceDispatcherHost* rdh, |
| + DownloadFileFactory* factory); |
| // Called on shutdown on the UI thread. |
| void Shutdown(); |
| @@ -165,6 +180,7 @@ class CONTENT_EXPORT DownloadFileManager |
| base::RepeatingTimer<DownloadFileManager> update_timer_; |
| ResourceDispatcherHost* resource_dispatcher_host_; |
| + scoped_ptr<DownloadFileFactory> download_file_factory_; |
| DISALLOW_COPY_AND_ASSIGN(DownloadFileManager); |
| }; |