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_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_MANAGER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_MANAGER_H_ |
6 #define CONTENT_PUBLIC_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_MANAGER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_MANAGER_H_ |
7 | 7 |
8 #include "content/public/browser/download_manager.h" | 8 #include "content/public/browser/download_manager.h" |
9 #include "content/public/browser/download_save_info.h" | 9 #include "content/public/browser/download_save_info.h" |
10 #include "content/public/browser/download_url_parameters.h" | 10 #include "content/public/browser/download_url_parameters.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 MOCK_METHOD2(RemoveDownloadsBetween, int(base::Time remove_begin, | 52 MOCK_METHOD2(RemoveDownloadsBetween, int(base::Time remove_begin, |
53 base::Time remove_end)); | 53 base::Time remove_end)); |
54 MOCK_METHOD1(RemoveDownloads, int(base::Time remove_begin)); | 54 MOCK_METHOD1(RemoveDownloads, int(base::Time remove_begin)); |
55 MOCK_METHOD0(RemoveAllDownloads, int()); | 55 MOCK_METHOD0(RemoveAllDownloads, int()); |
56 MOCK_METHOD1(DownloadUrlMock, void(DownloadUrlParameters*)); | 56 MOCK_METHOD1(DownloadUrlMock, void(DownloadUrlParameters*)); |
57 virtual void DownloadUrl(scoped_ptr<DownloadUrlParameters> params) OVERRIDE { | 57 virtual void DownloadUrl(scoped_ptr<DownloadUrlParameters> params) OVERRIDE { |
58 DownloadUrlMock(params.get()); | 58 DownloadUrlMock(params.get()); |
59 } | 59 } |
60 MOCK_METHOD1(AddObserver, void(Observer* observer)); | 60 MOCK_METHOD1(AddObserver, void(Observer* observer)); |
61 MOCK_METHOD1(RemoveObserver, void(Observer* observer)); | 61 MOCK_METHOD1(RemoveObserver, void(Observer* observer)); |
62 MOCK_METHOD1(OnPersistentStoreQueryComplete, void( | 62 MOCK_METHOD9(CreateDownloadItem, DownloadItem*( |
63 std::vector<DownloadPersistentStoreInfo>* entries)); | 63 const FilePath& path, |
| 64 const GURL& url, |
| 65 const GURL& referrer_url, |
| 66 const base::Time& start_tiem, |
| 67 const base::Time& end_time, |
| 68 int64 received_bytes, |
| 69 int64 total_bytes, |
| 70 DownloadItem::DownloadState state, |
| 71 bool opened)); |
64 MOCK_METHOD2(OnItemAddedToPersistentStore, void(int32 download_id, | 72 MOCK_METHOD2(OnItemAddedToPersistentStore, void(int32 download_id, |
65 int64 db_handle)); | 73 int64 db_handle)); |
66 MOCK_CONST_METHOD0(InProgressCount, int()); | 74 MOCK_CONST_METHOD0(InProgressCount, int()); |
67 MOCK_CONST_METHOD0(GetBrowserContext, BrowserContext*()); | 75 MOCK_CONST_METHOD0(GetBrowserContext, BrowserContext*()); |
68 MOCK_METHOD0(CheckForHistoryFilesRemoval, void()); | 76 MOCK_METHOD0(CheckForHistoryFilesRemoval, void()); |
69 MOCK_METHOD1(GetDownloadItem, DownloadItem*(int id)); | 77 MOCK_METHOD1(GetDownloadItem, DownloadItem*(int id)); |
70 MOCK_METHOD1(GetDownload, DownloadItem*(int id)); | 78 MOCK_METHOD1(GetDownload, DownloadItem*(int id)); |
71 MOCK_METHOD1(SavePageDownloadFinished, void(DownloadItem* download)); | 79 MOCK_METHOD1(SavePageDownloadFinished, void(DownloadItem* download)); |
72 MOCK_METHOD1(GetActiveDownloadItem, DownloadItem*(int id)); | 80 MOCK_METHOD1(GetActiveDownloadItem, DownloadItem*(int id)); |
73 MOCK_METHOD1(GetActiveDownload, DownloadItem*(int32 download_id)); | 81 MOCK_METHOD1(GetActiveDownload, DownloadItem*(int32 download_id)); |
74 | 82 |
75 protected: | 83 protected: |
76 virtual ~MockDownloadManager(); | 84 virtual ~MockDownloadManager(); |
77 }; | 85 }; |
78 | 86 |
79 } // namespace content | 87 } // namespace content |
80 | 88 |
81 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_MANAGER_H_ | 89 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_MANAGER_H_ |
OLD | NEW |