Chromium Code Reviews| 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 e4c57c5fc41cbac0eb0872c0ed9fb718605856b4..9f2bff7b66d1ef1ba93a69b36586e5b3ab2b8601 100644 |
| --- a/components/offline_pages/offline_page_metadata_store.h |
| +++ b/components/offline_pages/offline_page_metadata_store.h |
| @@ -36,6 +36,15 @@ class OfflinePageMetadataStore { |
| LOAD_STATUS_COUNT |
| }; |
| + // Current store state. When LOADED, the store is operational. When |
| + // initialization or reset fails, it is reflected appropriately. |
| + enum StoreState { |
| + NOT_LOADED, |
| + LOADED, |
| + FAILED_INITIALIZATION, |
|
Dmitry Titov
2016/09/12 18:05:29
These 2 'state' enums (LoadStatus and StoreState)
fgorski
2016/09/12 21:07:42
TODO added. You are correct and this enum is meant
|
| + FAILED_RESET, |
| + }; |
| + |
| typedef base::Callback<void(LoadStatus, const std::vector<OfflinePageItem>&)> |
| LoadCallback; |
| typedef base::Callback<void(bool)> UpdateCallback; |
| @@ -45,7 +54,7 @@ class OfflinePageMetadataStore { |
| virtual ~OfflinePageMetadataStore(); |
| // Get all of the offline pages from the store. |
| - virtual void Load(const LoadCallback& callback) = 0; |
| + virtual void GetOfflinePages(const LoadCallback& callback) = 0; |
| // Asynchronously adds or updates offline page metadata to the store. |
| // Result of the update is passed in callback. |
| @@ -59,6 +68,9 @@ class OfflinePageMetadataStore { |
| // Resets the store. |
| virtual void Reset(const ResetCallback& callback) = 0; |
| + |
| + // Gets the store state. |
| + virtual StoreState state() const = 0; |
| }; |
| } // namespace offline_pages |