| 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 row.url_chain, | 242 row.url_chain, |
| 243 row.referrer_url, | 243 row.referrer_url, |
| 244 row.mime_type, | 244 row.mime_type, |
| 245 row.original_mime_type, | 245 row.original_mime_type, |
| 246 row.start_time, | 246 row.start_time, |
| 247 row.end_time, | 247 row.end_time, |
| 248 row.etag, | 248 row.etag, |
| 249 row.last_modified, | 249 row.last_modified, |
| 250 row.received_bytes, | 250 row.received_bytes, |
| 251 row.total_bytes, | 251 row.total_bytes, |
| 252 std::string(), |
| 252 history::ToContentDownloadState(row.state), | 253 history::ToContentDownloadState(row.state), |
| 253 history::ToContentDownloadDangerType(row.danger_type), | 254 history::ToContentDownloadDangerType(row.danger_type), |
| 254 history::ToContentDownloadInterruptReason(row.interrupt_reason), | 255 history::ToContentDownloadInterruptReason(row.interrupt_reason), |
| 255 row.opened); | 256 row.opened); |
| 256 EXPECT_CALL(manager(), MockCreateDownloadItem(adapter)) | 257 EXPECT_CALL(manager(), MockCreateDownloadItem(adapter)) |
| 257 .WillOnce(DoAll( | 258 .WillOnce(DoAll( |
| 258 InvokeWithoutArgs( | 259 InvokeWithoutArgs( |
| 259 this, &DownloadHistoryTest::CallOnDownloadCreatedInOrder), | 260 this, &DownloadHistoryTest::CallOnDownloadCreatedInOrder), |
| 260 Return(&item(index)))); | 261 Return(&item(index)))); |
| 261 } | 262 } |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 FinishCreateDownload(); | 855 FinishCreateDownload(); |
| 855 EXPECT_TRUE(DownloadHistory::IsPersisted(&item(0))); | 856 EXPECT_TRUE(DownloadHistory::IsPersisted(&item(0))); |
| 856 | 857 |
| 857 // ItemAdded should call OnDownloadUpdated, which should detect that the item | 858 // ItemAdded should call OnDownloadUpdated, which should detect that the item |
| 858 // changed while it was being added and call UpdateDownload immediately. | 859 // changed while it was being added and call UpdateDownload immediately. |
| 859 info.opened = true; | 860 info.opened = true; |
| 860 ExpectDownloadUpdated(info); | 861 ExpectDownloadUpdated(info); |
| 861 } | 862 } |
| 862 | 863 |
| 863 } // anonymous namespace | 864 } // anonymous namespace |
| OLD | NEW |