Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: components/offline_pages/background/request_queue_store_sql.h

Issue 2373933003: [Offline pages] Updating RequestQueue::RemoveRequests to use a TaskQueue (Closed)
Patch Set: Addressing final feedback Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_STORE_SQL_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_STORE_SQL_H_
6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_STORE_SQL_H_ 6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_STORE_SQL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 20 matching lines...) Expand all
31 const base::FilePath& database_dir); 31 const base::FilePath& database_dir);
32 ~RequestQueueStoreSQL() override; 32 ~RequestQueueStoreSQL() override;
33 33
34 // RequestQueueStore implementation. 34 // RequestQueueStore implementation.
35 void GetRequests(const GetRequestsCallback& callback) override; 35 void GetRequests(const GetRequestsCallback& callback) override;
36 void AddRequest(const SavePageRequest& offline_page, 36 void AddRequest(const SavePageRequest& offline_page,
37 const AddCallback& callback) override; 37 const AddCallback& callback) override;
38 void UpdateRequests(const std::vector<SavePageRequest>& requests, 38 void UpdateRequests(const std::vector<SavePageRequest>& requests,
39 const UpdateCallback& callback) override; 39 const UpdateCallback& callback) override;
40 void RemoveRequests(const std::vector<int64_t>& request_ids, 40 void RemoveRequests(const std::vector<int64_t>& request_ids,
41 const RemoveCallback& callback) override; 41 const UpdateCallback& callback) override;
42 void Reset(const ResetCallback& callback) override; 42 void Reset(const ResetCallback& callback) override;
43 StoreState state() const override; 43 StoreState state() const override;
44 44
45 private: 45 private:
46 // Helper functions to return immediately if no database is found. 46 // Helper functions to return immediately if no database is found.
47 bool CheckDb(const base::Closure& callback); 47 bool CheckDb(const base::Closure& callback);
48 48
49 // Used to initialize DB connection. 49 // Used to initialize DB connection.
50 void OpenConnection(); 50 void OpenConnection();
51 void OnOpenConnectionDone(StoreState state); 51 void OnOpenConnectionDone(StoreState state);
(...skipping 13 matching lines...) Expand all
65 // State of the store. 65 // State of the store.
66 StoreState state_; 66 StoreState state_;
67 67
68 base::WeakPtrFactory<RequestQueueStoreSQL> weak_ptr_factory_; 68 base::WeakPtrFactory<RequestQueueStoreSQL> weak_ptr_factory_;
69 DISALLOW_COPY_AND_ASSIGN(RequestQueueStoreSQL); 69 DISALLOW_COPY_AND_ASSIGN(RequestQueueStoreSQL);
70 }; 70 };
71 71
72 } // namespace offline_pages 72 } // namespace offline_pages
73 73
74 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_STORE_SQL_H_ 74 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_STORE_SQL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698