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

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

Issue 1751603002: [Downloads] Rework how hashes are calculated for download files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on top of https://codereview.chromium.org/1781983002 since that's going in first. Created 4 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 unified diff | Download patch
« no previous file with comments | « content/browser/download/download_request_core.cc ('k') | content/browser/download/save_file.h » ('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 #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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 17 matching lines...) Expand all
28 28
29 // DownloadFile functions. 29 // DownloadFile functions.
30 MOCK_METHOD1(Initialize, void(const InitializeCallback&)); 30 MOCK_METHOD1(Initialize, void(const InitializeCallback&));
31 MOCK_METHOD2(AppendDataToFile, DownloadInterruptReason( 31 MOCK_METHOD2(AppendDataToFile, DownloadInterruptReason(
32 const char* data, size_t data_len)); 32 const char* data, size_t data_len));
33 MOCK_METHOD1(Rename, DownloadInterruptReason( 33 MOCK_METHOD1(Rename, DownloadInterruptReason(
34 const base::FilePath& full_path)); 34 const base::FilePath& full_path));
35 MOCK_METHOD2(RenameAndUniquify, 35 MOCK_METHOD2(RenameAndUniquify,
36 void(const base::FilePath& full_path, 36 void(const base::FilePath& full_path,
37 const RenameCompletionCallback& callback)); 37 const RenameCompletionCallback& callback));
38 MOCK_METHOD2(RenameAndAnnotate, 38 MOCK_METHOD5(RenameAndAnnotate,
39 void(const base::FilePath& full_path, 39 void(const base::FilePath& full_path,
40 const std::string& client_guid,
41 const GURL& source_url,
42 const GURL& referrer_url,
40 const RenameCompletionCallback& callback)); 43 const RenameCompletionCallback& callback));
41 MOCK_METHOD0(Detach, void()); 44 MOCK_METHOD0(Detach, void());
42 MOCK_METHOD0(Cancel, void()); 45 MOCK_METHOD0(Cancel, void());
43 MOCK_METHOD0(Finish, void()); 46 MOCK_METHOD0(Finish, void());
44 MOCK_CONST_METHOD0(FullPath, base::FilePath()); 47 MOCK_CONST_METHOD0(FullPath, const base::FilePath&());
45 MOCK_CONST_METHOD0(InProgress, bool()); 48 MOCK_CONST_METHOD0(InProgress, bool());
46 MOCK_CONST_METHOD0(BytesSoFar, int64_t()); 49 MOCK_CONST_METHOD0(BytesSoFar, int64_t());
47 MOCK_CONST_METHOD0(CurrentSpeed, int64_t()); 50 MOCK_CONST_METHOD0(CurrentSpeed, int64_t());
48 MOCK_METHOD1(GetHash, bool(std::string* hash)); 51 MOCK_METHOD1(GetHash, bool(std::string* hash));
49 MOCK_METHOD0(GetHashState, std::string());
50 MOCK_METHOD0(SendUpdate, void()); 52 MOCK_METHOD0(SendUpdate, void());
51 MOCK_CONST_METHOD0(Id, int()); 53 MOCK_CONST_METHOD0(Id, int());
52 MOCK_METHOD0(GetDownloadManager, DownloadManager*()); 54 MOCK_METHOD0(GetDownloadManager, DownloadManager*());
53 MOCK_CONST_METHOD0(DebugString, std::string()); 55 MOCK_CONST_METHOD0(DebugString, std::string());
54 MOCK_METHOD1(SetClientGuid, void(const std::string&));
55 }; 56 };
56 57
57 } // namespace content 58 } // namespace content
58 59
59 #endif // CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_FILE_H_ 60 #endif // CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_FILE_H_
OLDNEW
« no previous file with comments | « content/browser/download/download_request_core.cc ('k') | content/browser/download/save_file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698