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