| 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 #ifndef COMPONENTS_OFFLINE_PAGES_DOWNLOADS_DOWNLOAD_UI_ITEM_H_ | |
| 6 #define COMPONENTS_OFFLINE_PAGES_DOWNLOADS_DOWNLOAD_UI_ITEM_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
| 9 | |
| 10 #include <string> | |
| 11 | |
| 12 #include "base/files/file_path.h" | |
| 13 #include "base/time/time.h" | |
| 14 #include "url/gurl.h" | |
| 15 | |
| 16 namespace offline_pages { | |
| 17 | |
| 18 struct OfflinePageItem; | |
| 19 class SavePageRequest; | |
| 20 | |
| 21 struct DownloadUIItem { | |
| 22 public: | |
| 23 DownloadUIItem(); | |
| 24 explicit DownloadUIItem(const OfflinePageItem& page); | |
| 25 explicit DownloadUIItem(const SavePageRequest& request); | |
| 26 DownloadUIItem(const DownloadUIItem& other); | |
| 27 ~DownloadUIItem(); | |
| 28 | |
| 29 // Unique id. | |
| 30 std::string guid; | |
| 31 | |
| 32 // The URL of the captured page. | |
| 33 GURL url; | |
| 34 | |
| 35 // The Title of the captured page, if any. It can be empty string either | |
| 36 // because the page is not yet fully loaded, or because it doesn't have any. | |
| 37 base::string16 title; | |
| 38 | |
| 39 // The file path to the archive with a local copy of the page. | |
| 40 base::FilePath target_path; | |
| 41 | |
| 42 // The time when the offline archive was created. | |
| 43 base::Time start_time; | |
| 44 | |
| 45 // The size of the offline copy. | |
| 46 int64_t total_bytes; | |
| 47 | |
| 48 // Whether the page is currently being offlined. | |
| 49 bool is_offlining; | |
| 50 }; | |
| 51 | |
| 52 } // namespace offline_pages | |
| 53 | |
| 54 #endif // COMPONENTS_OFFLINE_PAGES_DOWNLOADS_DOWNLOAD_UI_ITEM_H_ | |
| OLD | NEW |