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

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

Issue 8770024: Added a download file factory to the download file manager, for testing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merged with trunk. Created 9 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_file_manager.h
diff --git a/content/browser/download/download_file_manager.h b/content/browser/download/download_file_manager.h
index da86124439a1ca6bb6d83df209afe3b6addb17a3..628cb33615a10df9537310c0207d3243616d594d 100644
--- a/content/browser/download/download_file_manager.h
+++ b/content/browser/download/download_file_manager.h
@@ -69,7 +69,18 @@ class DownloadBuffer;
class CONTENT_EXPORT DownloadFileManager
: public base::RefCountedThreadSafe<DownloadFileManager> {
public:
- explicit DownloadFileManager(ResourceDispatcherHost* rdh);
+ class DownloadFileFactory {
+ public:
+ virtual ~DownloadFileFactory() {}
+
+ virtual DownloadFile* GetFile(DownloadCreateInfo* info,
Randy Smith (Not in Mondays) 2011/12/05 22:25:38 nit, suggestion: I'd call this CreateFile.
ahendrickson 2011/12/07 19:55:15 Done.
+ const DownloadRequestHandle& request_handle,
+ DownloadManager* download_manager) = 0;
+ };
+
+ // Takes ownership of the factory.
+ DownloadFileManager(ResourceDispatcherHost* rdh,
+ DownloadFileFactory* factory);
// Called on shutdown on the UI thread.
void Shutdown();
@@ -165,6 +176,7 @@ class CONTENT_EXPORT DownloadFileManager
base::RepeatingTimer<DownloadFileManager> update_timer_;
ResourceDispatcherHost* resource_dispatcher_host_;
+ DownloadFileFactory* download_file_factory_;
cbentzel 2011/12/07 18:58:21 this should be a scoped_ptr if it takes ownership
ahendrickson 2011/12/07 19:55:15 Done.
DISALLOW_COPY_AND_ASSIGN(DownloadFileManager);
};

Powered by Google App Engine
This is Rietveld 408576698