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

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

Issue 10912173: Replace the DownloadFileManager with direct ownership of DownloadFileImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync'd to LKGR (r162700) Created 8 years, 2 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 233d95e046b122362fcb8c83e1a9433751a08ede..74e560bad8af335f2411bb40704a7551d4743ddf 100644
--- a/content/browser/download/mock_download_file.cc
+++ b/content/browser/download/mock_download_file.cc
@@ -8,11 +8,19 @@
using ::testing::_;
using ::testing::Return;
+namespace {
+
+void SuccessRun(const 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