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

Unified Diff: components/offline_pages/background/request_coordinator.h

Issue 2228813003: Changes to fit better with the needs of the download manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: components/offline_pages/background/request_coordinator.h
diff --git a/components/offline_pages/background/request_coordinator.h b/components/offline_pages/background/request_coordinator.h
index 5c6c03ba07193c4a779da7d6ea1d0ead94cf177e..3a683f887deaafaea8df46caf846bf6ee7939cac 100644
--- a/components/offline_pages/background/request_coordinator.h
+++ b/components/offline_pages/background/request_coordinator.h
@@ -50,21 +50,19 @@ class RequestCoordinator : public KeyedService {
bool SavePageLater(
const GURL& url, const ClientId& client_id, bool user_reqeusted);
- // Remove a list of requests by |client_id|. This removes requests from the
+ // Remove a list of requests by |request_id|. This removes requests from the
// request queue, but does not cancel an in-progress pre-render.
// TODO(petewil): Add code to cancel an in-progress pre-render.
- void RemoveRequests(const std::vector<ClientId>& client_ids);
+ void RemoveRequests(const std::vector<int64_t>& request_ids);
// Callback that receives the response for GetQueuedRequests. Client must
// copy the result right away, it goes out of scope at the end of the
// callback.
- typedef base::Callback<void(const std::vector<ClientId>&)>
+ typedef base::Callback<void(const std::vector<SavePageRequest>&)>
Dmitry Titov 2016/08/10 02:52:14 this is a strange type. A reference to a vector of
Pete Williamson 2016/08/10 21:15:25 We copy the SavePageRequest items into the vector,
Pete Williamson 2016/08/12 00:00:40 As we dicussed, we'll leave this behavior in for n
QueuedRequestCallback;
- // For a client namespace, get the ClientId of all requests for that
- // namespace.
- void GetQueuedRequests(const std::string& client_namespace,
- const QueuedRequestCallback& callback);
+ // Get all save page request items in the callback.
+ void GetQueuedRequests(const QueuedRequestCallback& callback);
Dmitry Titov 2016/08/10 02:52:14 Can we rename it to GetAllRequests? It does return
Pete Williamson 2016/08/10 21:15:25 Done.
// Starts processing of one or more queued save page later requests.
// Returns whether processing was started and that caller should expect
@@ -113,8 +111,7 @@ class RequestCoordinator : public KeyedService {
private:
// Receives the results of a get from the request queue, and turns that into
// ClientId objects for the caller of GetQueuedRequests.
- void GetQueuedRequestsCallback(const std::string& client_namespace,
- const QueuedRequestCallback& callback,
+ void GetQueuedRequestsCallback(const QueuedRequestCallback& callback,
RequestQueue::GetRequestsResult result,
const std::vector<SavePageRequest>& requests);

Powered by Google App Engine
This is Rietveld 408576698