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

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

Issue 2209813002: [Offline Pages] Moves Coordinator to using MarkAttemptStarted/MarkAttemptCompleted API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge Created 4 years, 4 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
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_COORDINATOR_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_COORDINATOR_H_
6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_COORDINATOR_H_ 6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_COORDINATOR_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 void GetQueuedRequestsCallback(const std::string& client_namespace, 116 void GetQueuedRequestsCallback(const std::string& client_namespace,
117 const QueuedRequestCallback& callback, 117 const QueuedRequestCallback& callback,
118 RequestQueue::GetRequestsResult result, 118 RequestQueue::GetRequestsResult result,
119 const std::vector<SavePageRequest>& requests); 119 const std::vector<SavePageRequest>& requests);
120 120
121 // Receives the result of add requests to the request queue. 121 // Receives the result of add requests to the request queue.
122 void AddRequestResultCallback(RequestQueue::AddRequestResult result, 122 void AddRequestResultCallback(RequestQueue::AddRequestResult result,
123 const SavePageRequest& request); 123 const SavePageRequest& request);
124 124
125 // Receives the result of update and delete requests to the request queue. 125 // Receives the result of update and delete requests to the request queue.
126 void UpdateRequestCallback(RequestQueue::UpdateRequestResult result); 126 void UpdateRequestCallback(const ClientId& client_id,
127 RequestQueue::UpdateRequestResult result);
128
129 void UpdateMultipleRequestCallback(RequestQueue::UpdateRequestResult result);
127 130
128 // Callback from the request picker when it has chosen our next request. 131 // Callback from the request picker when it has chosen our next request.
129 void RequestPicked(const SavePageRequest& request); 132 void RequestPicked(const SavePageRequest& request);
130 133
131 // Callback from the request picker when no more requests are in the queue. 134 // Callback from the request picker when no more requests are in the queue.
132 void RequestQueueEmpty(); 135 void RequestQueueEmpty();
133 136
134 void SendRequestToOffliner(const SavePageRequest& request); 137 void SendRequestToOffliner(const SavePageRequest& request);
135 138
136 // Called by the offliner when an offlining request is completed. (and by 139 // Called by the offliner when an offlining request is completed. (and by
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 base::TimeDelta offliner_timeout_; 190 base::TimeDelta offliner_timeout_;
188 // Allows us to pass a weak pointer to callbacks. 191 // Allows us to pass a weak pointer to callbacks.
189 base::WeakPtrFactory<RequestCoordinator> weak_ptr_factory_; 192 base::WeakPtrFactory<RequestCoordinator> weak_ptr_factory_;
190 193
191 DISALLOW_COPY_AND_ASSIGN(RequestCoordinator); 194 DISALLOW_COPY_AND_ASSIGN(RequestCoordinator);
192 }; 195 };
193 196
194 } // namespace offline_pages 197 } // namespace offline_pages
195 198
196 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_COORDINATOR_H_ 199 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_COORDINATOR_H_
OLDNEW
« no previous file with comments | « components/offline_pages/background/offliner.h ('k') | components/offline_pages/background/request_coordinator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698