| 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 afe69ce194b88c7e39cff474422221294a2c3473..71e3c0f8e0fbb2dd79770104fc77e8827a859b11 100644
|
| --- a/components/offline_pages/offline_page_metadata_store_sql.h
|
| +++ b/components/offline_pages/offline_page_metadata_store_sql.h
|
| @@ -59,6 +59,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;
|
| @@ -73,17 +74,12 @@ class OfflinePageMetadataStoreSQL : public OfflinePageMetadataStore {
|
| void SetStateForTesting(StoreState state, bool reset_db);
|
|
|
| private:
|
| - // Used to initialize DB connection.
|
| - void OpenConnection();
|
| - void OnOpenConnectionDone(StoreState state);
|
| + // Used to conclude opening/resetting DB connection.
|
| + void OnOpenConnectionDone(const InitializeCallback& callback, bool success);
|
| + void OnResetDone(const ResetCallback& callback, bool success);
|
|
|
| - // Used to reset DB connection.
|
| - void OnResetDone(const ResetCallback& callback, StoreState state);
|
| -
|
| - // Helper function that checks whether a valid DB connection is present.
|
| - // Returns true if valid connection is present, otherwise it returns false and
|
| - // calls the provided callback as a shortcut.
|
| - bool CheckDb(const base::Closure& callback);
|
| + // Checks whether a valid DB connection is present and store state is LOADED.
|
| + bool CheckDb();
|
|
|
| // Background thread where all SQL access should be run.
|
| scoped_refptr<base::SequencedTaskRunner> background_task_runner_;
|
|
|