| 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 25 matching lines...) Expand all Loading... |
| 36 std::vector<GURL> url_chain; | 36 std::vector<GURL> url_chain; |
| 37 GURL referrer_url; | 37 GURL referrer_url; |
| 38 std::string mime_type; | 38 std::string mime_type; |
| 39 std::string original_mime_type; | 39 std::string original_mime_type; |
| 40 base::Time start_time; | 40 base::Time start_time; |
| 41 base::Time end_time; | 41 base::Time end_time; |
| 42 std::string etag; | 42 std::string etag; |
| 43 std::string last_modified; | 43 std::string last_modified; |
| 44 int64_t received_bytes; | 44 int64_t received_bytes; |
| 45 int64_t total_bytes; | 45 int64_t total_bytes; |
| 46 std::string hash; |
| 46 DownloadItem::DownloadState state; | 47 DownloadItem::DownloadState state; |
| 47 DownloadDangerType danger_type; | 48 DownloadDangerType danger_type; |
| 48 DownloadInterruptReason interrupt_reason; | 49 DownloadInterruptReason interrupt_reason; |
| 49 bool opened; | 50 bool opened; |
| 50 | 51 |
| 51 CreateDownloadItemAdapter(uint32_t id, | 52 CreateDownloadItemAdapter(uint32_t id, |
| 52 const base::FilePath& current_path, | 53 const base::FilePath& current_path, |
| 53 const base::FilePath& target_path, | 54 const base::FilePath& target_path, |
| 54 const std::vector<GURL>& url_chain, | 55 const std::vector<GURL>& url_chain, |
| 55 const GURL& referrer_url, | 56 const GURL& referrer_url, |
| 56 const std::string& mime_type, | 57 const std::string& mime_type, |
| 57 const std::string& original_mime_type, | 58 const std::string& original_mime_type, |
| 58 const base::Time& start_time, | 59 const base::Time& start_time, |
| 59 const base::Time& end_time, | 60 const base::Time& end_time, |
| 60 const std::string& etag, | 61 const std::string& etag, |
| 61 const std::string& last_modified, | 62 const std::string& last_modified, |
| 62 int64_t received_bytes, | 63 int64_t received_bytes, |
| 63 int64_t total_bytes, | 64 int64_t total_bytes, |
| 65 const std::string& hash, |
| 64 DownloadItem::DownloadState state, | 66 DownloadItem::DownloadState state, |
| 65 DownloadDangerType danger_type, | 67 DownloadDangerType danger_type, |
| 66 DownloadInterruptReason interrupt_reason, | 68 DownloadInterruptReason interrupt_reason, |
| 67 bool opened); | 69 bool opened); |
| 68 // Required by clang compiler. | 70 // Required by clang compiler. |
| 69 CreateDownloadItemAdapter(const CreateDownloadItemAdapter& rhs); | 71 CreateDownloadItemAdapter(const CreateDownloadItemAdapter& rhs); |
| 70 ~CreateDownloadItemAdapter(); | 72 ~CreateDownloadItemAdapter(); |
| 71 | 73 |
| 72 bool operator==(const CreateDownloadItemAdapter& rhs) const; | 74 bool operator==(const CreateDownloadItemAdapter& rhs) const; |
| 73 }; | 75 }; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 const std::vector<GURL>& url_chain, | 111 const std::vector<GURL>& url_chain, |
| 110 const GURL& referrer_url, | 112 const GURL& referrer_url, |
| 111 const std::string& mime_type, | 113 const std::string& mime_type, |
| 112 const std::string& original_mime_type, | 114 const std::string& original_mime_type, |
| 113 const base::Time& start_time, | 115 const base::Time& start_time, |
| 114 const base::Time& end_time, | 116 const base::Time& end_time, |
| 115 const std::string& etag, | 117 const std::string& etag, |
| 116 const std::string& last_modified, | 118 const std::string& last_modified, |
| 117 int64_t received_bytes, | 119 int64_t received_bytes, |
| 118 int64_t total_bytes, | 120 int64_t total_bytes, |
| 121 const std::string& hash, |
| 119 DownloadItem::DownloadState state, | 122 DownloadItem::DownloadState state, |
| 120 DownloadDangerType danger_type, | 123 DownloadDangerType danger_type, |
| 121 DownloadInterruptReason interrupt_reason, | 124 DownloadInterruptReason interrupt_reason, |
| 122 bool opened) override; | 125 bool opened) override; |
| 123 | 126 |
| 124 MOCK_METHOD1(MockCreateDownloadItem, | 127 MOCK_METHOD1(MockCreateDownloadItem, |
| 125 DownloadItem*(CreateDownloadItemAdapter adapter)); | 128 DownloadItem*(CreateDownloadItemAdapter adapter)); |
| 126 | 129 |
| 127 MOCK_CONST_METHOD0(InProgressCount, int()); | 130 MOCK_CONST_METHOD0(InProgressCount, int()); |
| 128 MOCK_CONST_METHOD0(NonMaliciousInProgressCount, int()); | 131 MOCK_CONST_METHOD0(NonMaliciousInProgressCount, int()); |
| 129 MOCK_CONST_METHOD0(GetBrowserContext, BrowserContext*()); | 132 MOCK_CONST_METHOD0(GetBrowserContext, BrowserContext*()); |
| 130 MOCK_METHOD0(CheckForHistoryFilesRemoval, void()); | 133 MOCK_METHOD0(CheckForHistoryFilesRemoval, void()); |
| 131 MOCK_METHOD1(GetDownload, DownloadItem*(uint32_t id)); | 134 MOCK_METHOD1(GetDownload, DownloadItem*(uint32_t id)); |
| 132 }; | 135 }; |
| 133 | 136 |
| 134 } // namespace content | 137 } // namespace content |
| 135 | 138 |
| 136 #endif // CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_MANAGER_H_ | 139 #endif // CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_MANAGER_H_ |
| OLD | NEW |