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 #include "chrome/browser/download/download_history.h" | 5 #include "chrome/browser/download/download_history.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 row.url_chain, | 217 row.url_chain, |
218 row.referrer_url, | 218 row.referrer_url, |
219 row.mime_type, | 219 row.mime_type, |
220 row.original_mime_type, | 220 row.original_mime_type, |
221 row.start_time, | 221 row.start_time, |
222 row.end_time, | 222 row.end_time, |
223 row.etag, | 223 row.etag, |
224 row.last_modified, | 224 row.last_modified, |
225 row.received_bytes, | 225 row.received_bytes, |
226 row.total_bytes, | 226 row.total_bytes, |
| 227 std::string(), |
227 history::ToContentDownloadState(row.state), | 228 history::ToContentDownloadState(row.state), |
228 history::ToContentDownloadDangerType(row.danger_type), | 229 history::ToContentDownloadDangerType(row.danger_type), |
229 history::ToContentDownloadInterruptReason(row.interrupt_reason), | 230 history::ToContentDownloadInterruptReason(row.interrupt_reason), |
230 row.opened); | 231 row.opened); |
231 EXPECT_CALL(manager(), MockCreateDownloadItem(adapter)) | 232 EXPECT_CALL(manager(), MockCreateDownloadItem(adapter)) |
232 .WillOnce(DoAll( | 233 .WillOnce(DoAll( |
233 InvokeWithoutArgs( | 234 InvokeWithoutArgs( |
234 this, &DownloadHistoryTest::CallOnDownloadCreatedInOrder), | 235 this, &DownloadHistoryTest::CallOnDownloadCreatedInOrder), |
235 Return(&item(index)))); | 236 Return(&item(index)))); |
236 } | 237 } |
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
844 FinishCreateDownload(); | 845 FinishCreateDownload(); |
845 EXPECT_TRUE(DownloadHistory::IsPersisted(&item(0))); | 846 EXPECT_TRUE(DownloadHistory::IsPersisted(&item(0))); |
846 | 847 |
847 // ItemAdded should call OnDownloadUpdated, which should detect that the item | 848 // ItemAdded should call OnDownloadUpdated, which should detect that the item |
848 // changed while it was being added and call UpdateDownload immediately. | 849 // changed while it was being added and call UpdateDownload immediately. |
849 info.opened = true; | 850 info.opened = true; |
850 ExpectDownloadUpdated(info); | 851 ExpectDownloadUpdated(info); |
851 } | 852 } |
852 | 853 |
853 } // anonymous namespace | 854 } // anonymous namespace |
OLD | NEW |