| 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_H_ | 5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_H_ |
| 6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_H_ | 6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 STORE_FAILURE, | 29 STORE_FAILURE, |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 enum class AddRequestResult { | 32 enum class AddRequestResult { |
| 33 SUCCESS, | 33 SUCCESS, |
| 34 STORE_FAILURE, | 34 STORE_FAILURE, |
| 35 REQUEST_QUOTA_HIT, // Cannot add a request with this namespace, as it has | 35 REQUEST_QUOTA_HIT, // Cannot add a request with this namespace, as it has |
| 36 // reached a quota of active requests. | 36 // reached a quota of active requests. |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 // GENERATED_JAVA_ENUM_PACKAGE:org.chromium.components.offlinepages.background |
| 39 enum class UpdateRequestResult { | 40 enum class UpdateRequestResult { |
| 40 SUCCESS, | 41 SUCCESS, |
| 41 STORE_FAILURE, | 42 STORE_FAILURE, |
| 42 REQUEST_DOES_NOT_EXIST, // Failed to delete the request because it does not | 43 REQUEST_DOES_NOT_EXIST, // Failed to delete the request because it does not |
| 43 // exist. | 44 // exist. |
| 44 }; | 45 }; |
| 45 | 46 |
| 46 // Type for a pair of request_id and result. | 47 // Type for a pair of request_id and result. |
| 47 typedef std::vector<std::pair<int64_t, UpdateRequestResult>> | 48 typedef std::vector<std::pair<int64_t, UpdateRequestResult>> |
| 48 UpdateMultipleRequestResults; | 49 UpdateMultipleRequestResults; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 125 |
| 125 // Allows us to pass a weak pointer to callbacks. | 126 // Allows us to pass a weak pointer to callbacks. |
| 126 base::WeakPtrFactory<RequestQueue> weak_ptr_factory_; | 127 base::WeakPtrFactory<RequestQueue> weak_ptr_factory_; |
| 127 | 128 |
| 128 DISALLOW_COPY_AND_ASSIGN(RequestQueue); | 129 DISALLOW_COPY_AND_ASSIGN(RequestQueue); |
| 129 }; | 130 }; |
| 130 | 131 |
| 131 } // namespace offline_pages | 132 } // namespace offline_pages |
| 132 | 133 |
| 133 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_H_ | 134 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_H_ |
| OLD | NEW |