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

Unified Diff: components/offline_pages/offline_page_metadata_store.h

Issue 2384423003: [Offline pages] Resetting offline page metadata store if initial load fails (Closed)
Patch Set: Rebased and comments addressed Created 4 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 26314804bdce08b2df6e0ad0280aee4937a3fb73..c1ee45d017941f44c7ad3525ed56e14d1be14cf2 100644
--- a/components/offline_pages/offline_page_metadata_store.h
+++ b/components/offline_pages/offline_page_metadata_store.h
@@ -26,20 +26,8 @@ typedef StoreUpdateResult<OfflinePageItem> OfflinePagesUpdateResult;
// issue multiple asynchronous operations in parallel.
class OfflinePageMetadataStore {
public:
- // 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(StoreState, const std::vector<OfflinePageItem>&)>
+ GetOfflinePagesCallback;
typedef base::Callback<void(ItemActionStatus)> AddCallback;
typedef base::Callback<void(std::unique_ptr<OfflinePagesUpdateResult>)>
UpdateCallback;
@@ -49,7 +37,7 @@ class OfflinePageMetadataStore {
virtual ~OfflinePageMetadataStore();
// Get all of the offline pages from the store.
- virtual void GetOfflinePages(const LoadCallback& callback) = 0;
+ virtual void GetOfflinePages(const GetOfflinePagesCallback& callback) = 0;
// Asynchronously adds an offline page item metadata to the store.
virtual void AddOfflinePage(const OfflinePageItem& offline_page,

Powered by Google App Engine
This is Rietveld 408576698