| Index: components/offline_pages/background/request_queue_store_sql.h
|
| diff --git a/components/offline_pages/background/request_queue_store_sql.h b/components/offline_pages/background/request_queue_store_sql.h
|
| index 18f6e8792d85715384c7291adfc60cf67944d2db..cb600a030986750ab4586af5c5c05118a593c90e 100644
|
| --- a/components/offline_pages/background/request_queue_store_sql.h
|
| +++ b/components/offline_pages/background/request_queue_store_sql.h
|
| @@ -34,12 +34,20 @@ class RequestQueueStoreSQL : public RequestQueueStore {
|
|
|
| // RequestQueueStore implementation.
|
| void GetRequests(const GetRequestsCallback& callback) override;
|
| +
|
| void AddOrUpdateRequest(const SavePageRequest& offline_page,
|
| const UpdateCallback& callback) override;
|
| void RemoveRequests(const std::vector<int64_t>& request_ids,
|
| const RemoveCallback& callback) override;
|
| void RemoveRequestsByClientId(const std::vector<ClientId>& client_ids,
|
| const RemoveCallback& callback) override;
|
| +
|
| + void PauseRequests(const std::vector<int64_t>& request_ids,
|
| + const UpdateCallback& callback) override;
|
| +
|
| + void ResumeRequests(const std::vector<int64_t>& request_ids,
|
| + const UpdateCallback& callback) override;
|
| +
|
| void Reset(const ResetCallback& callback) override;
|
|
|
| private:
|
| @@ -66,11 +74,27 @@ class RequestQueueStoreSQL : public RequestQueueStore {
|
| scoped_refptr<base::SingleThreadTaskRunner> runner,
|
| const std::vector<ClientId>& client_ids,
|
| const RemoveCallback& callback);
|
| + static void PauseRequestsSync(
|
| + sql::Connection* db,
|
| + scoped_refptr<base::SingleThreadTaskRunner> runner,
|
| + const std::vector<int64_t>& request_ids,
|
| + const UpdateCallback& callback);
|
| + static void ResumeRequestsSync(
|
| + sql::Connection* db,
|
| + scoped_refptr<base::SingleThreadTaskRunner> runner,
|
| + const std::vector<int64_t>& request_ids,
|
| + const UpdateCallback& callback);
|
| static void ResetSync(sql::Connection* db,
|
| const base::FilePath& db_file_path,
|
| scoped_refptr<base::SingleThreadTaskRunner> runner,
|
| const ResetCallback& callback);
|
|
|
| + // Helper functions to return immediately if no database is found.
|
| + bool CheckDb(const RemoveCallback& callback);
|
| + bool CheckDb(const GetRequestsCallback& callback);
|
| + bool CheckDb(const UpdateCallback& callback);
|
| + bool CheckDb(const ResetCallback& callback);
|
| +
|
| // Used to initialize DB connection.
|
| static void OpenConnectionSync(
|
| sql::Connection* db,
|
|
|