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

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: Address more feedback 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..486c30847077a0743d9de4a4abfb28946455b9ac 100644
--- a/components/offline_pages/offline_page_model.h
+++ b/components/offline_pages/offline_page_model.h
@@ -20,6 +20,7 @@
#include "components/bookmarks/browser/base_bookmark_model_observer.h"
#include "components/keyed_service/core/keyed_service.h"
#include "components/offline_pages/offline_page_archiver.h"
+#include "components/offline_pages/offline_page_metadata_store.h"
class GURL;
namespace base {
@@ -167,7 +168,8 @@ class OfflinePageModel : public KeyedService,
void DeletePagesByBookmarkId(const std::vector<int64>& bookmark_ids,
const DeletePageCallback& callback);
- void UndeletePage(int64 bookmark_id, const DeletePageCallback& callback);
+ // Wipes out all the data by deleting all saved files and clearing the store.
+ void ClearAll(const base::Closure& callback);
// Gets all available offline pages. Requires that the model is loaded.
const std::vector<OfflinePageItem> GetAllPages() const;
@@ -212,7 +214,7 @@ class OfflinePageModel : public KeyedService,
const std::set<GURL>& removed_urls) override;
// Callback for loading pages from the offline page metadata store.
- void OnLoadDone(bool success,
+ void OnLoadDone(OfflinePageMetadataStore::LoadStatus load_status,
const std::vector<OfflinePageItem>& offline_pages);
// Steps for saving a page offline.
@@ -263,6 +265,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,
+ OfflinePageMetadataStore::LoadStatus load_status,
+ const std::vector<OfflinePageItem>& offline_pages);
+
+ void CacheLoadedData(const std::vector<OfflinePageItem>& offline_pages);
+
// Persistent store for offline page metadata.
scoped_ptr<OfflinePageMetadataStore> store_;
« no previous file with comments | « components/offline_pages/offline_page_metadata_store_impl_unittest.cc ('k') | components/offline_pages/offline_page_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698