Chromium Code Reviews| 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..c3db4ce1f427a151791282cd3595ed82572cede7 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 20:30:50
nit: align
jianli
2015/09/25 20:52:36
Done.
|
| + 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_; |