| 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..67ff36fdd348a9fed01a3a23e925c96711b76590 100644
|
| --- a/components/offline_pages/background/request_queue_store_sql.h
|
| +++ b/components/offline_pages/background/request_queue_store_sql.h
|
| @@ -40,6 +40,10 @@ class RequestQueueStoreSQL : public RequestQueueStore {
|
| const RemoveCallback& callback) override;
|
| void RemoveRequestsByClientId(const std::vector<ClientId>& client_ids,
|
| const RemoveCallback& callback) override;
|
| + void ChangeRequestsState(const std::vector<int64_t>& request_ids,
|
| + const SavePageRequest::RequestState new_state,
|
| + const UpdateCallback& callback) override;
|
| +
|
| void Reset(const ResetCallback& callback) override;
|
|
|
| private:
|
| @@ -66,11 +70,20 @@ class RequestQueueStoreSQL : public RequestQueueStore {
|
| scoped_refptr<base::SingleThreadTaskRunner> runner,
|
| const std::vector<ClientId>& client_ids,
|
| const RemoveCallback& callback);
|
| + static void ChangeRequestsStateSync(
|
| + sql::Connection* db,
|
| + scoped_refptr<base::SingleThreadTaskRunner> runner,
|
| + const std::vector<int64_t>& request_ids,
|
| + const SavePageRequest::RequestState new_state,
|
| + 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 base::Closure& callback);
|
| +
|
| // Used to initialize DB connection.
|
| static void OpenConnectionSync(
|
| sql::Connection* db,
|
|
|