| 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 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_STORE_H_ | 5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_STORE_H_ |
| 6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_STORE_H_ | 6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_STORE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 // Asynchronously removes requests from the store using their ClientIds. | 55 // Asynchronously removes requests from the store using their ClientIds. |
| 56 // Result of the update, and a number of removed pages is passed in the | 56 // Result of the update, and a number of removed pages is passed in the |
| 57 // callback. Result of remove should be false, when one of the provided items | 57 // callback. Result of remove should be false, when one of the provided items |
| 58 // couldn't be deleted, e.g. because it was missing. In case client_ids is | 58 // couldn't be deleted, e.g. because it was missing. In case client_ids is |
| 59 // empty, though this will return true, but the count of deleted pages will be | 59 // empty, though this will return true, but the count of deleted pages will be |
| 60 // 0. | 60 // 0. |
| 61 virtual void RemoveRequestsByClientId(const std::vector<ClientId>& client_ids, | 61 virtual void RemoveRequestsByClientId(const std::vector<ClientId>& client_ids, |
| 62 const RemoveCallback& callback) = 0; | 62 const RemoveCallback& callback) = 0; |
| 63 | 63 |
| 64 // Asynchronously pauses requests from the store using their request id. |
| 65 virtual void PauseRequests(const std::vector<int64_t>& request_ids, |
| 66 const UpdateCallback& callback) = 0; |
| 67 |
| 68 // Asynchronously resumes requests from the store using their request id. |
| 69 // This will set the state from PAUSED back to AVAILABLE, so the request can |
| 70 // be picked up on the next scheduled run. |
| 71 virtual void ResumeRequests(const std::vector<int64_t>& request_ids, |
| 72 const UpdateCallback& callback) = 0; |
| 73 |
| 64 // Resets the store. | 74 // Resets the store. |
| 65 virtual void Reset(const ResetCallback& callback) = 0; | 75 virtual void Reset(const ResetCallback& callback) = 0; |
| 66 }; | 76 }; |
| 67 | 77 |
| 68 } // namespace offline_pages | 78 } // namespace offline_pages |
| 69 | 79 |
| 70 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_STORE_H_ | 80 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_STORE_H_ |
| OLD | NEW |