| 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 14 matching lines...) Expand all Loading... |
| 25 class RequestQueue { | 25 class RequestQueue { |
| 26 public: | 26 public: |
| 27 enum class GetRequestsResult { | 27 enum class GetRequestsResult { |
| 28 SUCCESS, | 28 SUCCESS, |
| 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 ALREADY_EXISTS, |
| 35 REQUEST_QUOTA_HIT, // Cannot add a request with this namespace, as it has | 36 REQUEST_QUOTA_HIT, // Cannot add a request with this namespace, as it has |
| 36 // reached a quota of active requests. | 37 // reached a quota of active requests. |
| 37 }; | 38 }; |
| 38 | 39 |
| 39 // GENERATED_JAVA_ENUM_PACKAGE:org.chromium.components.offlinepages.background | 40 // GENERATED_JAVA_ENUM_PACKAGE:org.chromium.components.offlinepages.background |
| 40 enum class UpdateRequestResult { | 41 enum class UpdateRequestResult { |
| 41 SUCCESS, | 42 SUCCESS, |
| 42 STORE_FAILURE, | 43 STORE_FAILURE, |
| 43 REQUEST_DOES_NOT_EXIST, // Failed to delete the request because it does not | 44 REQUEST_DOES_NOT_EXIST, // Failed to delete the request because it does not |
| 44 // exist. | 45 // exist. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 | 128 |
| 128 // Allows us to pass a weak pointer to callbacks. | 129 // Allows us to pass a weak pointer to callbacks. |
| 129 base::WeakPtrFactory<RequestQueue> weak_ptr_factory_; | 130 base::WeakPtrFactory<RequestQueue> weak_ptr_factory_; |
| 130 | 131 |
| 131 DISALLOW_COPY_AND_ASSIGN(RequestQueue); | 132 DISALLOW_COPY_AND_ASSIGN(RequestQueue); |
| 132 }; | 133 }; |
| 133 | 134 |
| 134 } // namespace offline_pages | 135 } // namespace offline_pages |
| 135 | 136 |
| 136 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_H_ | 137 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_H_ |
| OLD | NEW |