| 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 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "components/offline_pages/background/request_queue.h" | 12 #include "components/offline_pages/background/request_queue.h" |
| 13 #include "components/offline_pages/background/save_page_request.h" | 13 #include "components/offline_pages/background/save_page_request.h" |
| 14 #include "components/offline_pages/offline_page_types.h" | 14 #include "components/offline_pages/offline_store_types.h" |
| 15 | 15 |
| 16 namespace offline_pages { | 16 namespace offline_pages { |
| 17 | 17 |
| 18 // Interface for classes storing save page requests. | 18 // Interface for classes storing save page requests. |
| 19 class RequestQueueStore { | 19 class RequestQueueStore { |
| 20 public: | 20 public: |
| 21 enum class UpdateStatus { | 21 enum class UpdateStatus { |
| 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. |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 const SavePageRequest::RequestState new_state, | 70 const SavePageRequest::RequestState new_state, |
| 71 const UpdateMultipleRequestsCallback& callback) = 0; | 71 const UpdateMultipleRequestsCallback& callback) = 0; |
| 72 | 72 |
| 73 // Resets the store. | 73 // Resets the store. |
| 74 virtual void Reset(const ResetCallback& callback) = 0; | 74 virtual void Reset(const ResetCallback& callback) = 0; |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace offline_pages | 77 } // namespace offline_pages |
| 78 | 78 |
| 79 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_STORE_H_ | 79 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_STORE_H_ |
| OLD | NEW |