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

Unified Diff: components/offline_pages/background/request_picker.cc

Issue 2373933003: [Offline pages] Updating RequestQueue::RemoveRequests to use a TaskQueue (Closed)
Patch Set: Addressing final feedback Created 4 years, 2 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_picker.cc
diff --git a/components/offline_pages/background/request_picker.cc b/components/offline_pages/background/request_picker.cc
index e0b03d4aacf6ef240d9a8a37b91bac27d0a77391..b05fc1dc8660b52630ddf95e1ed65184b74d1387 100644
--- a/components/offline_pages/background/request_picker.cc
+++ b/components/offline_pages/background/request_picker.cc
@@ -255,15 +255,13 @@ void RequestPicker::SplitRequests(
// Callback used after expired requests are deleted from the queue and notifies
// the coordinator.
void RequestPicker::OnRequestExpired(
- const RequestQueue::UpdateMultipleRequestResults& results,
- const std::vector<std::unique_ptr<SavePageRequest>> requests) {
- for (const auto& request : requests) {
- const RequestCoordinator::BackgroundSavePageResult result(
- RequestCoordinator::BackgroundSavePageResult::EXPIRED);
+ std::unique_ptr<UpdateRequestsResult> result) {
+ const RequestCoordinator::BackgroundSavePageResult save_page_result(
+ RequestCoordinator::BackgroundSavePageResult::EXPIRED);
+ for (const auto& request : result->updated_items) {
event_logger_->RecordDroppedSavePageRequest(
- request->client_id().name_space, result,
- request->request_id());
- notifier_->NotifyCompleted(*request, result);
+ request.client_id().name_space, save_page_result, request.request_id());
+ notifier_->NotifyCompleted(request, save_page_result);
}
}
« no previous file with comments | « components/offline_pages/background/request_picker.h ('k') | components/offline_pages/background/request_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698