Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(435)

Unified Diff: components/offline_pages/offline_page_model.h

Issue 1420003004: Wipe out offline page data on clearing cookie and site data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 ab08104a4b3f43ad96db091278a3e04409c83ebf..aa23d95b72330d3f4cc4f16d8549d9173296781b 100644
--- a/components/offline_pages/offline_page_model.h
+++ b/components/offline_pages/offline_page_model.h
@@ -167,7 +167,8 @@ class OfflinePageModel : public KeyedService,
void DeletePagesByBookmarkId(const std::vector<int64>& bookmark_ids,
const DeletePageCallback& callback);
- void UndeletePage(int64 bookmark_id, const DeletePageCallback& callback);
+ // Remove all saved files and clear the store.
+ void ClearAll(const base::Closure& callback);
fgorski 2015/10/23 20:55:03 DeleteAllPages -- to be consistent with the naming
jianli 2015/10/26 21:42:44 I think semantically ClearAll is a bit different f
fgorski 2015/10/27 20:13:09 Acknowledged.
// Gets all available offline pages. Requires that the model is loaded.
const std::vector<OfflinePageItem> GetAllPages() const;
@@ -263,6 +264,17 @@ class OfflinePageModel : public KeyedService,
const std::vector<int64>& bookmark_ids,
OfflinePageModel::DeletePageResult result);
+ // Steps for clearing all.
+ void OnRemoveAllFilesDoneForClearAll(const base::Closure& callback,
+ DeletePageResult result);
+ void OnResetStoreDoneForClearAll(const base::Closure& callback, bool success);
+ void OnReloadStoreDoneForClearAll(
+ const base::Closure& callback,
+ bool success,
+ const std::vector<OfflinePageItem>& offline_pages);
+
+ void CacheLoadedData(const std::vector<OfflinePageItem>& offline_pages);
+
// Persistent store for offline page metadata.
scoped_ptr<OfflinePageMetadataStore> store_;

Powered by Google App Engine
This is Rietveld 408576698