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

Unified Diff: content/browser/download/mock_download_file.cc

Issue 10799005: Replace the DownloadFileManager with direct ownership (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged to LKGR. Created 8 years, 4 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
« no previous file with comments | « content/browser/download/mock_download_file.h ('k') | content/browser/download/save_package.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/mock_download_file.cc
diff --git a/content/browser/download/mock_download_file.cc b/content/browser/download/mock_download_file.cc
index d5c7781c9edcd72ac58053637c7f0ba789efc370..9d023722f7d4afebd9e9af653173ab6f4e149bff 100644
--- a/content/browser/download/mock_download_file.cc
+++ b/content/browser/download/mock_download_file.cc
@@ -7,11 +7,19 @@
using ::testing::_;
using ::testing::Return;
+namespace {
+
+void SuccessRun(content::DownloadFile::InitializeCallback callback) {
+ callback.Run(content::DOWNLOAD_INTERRUPT_REASON_NONE);
+}
+
+} // namespace
+
MockDownloadFile::MockDownloadFile() {
// This is here because |Initialize()| is normally called right after
// construction.
- ON_CALL(*this, Initialize())
- .WillByDefault(Return(content::DOWNLOAD_INTERRUPT_REASON_NONE));
+ ON_CALL(*this, Initialize(_))
+ .WillByDefault(::testing::Invoke(SuccessRun));
}
MockDownloadFile::~MockDownloadFile() {
« no previous file with comments | « content/browser/download/mock_download_file.h ('k') | content/browser/download/save_package.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698