Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_QUEUE_RESULTS_H_ | |
| 6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_QUEUE_RESULTS_H_ | |
| 7 | |
| 8 #include "components/offline_pages/background/save_page_request.h" | |
| 9 #include "components/offline_pages/offline_store_types.h" | |
| 10 | |
| 11 namespace offline_pages { | |
| 12 | |
| 13 // Extracted from RequestQueue so that we can build types that use these results | |
| 14 // that RequestQueue depends on (for example, the PickRequestTask). | |
| 15 struct QueueResults { | |
|
Evan Stade
2016/11/08 14:40:30
why this struct? seems like these types can be fir
Pete Williamson
2016/11/08 22:13:53
Done.
| |
| 16 typedef StoreUpdateResult<SavePageRequest> UpdateRequestsResult; | |
| 17 | |
| 18 enum class GetRequestsResult { | |
| 19 SUCCESS, | |
| 20 STORE_FAILURE, | |
| 21 }; | |
| 22 | |
| 23 enum class AddRequestResult { | |
| 24 SUCCESS, | |
| 25 STORE_FAILURE, | |
| 26 ALREADY_EXISTS, | |
| 27 REQUEST_QUOTA_HIT, // Cannot add a request with this namespace, as it has | |
| 28 // reached a quota of active requests. | |
| 29 }; | |
| 30 | |
| 31 // GENERATED_JAVA_ENUM_PACKAGE:org.chromium.components.offlinepages.background | |
| 32 enum class UpdateRequestResult { | |
| 33 SUCCESS, | |
| 34 STORE_FAILURE, | |
| 35 REQUEST_DOES_NOT_EXIST, // Failed to delete the request because it does not | |
| 36 // exist. | |
| 37 }; | |
| 38 }; | |
| 39 | |
| 40 } // namespace offline_pages | |
| 41 | |
| 42 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_QUEUE_RESULTS_H_ | |
| OLD | NEW |