Chromium Code Reviews| Index: components/offline_pages/core/downloads/download_ui_item.h |
| diff --git a/components/offline_pages/core/downloads/download_ui_item.h b/components/offline_pages/core/downloads/download_ui_item.h |
| index aea7cf5ccebb9b8e8dc8d698d049b4c4051117f6..4b81f879edc3cb838ef9fad5c2842343ff218257 100644 |
| --- a/components/offline_pages/core/downloads/download_ui_item.h |
| +++ b/components/offline_pages/core/downloads/download_ui_item.h |
| @@ -18,20 +18,31 @@ namespace offline_pages { |
| struct OfflinePageItem; |
| class SavePageRequest; |
| +// The abstract "download item" that may be a media file, a web page (together |
| +// with all the resources) or a PWA web package. This is a data bag that exposes |
| +// only bits potentially visible by the user, not the internal data. |
| struct DownloadUIItem { |
| public: |
| + // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.components.offlinepages.downloads |
| + enum DownloadState { PENDING = 0, IN_PROGRESS = 1, PAUSED = 2, COMPLETE = 3 }; |
| + |
| DownloadUIItem(); |
| explicit DownloadUIItem(const OfflinePageItem& page); |
| explicit DownloadUIItem(const SavePageRequest& request); |
| DownloadUIItem(const DownloadUIItem& other); |
| ~DownloadUIItem(); |
| - // Unique id. |
| + // Unique id. It is filled with the offline_id, which should be ok |
|
fgorski
2017/01/30 21:39:51
nit: ID
Dmitry Titov
2017/02/08 00:45:08
Done.
Also reverted the rest of the comment since
|
| + // since there is no cross-exchange of these items between download backends. |
| std::string guid; |
| // The URL of the captured page. |
| GURL url; |
| + DownloadState download_state; |
| + |
| + int64_t download_progress_bytes; |
| + |
| // The Title of the captured page, if any. It can be empty string either |
| // because the page is not yet fully loaded, or because it doesn't have any. |
| base::string16 title; |