| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "components/offline_pages/downloads/download_ui_item.h" | |
| 6 | |
| 7 #include "components/offline_pages/background/save_page_request.h" | |
| 8 #include "components/offline_pages/offline_page_item.h" | |
| 9 | |
| 10 namespace offline_pages { | |
| 11 | |
| 12 DownloadUIItem::DownloadUIItem() | |
| 13 : total_bytes(0) { | |
| 14 } | |
| 15 | |
| 16 DownloadUIItem::DownloadUIItem(const OfflinePageItem& page) | |
| 17 : guid(page.client_id.id), | |
| 18 url(page.url), | |
| 19 title(page.title), | |
| 20 target_path(page.file_path), | |
| 21 start_time(page.creation_time), | |
| 22 total_bytes(page.file_size) {} | |
| 23 | |
| 24 DownloadUIItem::DownloadUIItem(const SavePageRequest& request) | |
| 25 : guid(request.client_id().id), | |
| 26 url(request.url()), | |
| 27 start_time(request.creation_time()), | |
| 28 total_bytes(-1L) {} | |
| 29 | |
| 30 DownloadUIItem::DownloadUIItem(const DownloadUIItem& other) | |
| 31 : guid(other.guid), | |
| 32 url(other.url), | |
| 33 title(other.title), | |
| 34 target_path(other.target_path), | |
| 35 start_time(other.start_time), | |
| 36 total_bytes(other.total_bytes) {} | |
| 37 | |
| 38 DownloadUIItem::~DownloadUIItem() { | |
| 39 } | |
| 40 | |
| 41 } // namespace offline_pages | |
| OLD | NEW |