Index: components/offline_pages/offline_page_item.h |
diff --git a/components/offline_pages/offline_page_item.h b/components/offline_pages/offline_page_item.h |
index 0ae4a8c21720bd26bd5127b3a0cfefd9e1c3e133..29e6bb62518cffc31a9888e631312830c5397924 100644 |
--- a/components/offline_pages/offline_page_item.h |
+++ b/components/offline_pages/offline_page_item.h |
@@ -18,6 +18,12 @@ namespace offline_pages { |
// Metadata of the offline page. |
struct OfflinePageItem { |
public: |
+ // Note that this should match with Flags enum in offline_pages.proto. |
+ enum Flags { |
+ NO_FLAG = 0, |
+ MARKED_FOR_DELETION = 0x1, |
+ }; |
+ |
OfflinePageItem(); |
OfflinePageItem(const GURL& url, |
int64 bookmark_id, |
@@ -33,6 +39,14 @@ struct OfflinePageItem { |
// Gets a URL of the file under |file_path|. |
GURL GetOfflineURL() const; |
+ // Returns true if the page has been marked for deletion. This allows an undo |
+ // in a short time period. After that, the marked page will be deleted. |
+ bool IsMarkedForDeletion() const; |
+ |
+ // Sets/clears the mark for deletion. |
+ void MarkForDeletion(); |
+ void ClearMarkForDeletion(); |
+ |
// The URL of the page. |
GURL url; |
// The Bookmark ID related to the offline page. |
@@ -49,6 +63,8 @@ struct OfflinePageItem { |
base::Time last_access_time; |
// Number of times that the offline archive has been accessed. |
int access_count; |
+ // Flags about the state and behavior of the offline page. |
+ Flags flags; |
}; |
} // namespace offline_pages |