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

Side by Side Diff: content/browser/download/mock_download_file.h

Issue 11366121: Split DownloadFile::Rename into RenameAndUniquify and RenameAndAnnotate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to LKGR. Created 8 years, 1 month 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
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 #ifndef CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_FILE_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_FILE_H_
6 #define CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_FILE_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_FILE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <map> 9 #include <map>
10 10
(...skipping 11 matching lines...) Expand all
22 class MockDownloadFile : virtual public DownloadFile { 22 class MockDownloadFile : virtual public DownloadFile {
23 public: 23 public:
24 MockDownloadFile(); 24 MockDownloadFile();
25 virtual ~MockDownloadFile(); 25 virtual ~MockDownloadFile();
26 26
27 // DownloadFile functions. 27 // DownloadFile functions.
28 MOCK_METHOD1(Initialize, void(const InitializeCallback&)); 28 MOCK_METHOD1(Initialize, void(const InitializeCallback&));
29 MOCK_METHOD2(AppendDataToFile, DownloadInterruptReason( 29 MOCK_METHOD2(AppendDataToFile, DownloadInterruptReason(
30 const char* data, size_t data_len)); 30 const char* data, size_t data_len));
31 MOCK_METHOD1(Rename, DownloadInterruptReason(const FilePath& full_path)); 31 MOCK_METHOD1(Rename, DownloadInterruptReason(const FilePath& full_path));
32 MOCK_METHOD3(Rename, void(const FilePath& full_path, 32 MOCK_METHOD2(RenameAndUniquify,
33 bool overwrite_existing_file, 33 void(const FilePath& full_path,
34 const RenameCompletionCallback& callback)); 34 const RenameCompletionCallback& callback));
35 MOCK_METHOD1(Detach, void(const DetachCompletionCallback& callback)); 35 MOCK_METHOD2(RenameAndAnnotate,
36 void(const FilePath& full_path,
37 const RenameCompletionCallback& callback));
38 MOCK_METHOD0(Detach, void());
36 MOCK_METHOD0(Cancel, void()); 39 MOCK_METHOD0(Cancel, void());
37 MOCK_METHOD0(Finish, void()); 40 MOCK_METHOD0(Finish, void());
38 MOCK_CONST_METHOD0(FullPath, FilePath()); 41 MOCK_CONST_METHOD0(FullPath, FilePath());
39 MOCK_CONST_METHOD0(InProgress, bool()); 42 MOCK_CONST_METHOD0(InProgress, bool());
40 MOCK_CONST_METHOD0(BytesSoFar, int64()); 43 MOCK_CONST_METHOD0(BytesSoFar, int64());
41 MOCK_CONST_METHOD0(CurrentSpeed, int64()); 44 MOCK_CONST_METHOD0(CurrentSpeed, int64());
42 MOCK_METHOD1(GetHash, bool(std::string* hash)); 45 MOCK_METHOD1(GetHash, bool(std::string* hash));
43 MOCK_METHOD0(GetHashState, std::string()); 46 MOCK_METHOD0(GetHashState, std::string());
44 MOCK_METHOD0(SendUpdate, void()); 47 MOCK_METHOD0(SendUpdate, void());
45 MOCK_CONST_METHOD0(Id, int()); 48 MOCK_CONST_METHOD0(Id, int());
46 MOCK_METHOD0(GetDownloadManager, DownloadManager*()); 49 MOCK_METHOD0(GetDownloadManager, DownloadManager*());
47 MOCK_CONST_METHOD0(GlobalId, const DownloadId&()); 50 MOCK_CONST_METHOD0(GlobalId, const DownloadId&());
48 MOCK_CONST_METHOD0(DebugString, std::string()); 51 MOCK_CONST_METHOD0(DebugString, std::string());
49 }; 52 };
50 53
51 } // namespace content 54 } // namespace content
52 55
53 #endif // CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_FILE_H_ 56 #endif // CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_FILE_H_
OLDNEW
« no previous file with comments | « content/browser/download/download_item_impl_unittest.cc ('k') | content/public/test/test_file_error_injector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698