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 b5f1654c4a74bf5323f64988d9fc932bb992fe76..779dafa79c6368ce49b0eec33ce9e19eb2cc2f33 100644 |
--- a/content/browser/download/download_file_manager.h |
+++ b/content/browser/download/download_file_manager.h |
@@ -144,6 +144,14 @@ class CONTENT_EXPORT DownloadFileManager |
return downloads_.size(); |
} |
+ void SetFileFactoryForTesting(scoped_ptr<DownloadFileFactory> file_factory) { |
+ download_file_factory_.swap(file_factory); |
cbentzel
2012/03/01 15:44:20
What are you trying to do with the swap here (as o
ahendrickson
2012/03/01 20:19:31
This effectively does the same thing as
download_
cbentzel
2012/03/01 22:32:00
OK, normally when I see swap I expect there to be
ahendrickson
2012/03/02 21:58:47
Went the reset() way.
|
+ } |
+ |
+ DownloadFileFactory* GetFileFactoryForTesting() const { |
+ return download_file_factory_.get(); // Explicitly NOT a scoped_ptr. |
+ } |
+ |
private: |
friend class base::RefCountedThreadSafe<DownloadFileManager>; |
friend class DownloadFileManagerTest; |