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

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

Issue 2541423002: [Offline pages] Switching ChangeRequestsStateTask to use RequestQueueStore::GetRequestsByIds (Closed)
Patch Set: Fixing the comment Created 4 years 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
« no previous file with comments | « no previous file | components/offline_pages/background/change_requests_state_task.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/background/change_requests_state_task.h
diff --git a/components/offline_pages/background/change_requests_state_task.h b/components/offline_pages/background/change_requests_state_task.h
index 2213c6879486ee995dd588457bc7a97ab790755b..569d3e4313bd8c012e57b68ea2c98257d357b05a 100644
--- a/components/offline_pages/background/change_requests_state_task.h
+++ b/components/offline_pages/background/change_requests_state_task.h
@@ -32,21 +32,15 @@ class ChangeRequestsStateTask : public Task {
private:
// Step 1. Reading the requests.
void ReadRequests();
- // Step 2. Selecting requests to be updated. Calls update.
- void SelectItemsToUpdate(
- bool success,
- std::vector<std::unique_ptr<SavePageRequest>> requests);
+ // Step 2. Updates available requests.
+ void UpdateRequests(std::unique_ptr<UpdateRequestsResult> read_result);
// Step 3. Processes update result, calls callback.
void UpdateCompleted(std::unique_ptr<UpdateRequestsResult> update_result);
- // Completions.
- void CompleteEarly(ItemActionStatus status);
- void CompleteWithStatus(std::unique_ptr<UpdateRequestsResult> result,
- ItemActionStatus status);
-
// Store that this task updates.
RequestQueueStore* store_;
- // Request IDs to be updated.
+ // Request IDs to be updated. Kept as a set to remove duplicates and simplify
+ // the look up of requests that are not found in step 3.
std::unordered_set<int64_t> request_ids_;
// New state to be set on all entries.
SavePageRequest::RequestState new_state_;
« no previous file with comments | « no previous file | components/offline_pages/background/change_requests_state_task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698