OLD | NEW |
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 #include "components/offline_pages/background/request_queue.h" | 5 #include "components/offline_pages/background/request_queue.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
10 #include "components/offline_pages/background/request_queue_store.h" | 10 #include "components/offline_pages/background/request_queue_store.h" |
11 #include "components/offline_pages/background/save_page_request.h" | 11 #include "components/offline_pages/background/save_page_request.h" |
12 | 12 |
13 namespace offline_pages { | 13 namespace offline_pages { |
14 | 14 |
15 namespace { | 15 namespace { |
16 // Completes the get requests call. | 16 // Completes the get requests call. |
17 void GetRequestsDone(const RequestQueue::GetRequestsCallback& callback, | 17 void GetRequestsDone(const RequestQueue::GetRequestsCallback& callback, |
18 bool success, | 18 bool success, |
19 const std::vector<SavePageRequest>& requests) { | 19 const std::vector<SavePageRequest>& requests) { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 void RequestQueue::RemoveRequest(int64_t request_id, | 73 void RequestQueue::RemoveRequest(int64_t request_id, |
74 const UpdateRequestCallback& callback) { | 74 const UpdateRequestCallback& callback) { |
75 std::vector<int64_t> request_ids{request_id}; | 75 std::vector<int64_t> request_ids{request_id}; |
76 store_->RemoveRequests(request_ids, base::Bind(RemoveRequestDone, callback)); | 76 store_->RemoveRequests(request_ids, base::Bind(RemoveRequestDone, callback)); |
77 } | 77 } |
78 | 78 |
79 void RequestQueue::PurgeRequests(const PurgeRequestsCallback& callback) {} | 79 void RequestQueue::PurgeRequests(const PurgeRequestsCallback& callback) {} |
80 | 80 |
81 } // namespace offline_pages | 81 } // namespace offline_pages |
OLD | NEW |