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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/download/mock_download_file.h" 5 #include "content/browser/download/mock_download_file.h"
6 #include "testing/gmock/include/gmock/gmock.h" 6 #include "testing/gmock/include/gmock/gmock.h"
7 7
8 using ::testing::_; 8 using ::testing::_;
9 using ::testing::Return; 9 using ::testing::Return;
10 10
11 namespace {
12
13 void SuccessRun(const content::DownloadFile::InitializeCallback& callback) {
14 callback.Run(content::DOWNLOAD_INTERRUPT_REASON_NONE);
15 }
16
17 } // namespace
18
11 MockDownloadFile::MockDownloadFile() { 19 MockDownloadFile::MockDownloadFile() {
12 // This is here because |Initialize()| is normally called right after 20 // This is here because |Initialize()| is normally called right after
13 // construction. 21 // construction.
14 ON_CALL(*this, Initialize()) 22 ON_CALL(*this, Initialize(_))
15 .WillByDefault(Return(content::DOWNLOAD_INTERRUPT_REASON_NONE)); 23 .WillByDefault(::testing::Invoke(SuccessRun));
16 } 24 }
17 25
18 MockDownloadFile::~MockDownloadFile() { 26 MockDownloadFile::~MockDownloadFile() {
19 } 27 }
OLDNEW
« 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