Chromium Code Reviews| Index: components/offline_pages/background/cleanup_task_factory.cc |
| diff --git a/components/offline_pages/background/pick_request_task_factory.cc b/components/offline_pages/background/cleanup_task_factory.cc |
| similarity index 51% |
| rename from components/offline_pages/background/pick_request_task_factory.cc |
| rename to components/offline_pages/background/cleanup_task_factory.cc |
| index 8d2a00eb4b16e21f99834e5d68bbc963a79700a8..977e6ffe68dc803f2866f3fd547ea1494be75daa 100644 |
| --- a/components/offline_pages/background/pick_request_task_factory.cc |
| +++ b/components/offline_pages/background/cleanup_task_factory.cc |
| @@ -2,7 +2,7 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#include "components/offline_pages/background/pick_request_task_factory.h" |
| +#include "components/offline_pages/background/cleanup_task_factory.h" |
| #include "components/offline_pages/background/offliner_policy.h" |
| #include "components/offline_pages/background/request_coordinator_event_logger.h" |
| @@ -13,25 +13,18 @@ namespace offline_pages { |
| // Capture the common parameters that we will need to make a pick task, |
| // and use them when making tasks. Create this once each session, and |
| // use it to build a picker task when needed. |
| -PickRequestTaskFactory::PickRequestTaskFactory( |
| +CleanupTaskFactory::CleanupTaskFactory( |
| OfflinerPolicy* policy, |
| RequestNotifier* notifier, |
| RequestCoordinatorEventLogger* event_logger) |
| : policy_(policy), notifier_(notifier), event_logger_(event_logger) {} |
|
fgorski
2016/12/02 21:44:04
would it make sense to DCHECK these inputs?
Pete Williamson
2016/12/05 20:39:45
Done.
|
| -PickRequestTaskFactory::~PickRequestTaskFactory() {} |
| +CleanupTaskFactory::~CleanupTaskFactory() {} |
| -std::unique_ptr<PickRequestTask> PickRequestTaskFactory::CreatePickerTask( |
| - RequestQueueStore* store, |
| - const PickRequestTask::RequestPickedCallback& picked_callback, |
| - const PickRequestTask::RequestNotPickedCallback& not_picked_callback, |
| - const PickRequestTask::RequestCountCallback& request_count_callback, |
| - DeviceConditions& conditions, |
| - std::set<int64_t>& disabled_requests) { |
| - std::unique_ptr<PickRequestTask> task(new PickRequestTask( |
| - store, policy_, notifier_, event_logger_, picked_callback, |
| - not_picked_callback, request_count_callback, conditions, |
| - disabled_requests)); |
| +std::unique_ptr<CleanupTask> CleanupTaskFactory::CreateCleanupTask( |
| + RequestQueueStore* store) { |
| + std::unique_ptr<CleanupTask> task( |
| + new CleanupTask(store, policy_, notifier_, event_logger_)); |
| return task; |
| } |