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

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

Issue 2356433004: [Offline pages] Extracting AddRequest method in RequestQueueStore (Closed)
Patch Set: Addressing feedback plus attempt at fixing compilation issue" 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 | « no previous file | components/offline_pages/background/request_queue.cc » ('j') | 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 14 matching lines...) Expand all
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
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_
OLDNEW
« no previous file with comments | « no previous file | components/offline_pages/background/request_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698