Chromium Code Reviews| Index: components/offline_pages/offline_page_metadata_store_sql.h |
| diff --git a/components/offline_pages/offline_page_metadata_store_sql.h b/components/offline_pages/offline_page_metadata_store_sql.h |
| index c26cae8fb3e6653ee5f3224d2cda2cc55115607c..c25eb1ee72c30c1430cbc606d49d828d66eee94a 100644 |
| --- a/components/offline_pages/offline_page_metadata_store_sql.h |
| +++ b/components/offline_pages/offline_page_metadata_store_sql.h |
| @@ -58,6 +58,7 @@ class OfflinePageMetadataStoreSQL : public OfflinePageMetadataStore { |
| ~OfflinePageMetadataStoreSQL() override; |
| // Implementation methods. |
| + void Initialize(const InitializeCallback& callback) override; |
| void GetOfflinePages(const LoadCallback& callback) override; |
| void AddOfflinePage(const OfflinePageItem& offline_page, |
| const AddCallback& callback) override; |
| @@ -65,19 +66,19 @@ class OfflinePageMetadataStoreSQL : public OfflinePageMetadataStore { |
| const UpdateCallback& callback) override; |
| void RemoveOfflinePages(const std::vector<int64_t>& offline_ids, |
| const UpdateCallback& callback) override; |
| - void Reset(const ResetCallback& callback) override; |
| + void Reset(const InitializeCallback& callback) override; |
| StoreState state() const override; |
| // Helper function used to force incorrect state for testing purposes. |
| void SetStateForTesting(StoreState state, bool reset_db); |
| private: |
| - // Used to initialize DB connection. |
| - void OpenConnection(); |
| - void OnOpenConnectionDone(StoreState state); |
| + // Used to conclude opening DB connection. |
| + void OnOpenConnectionDone(const InitializeCallback& callback, |
| + StoreState state); |
| // Used to reset DB connection. |
| - void OnResetDone(const ResetCallback& callback, StoreState state); |
| + void OnResetDone(const InitializeCallback& callback, StoreState state); |
|
fgorski
2016/11/14 21:59:47
needs to be removed.
fgorski
2016/11/14 22:24:09
Done.
|
| // Helper function that checks whether a valid DB connection is present. |
| // Returns true if valid connection is present, otherwise it returns false and |