| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_ITEMS_COLLECTION_CORE_OFFLINE_ITEM_H_ | 5 #ifndef COMPONENTS_OFFLINE_ITEMS_COLLECTION_CORE_OFFLINE_ITEM_H_ |
| 6 #define COMPONENTS_OFFLINE_ITEMS_COLLECTION_CORE_OFFLINE_ITEM_H_ | 6 #define COMPONENTS_OFFLINE_ITEMS_COLLECTION_CORE_OFFLINE_ITEM_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // A new feature should expose these OfflineItems via an OfflineContentProvider. | 43 // A new feature should expose these OfflineItems via an OfflineContentProvider. |
| 44 struct OfflineItem { | 44 struct OfflineItem { |
| 45 OfflineItem(); | 45 OfflineItem(); |
| 46 OfflineItem(const OfflineItem& other); | 46 OfflineItem(const OfflineItem& other); |
| 47 explicit OfflineItem(const ContentId& id); | 47 explicit OfflineItem(const ContentId& id); |
| 48 | 48 |
| 49 ~OfflineItem(); | 49 ~OfflineItem(); |
| 50 | 50 |
| 51 bool operator==(const OfflineItem& offline_item) const; | 51 bool operator==(const OfflineItem& offline_item) const; |
| 52 | 52 |
| 53 bool operator<(const OfflineItem& offline_item) const; |
| 54 |
| 53 // The id of this OfflineItem. Used to identify this item across all relevant | 55 // The id of this OfflineItem. Used to identify this item across all relevant |
| 54 // systems. | 56 // systems. |
| 55 ContentId id; | 57 ContentId id; |
| 56 | 58 |
| 57 // Display Metadata. | 59 // Display Metadata. |
| 58 // --------------------------------------------------------------------------- | 60 // --------------------------------------------------------------------------- |
| 59 // The title of the OfflineItem to display in the UI. | 61 // The title of the OfflineItem to display in the UI. |
| 60 std::string title; | 62 std::string title; |
| 61 | 63 |
| 62 // The description of the OfflineItem to display in the UI (may or may not be | 64 // The description of the OfflineItem to display in the UI (may or may not be |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 117 |
| 116 // The estimated time remaining for the download in milliseconds. -1 | 118 // The estimated time remaining for the download in milliseconds. -1 |
| 117 // represents an unknown time remaining. This field is not used if |state| is | 119 // represents an unknown time remaining. This field is not used if |state| is |
| 118 // COMPLETE. | 120 // COMPLETE. |
| 119 int64_t time_remaining_ms; | 121 int64_t time_remaining_ms; |
| 120 }; | 122 }; |
| 121 | 123 |
| 122 } // namespace offline_items_collection | 124 } // namespace offline_items_collection |
| 123 | 125 |
| 124 #endif // COMPONENTS_OFFLINE_ITEMS_COLLECTION_OFFLINE_ITEM_H_ | 126 #endif // COMPONENTS_OFFLINE_ITEMS_COLLECTION_OFFLINE_ITEM_H_ |
| OLD | NEW |