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

Unified Diff: components/offline_pages/offline_page_metadata_store.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: Fix tests 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_metadata_store.h
diff --git a/components/offline_pages/offline_page_metadata_store.h b/components/offline_pages/offline_page_metadata_store.h
index d50159f79e19e073a5b2a784653a696d9a1b2d73..242b268fa5e0b4bb829e0bbf1268db0f0da44a10 100644
--- a/components/offline_pages/offline_page_metadata_store.h
+++ b/components/offline_pages/offline_page_metadata_store.h
@@ -22,9 +22,22 @@ struct OfflinePageItem;
// issue multiple asynchronous operations in parallel.
class OfflinePageMetadataStore {
public:
- typedef base::Callback<void(bool, const std::vector<OfflinePageItem>&)>
+ // This enum is used in an UMA histogram. Hence the entries here shouldn't
+ // be deleted or re-ordered and new ones should be added to the end.
+ enum LoadStatus {
+ LOAD_SUCCEEDED,
+ STORE_INIT_FAILED,
+ STORE_LOAD_FAILED,
+ DATA_PARSING_FAILED,
+
+ // NOTE: always keep this entry at the end.
+ LOAD_STATUS_COUNT
+ };
+
+ typedef base::Callback<void(LoadStatus, const std::vector<OfflinePageItem>&)>
LoadCallback;
typedef base::Callback<void(bool)> UpdateCallback;
+ typedef base::Callback<void(bool)> ResetCallback;
OfflinePageMetadataStore();
virtual ~OfflinePageMetadataStore();
@@ -41,6 +54,9 @@ class OfflinePageMetadataStore {
// Result of the update is passed in callback.
virtual void RemoveOfflinePages(const std::vector<int64>& bookmark_ids,
const UpdateCallback& callback) = 0;
+
+ // Resets the store.
+ virtual void Reset(const ResetCallback& callback) = 0;
};
} // namespace offline_pages

Powered by Google App Engine
This is Rietveld 408576698