| OLD | NEW |
| 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_PUBLIC_TEST_MOCK_DOWNLOAD_MANAGER_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_MANAGER_H_ |
| 6 #define CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_MANAGER_H_ | 6 #define CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 std::unique_ptr<DownloadCreateInfo> info, | 97 std::unique_ptr<DownloadCreateInfo> info, |
| 98 std::unique_ptr<ByteStreamReader> stream, | 98 std::unique_ptr<ByteStreamReader> stream, |
| 99 const DownloadUrlParameters::OnStartedCallback& callback) override; | 99 const DownloadUrlParameters::OnStartedCallback& callback) override; |
| 100 | 100 |
| 101 MOCK_METHOD2(MockStartDownload, | 101 MOCK_METHOD2(MockStartDownload, |
| 102 void(DownloadCreateInfo*, ByteStreamReader*)); | 102 void(DownloadCreateInfo*, ByteStreamReader*)); |
| 103 MOCK_METHOD3(RemoveDownloadsByURLAndTime, | 103 MOCK_METHOD3(RemoveDownloadsByURLAndTime, |
| 104 int(const base::Callback<bool(const GURL&)>& url_filter, | 104 int(const base::Callback<bool(const GURL&)>& url_filter, |
| 105 base::Time remove_begin, | 105 base::Time remove_begin, |
| 106 base::Time remove_end)); | 106 base::Time remove_end)); |
| 107 MOCK_METHOD0(RemoveAllDownloads, int()); | |
| 108 MOCK_METHOD1(DownloadUrlMock, void(DownloadUrlParameters*)); | 107 MOCK_METHOD1(DownloadUrlMock, void(DownloadUrlParameters*)); |
| 109 void DownloadUrl(std::unique_ptr<DownloadUrlParameters> params) override { | 108 void DownloadUrl(std::unique_ptr<DownloadUrlParameters> params) override { |
| 110 DownloadUrlMock(params.get()); | 109 DownloadUrlMock(params.get()); |
| 111 } | 110 } |
| 112 MOCK_METHOD1(AddObserver, void(Observer* observer)); | 111 MOCK_METHOD1(AddObserver, void(Observer* observer)); |
| 113 MOCK_METHOD1(RemoveObserver, void(Observer* observer)); | 112 MOCK_METHOD1(RemoveObserver, void(Observer* observer)); |
| 114 | 113 |
| 115 // Redirects to mock method to get around gmock 10 argument limit. | 114 // Redirects to mock method to get around gmock 10 argument limit. |
| 116 DownloadItem* CreateDownloadItem(const std::string& guid, | 115 DownloadItem* CreateDownloadItem(const std::string& guid, |
| 117 uint32_t id, | 116 uint32_t id, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 143 MOCK_CONST_METHOD0(NonMaliciousInProgressCount, int()); | 142 MOCK_CONST_METHOD0(NonMaliciousInProgressCount, int()); |
| 144 MOCK_CONST_METHOD0(GetBrowserContext, BrowserContext*()); | 143 MOCK_CONST_METHOD0(GetBrowserContext, BrowserContext*()); |
| 145 MOCK_METHOD0(CheckForHistoryFilesRemoval, void()); | 144 MOCK_METHOD0(CheckForHistoryFilesRemoval, void()); |
| 146 MOCK_METHOD1(GetDownload, DownloadItem*(uint32_t id)); | 145 MOCK_METHOD1(GetDownload, DownloadItem*(uint32_t id)); |
| 147 MOCK_METHOD1(GetDownloadByGuid, DownloadItem*(const std::string&)); | 146 MOCK_METHOD1(GetDownloadByGuid, DownloadItem*(const std::string&)); |
| 148 }; | 147 }; |
| 149 | 148 |
| 150 } // namespace content | 149 } // namespace content |
| 151 | 150 |
| 152 #endif // CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_MANAGER_H_ | 151 #endif // CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_MANAGER_H_ |
| OLD | NEW |