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

Unified Diff: components/offline_pages/offline_page_metadata_store.h

Issue 2497703002: [Offline pages] Resetting offline page metadata store to handle LOAD/INIT failures (Closed)
Patch Set: Fixing newly added test Created 4 years, 1 month 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
« no previous file with comments | « no previous file | components/offline_pages/offline_page_metadata_store_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 26314804bdce08b2df6e0ad0280aee4937a3fb73..8e0e656ef73c67559b8735d23a8bdb7f705ea3dc 100644
--- a/components/offline_pages/offline_page_metadata_store.h
+++ b/components/offline_pages/offline_page_metadata_store.h
@@ -38,8 +38,9 @@ class OfflinePageMetadataStore {
LOAD_STATUS_COUNT
};
- typedef base::Callback<void(LoadStatus, const std::vector<OfflinePageItem>&)>
+ typedef base::Callback<void(const std::vector<OfflinePageItem>&)>
LoadCallback;
+ typedef base::Callback<void(bool)> InitializeCallback;
typedef base::Callback<void(ItemActionStatus)> AddCallback;
typedef base::Callback<void(std::unique_ptr<OfflinePagesUpdateResult>)>
UpdateCallback;
@@ -48,6 +49,9 @@ class OfflinePageMetadataStore {
OfflinePageMetadataStore();
virtual ~OfflinePageMetadataStore();
+ // Initializes the store. Should be called before any other methods.
+ virtual void Initialize(const InitializeCallback& callback) = 0;
+
// Get all of the offline pages from the store.
virtual void GetOfflinePages(const LoadCallback& callback) = 0;
« no previous file with comments | « no previous file | components/offline_pages/offline_page_metadata_store_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698