Index: components/offline_pages/offline_page_model.h |
diff --git a/components/offline_pages/offline_page_model.h b/components/offline_pages/offline_page_model.h |
index 648a0f4002758696ef7cafbc70a3291bf15c0b16..c8cd1446814c86c12b9d00df3d53214e79372608 100644 |
--- a/components/offline_pages/offline_page_model.h |
+++ b/components/offline_pages/offline_page_model.h |
@@ -135,6 +135,12 @@ class OfflinePageModel : public KeyedService, |
// will be updated. Requires that the model is loaded. |
void MarkPageAccessed(int64 bookmark_id); |
+ // Marks that the offline page related to the passed |bookmark_id| was going |
+ // to be deleted. The deletion will occur in a short while. The undo can be |
+ // done before this. Requires that the model is loaded. |
+ void MarkPageForDeletion(int64 bookmark_id, |
+ const DeletePageCallback& callback); |
+ |
// Deletes an offline page related to the passed |bookmark_id|. Requires that |
// the model is loaded. |
void DeletePageByBookmarkId(int64 bookmark_id, |
@@ -145,6 +151,9 @@ class OfflinePageModel : public KeyedService, |
void DeletePagesByBookmarkId(const std::vector<int64>& bookmark_ids, |
const DeletePageCallback& callback); |
+ void UndeletePage(int64 bookmark_id, |
+ const DeletePageCallback& callback); |
+ |
// Gets all available offline pages. Requires that the model is loaded. |
const std::vector<OfflinePageItem> GetAllPages() const; |
@@ -175,6 +184,9 @@ class OfflinePageModel : public KeyedService, |
int old_index, |
const bookmarks::BookmarkNode* node, |
const std::set<GURL>& removed_urls) override; |
+ void BookmarkNodeRenumbered(bookmarks::BookmarkModel* model, |
+ int64 old_bookmark_id, |
fgorski
2015/09/25 21:23:57
fix types of bookmark_id to int64_t
jianli
2015/10/09 23:26:26
This is not longer needed.
|
+ int64 new_bookmark_id) override; |
// Callback for loading pages from the offline page metadata store. |
void OnLoadDone(bool success, |
@@ -208,8 +220,16 @@ class OfflinePageModel : public KeyedService, |
void InformDeletePageDone(const DeletePageCallback& callback, |
DeletePageResult result); |
- void OnUpdateOfflinePageDone(const OfflinePageItem& offline_page_item, |
- bool success); |
+ void OnMarkPageAccesseDone(const OfflinePageItem& offline_page_item, |
+ bool success); |
+ |
+ void OnMarkPageForDeletionDone(const OfflinePageItem& offline_page_item, |
+ const DeletePageCallback& callback, |
+ bool success); |
+ void OnUndoOfflinePageDone(const OfflinePageItem& offline_page, |
+ int64 old_bookmark_id, |
+ bool success); |
+ void FinalizePageDeletion(); |
// Persistent store for offline page metadata. |
scoped_ptr<OfflinePageMetadataStore> store_; |