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

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

Issue 9426029: Test file errors in downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactored per Chris & Randy's comments. Created 8 years, 9 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_file_manager.h
diff --git a/content/browser/download/download_file_manager.h b/content/browser/download/download_file_manager.h
index b5f1654c4a74bf5323f64988d9fc932bb992fe76..3b3d6c37fb9f842e012826361e91d98f06c3b6a0 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_.reset(file_factory.release());
+ }
+
+ DownloadFileFactory* GetFileFactoryForTesting() const {
+ return download_file_factory_.get(); // Explicitly NOT a scoped_ptr.
+ }
+
private:
friend class base::RefCountedThreadSafe<DownloadFileManager>;
friend class DownloadFileManagerTest;

Powered by Google App Engine
This is Rietveld 408576698