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