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

Unified Diff: content/public/test/mock_download_manager.h

Issue 1781983002: [Downloads] Introduce GUIDs for downloads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/test/mock_download_item.h ('k') | content/public/test/mock_download_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/mock_download_manager.h
diff --git a/content/public/test/mock_download_manager.h b/content/public/test/mock_download_manager.h
index 77a883f9a7beb9451379b810f8a0c3f628a305e1..c8bc490401baaf75544960e8156ef634fc29c952 100644
--- a/content/public/test/mock_download_manager.h
+++ b/content/public/test/mock_download_manager.h
@@ -30,6 +30,7 @@ class MockDownloadManager : public DownloadManager {
// Structure to make it possible to match more than 10 arguments on
// CreateDownloadItem.
struct CreateDownloadItemAdapter {
+ std::string guid;
uint32_t id;
base::FilePath current_path;
base::FilePath target_path;
@@ -48,7 +49,8 @@ class MockDownloadManager : public DownloadManager {
DownloadInterruptReason interrupt_reason;
bool opened;
- CreateDownloadItemAdapter(uint32_t id,
+ CreateDownloadItemAdapter(const std::string& guid,
+ uint32_t id,
const base::FilePath& current_path,
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
@@ -103,7 +105,8 @@ class MockDownloadManager : public DownloadManager {
MOCK_METHOD1(RemoveObserver, void(Observer* observer));
// Redirects to mock method to get around gmock 10 argument limit.
- DownloadItem* CreateDownloadItem(uint32_t id,
+ DownloadItem* CreateDownloadItem(const std::string& guid,
+ uint32_t id,
const base::FilePath& current_path,
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
@@ -129,6 +132,7 @@ class MockDownloadManager : public DownloadManager {
MOCK_CONST_METHOD0(GetBrowserContext, BrowserContext*());
MOCK_METHOD0(CheckForHistoryFilesRemoval, void());
MOCK_METHOD1(GetDownload, DownloadItem*(uint32_t id));
+ MOCK_METHOD1(GetDownloadByGuid, DownloadItem*(const std::string&));
};
} // namespace content
« no previous file with comments | « content/public/test/mock_download_item.h ('k') | content/public/test/mock_download_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698