| 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 11 matching lines...) Expand all Loading... |
| 22 ADDED, // Request was added successfully. | 22 ADDED, // Request was added successfully. |
| 23 UPDATED, // Request was updated successfully. | 23 UPDATED, // Request was updated successfully. |
| 24 FAILED, // Add or update attempt failed. | 24 FAILED, // Add or update attempt failed. |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 typedef base::Callback<void( | 27 typedef base::Callback<void( |
| 28 bool /* success */, | 28 bool /* success */, |
| 29 const std::vector<SavePageRequest>& /* requests */)> | 29 const std::vector<SavePageRequest>& /* requests */)> |
| 30 GetRequestsCallback; | 30 GetRequestsCallback; |
| 31 typedef base::Callback<void(UpdateStatus)> UpdateCallback; | 31 typedef base::Callback<void(UpdateStatus)> UpdateCallback; |
| 32 // TODO(petewil) - UpdateMultiple looks exactly like Remove, consider | |
| 33 // merging them into a single callback. | |
| 34 typedef base::Callback<void( | 32 typedef base::Callback<void( |
| 35 const RequestQueue::UpdateMultipleRequestResults& /* statuses*/, | 33 const RequestQueue::UpdateMultipleRequestResults& /* statuses*/, |
| 36 const std::vector<SavePageRequest>& /* requests */)> | 34 const std::vector<SavePageRequest>& /* requests */)> |
| 37 UpdateMultipleRequestsCallback; | 35 UpdateMultipleRequestsCallback; |
| 38 typedef base::Callback<void( | 36 typedef base::Callback<void( |
| 39 const RequestQueue::UpdateMultipleRequestResults& /* statuses */, | 37 const RequestQueue::UpdateMultipleRequestResults& /* statuses */, |
| 40 const std::vector<SavePageRequest>& /* requests */)> | 38 const std::vector<SavePageRequest>& /* requests */)> |
| 41 RemoveCallback; | 39 RemoveCallback; |
| 42 typedef base::Callback<void(bool /* success */)> ResetCallback; | 40 typedef base::Callback<void(bool /* success */)> ResetCallback; |
| 43 | 41 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 66 const SavePageRequest::RequestState new_state, | 64 const SavePageRequest::RequestState new_state, |
| 67 const UpdateMultipleRequestsCallback& callback) = 0; | 65 const UpdateMultipleRequestsCallback& callback) = 0; |
| 68 | 66 |
| 69 // Resets the store. | 67 // Resets the store. |
| 70 virtual void Reset(const ResetCallback& callback) = 0; | 68 virtual void Reset(const ResetCallback& callback) = 0; |
| 71 }; | 69 }; |
| 72 | 70 |
| 73 } // namespace offline_pages | 71 } // namespace offline_pages |
| 74 | 72 |
| 75 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_STORE_H_ | 73 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_STORE_H_ |
| OLD | NEW |