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 26314804bdce08b2df6e0ad0280aee4937a3fb73..8613df7a9825c43aa53fb219386e3062960c4a05 100644 |
| --- a/components/offline_pages/offline_page_metadata_store.h |
| +++ b/components/offline_pages/offline_page_metadata_store.h |
| @@ -38,16 +38,19 @@ 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(StoreState)> InitializeCallback; |
|
jianli
2016/11/15 21:48:38
nit: consider switching to use "using".
Also, it
fgorski
2016/11/15 23:14:12
I switched to bool based callbacks (after split).
|
| typedef base::Callback<void(ItemActionStatus)> AddCallback; |
| typedef base::Callback<void(std::unique_ptr<OfflinePagesUpdateResult>)> |
| UpdateCallback; |
| - typedef base::Callback<void(bool)> ResetCallback; |
| 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; |
| @@ -65,7 +68,7 @@ class OfflinePageMetadataStore { |
| const UpdateCallback& callback) = 0; |
| // Resets the store. |
| - virtual void Reset(const ResetCallback& callback) = 0; |
| + virtual void Reset(const InitializeCallback& callback) = 0; |
|
jianli
2016/11/15 21:48:38
Better to introduce ResetCallback to avoid the con
fgorski
2016/11/15 23:14:12
Done.
|
| // Gets the store state. |
| virtual StoreState state() const = 0; |