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

Side by Side Diff: components/offline_pages/core/background/remove_requests_task.h

Issue 2841113003: [Offline pages] Addressing TODOs in RemoveRequestTask (Closed)
Patch Set: Created 3 years, 8 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/core/background/remove_requests_task.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_CORE_BACKGROUND_REMOVE_REQUESTS_TASK_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_REMOVE_REQUESTS_TASK_H_
6 #define COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_REMOVE_REQUESTS_TASK_H_ 6 #define COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_REMOVE_REQUESTS_TASK_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 20 matching lines...) Expand all
31 // Step 1. Removes requests from the store. 31 // Step 1. Removes requests from the store.
32 void RemoveRequests(); 32 void RemoveRequests();
33 // Step for early termination, that builds failure result. 33 // Step for early termination, that builds failure result.
34 void CompleteEarly(ItemActionStatus status); 34 void CompleteEarly(ItemActionStatus status);
35 // Step 2. Processes update result, calls callback. 35 // Step 2. Processes update result, calls callback.
36 void CompleteWithResult(std::unique_ptr<UpdateRequestsResult> result); 36 void CompleteWithResult(std::unique_ptr<UpdateRequestsResult> result);
37 37
38 // Store that this task updates. 38 // Store that this task updates.
39 RequestQueueStore* store_; 39 RequestQueueStore* store_;
40 // Request IDs to be updated. 40 // Request IDs to be updated.
41 // TODO(fgorski): perhaps convert to unique_ptr to a vector.
42 std::vector<int64_t> request_ids_; 41 std::vector<int64_t> request_ids_;
43 // Callback to complete the task. 42 // Callback to complete the task.
44 RequestQueueStore::UpdateCallback callback_; 43 RequestQueueStore::UpdateCallback callback_;
45 44
46 base::WeakPtrFactory<RemoveRequestsTask> weak_ptr_factory_; 45 base::WeakPtrFactory<RemoveRequestsTask> weak_ptr_factory_;
47 46
48 DISALLOW_COPY_AND_ASSIGN(RemoveRequestsTask); 47 DISALLOW_COPY_AND_ASSIGN(RemoveRequestsTask);
49 }; 48 };
50 49
51 } // namespace offline_pages 50 } // namespace offline_pages
52 51
53 #endif // COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_REMOVE_REQUESTS_TASK_H_ 52 #endif // COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_REMOVE_REQUESTS_TASK_H_
OLDNEW
« no previous file with comments | « no previous file | components/offline_pages/core/background/remove_requests_task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698