Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Side by Side Diff: components/offline_pages/background/request_queue.h

Issue 2256373002: Adds request queue removal capability to OfflinePageBridge. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@query-queue
Patch Set: Rebase. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/offline_pages/background/request_coordinator_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « components/offline_pages/background/request_coordinator_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698