| 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_CORE_BACKGROUND_REQUEST_QUEUE_STORE_H_ |
| 6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_STORE_H_ | 6 #define COMPONENTS_OFFLINE_PAGES_CORE_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/core/background/request_queue.h" |
| 13 #include "components/offline_pages/background/save_page_request.h" | 13 #include "components/offline_pages/core/background/save_page_request.h" |
| 14 #include "components/offline_pages/offline_store_types.h" | 14 #include "components/offline_pages/core/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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 // Resets the store. | 63 // Resets the store. |
| 64 virtual void Reset(const ResetCallback& callback) = 0; | 64 virtual void Reset(const ResetCallback& callback) = 0; |
| 65 | 65 |
| 66 // Gets the store state. | 66 // Gets the store state. |
| 67 virtual StoreState state() const = 0; | 67 virtual StoreState state() const = 0; |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 } // namespace offline_pages | 70 } // namespace offline_pages |
| 71 | 71 |
| 72 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_STORE_H_ | 72 #endif // COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_REQUEST_QUEUE_STORE_H_ |
| OLD | NEW |