| 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/threading/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" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 // Since the request exists, update it. | 123 // Since the request exists, update it. |
| 124 store_->AddOrUpdateRequest(update_request, | 124 store_->AddOrUpdateRequest(update_request, |
| 125 base::Bind(&UpdateRequestDone, update_callback)); | 125 base::Bind(&UpdateRequestDone, update_callback)); |
| 126 } | 126 } |
| 127 | 127 |
| 128 void RequestQueue::RemoveRequests(const std::vector<int64_t>& request_ids, | 128 void RequestQueue::RemoveRequests(const std::vector<int64_t>& request_ids, |
| 129 const RemoveRequestsCallback& callback) { | 129 const RemoveRequestsCallback& callback) { |
| 130 store_->RemoveRequests(request_ids, base::Bind(RemoveRequestsDone, callback)); | 130 store_->RemoveRequests(request_ids, base::Bind(RemoveRequestsDone, callback)); |
| 131 } | 131 } |
| 132 | 132 |
| 133 void RequestQueue::ChangeRequestsState( |
| 134 const std::vector<int64_t>& request_ids, |
| 135 const SavePageRequest::RequestState new_state, |
| 136 const UpdateRequestCallback& callback) { |
| 137 store_->ChangeRequestsState(request_ids, new_state, |
| 138 base::Bind(UpdateRequestDone, callback)); |
| 139 } |
| 140 |
| 133 void RequestQueue::PurgeRequests(const PurgeRequestsCallback& callback) {} | 141 void RequestQueue::PurgeRequests(const PurgeRequestsCallback& callback) {} |
| 134 | 142 |
| 135 } // namespace offline_pages | 143 } // namespace offline_pages |
| OLD | NEW |