OLD | NEW |
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 #include "components/offline_pages/background/cleanup_task_factory.h" | 5 #include "components/offline_pages/core/background/cleanup_task_factory.h" |
6 | 6 |
7 #include "components/offline_pages/background/offliner_policy.h" | 7 #include "components/offline_pages/core/background/offliner_policy.h" |
8 #include "components/offline_pages/background/request_coordinator_event_logger.h
" | 8 #include "components/offline_pages/core/background/request_coordinator_event_log
ger.h" |
9 #include "components/offline_pages/background/request_notifier.h" | 9 #include "components/offline_pages/core/background/request_notifier.h" |
10 | 10 |
11 namespace offline_pages { | 11 namespace offline_pages { |
12 | 12 |
13 // Capture the common parameters that we will need to make a pick task, | 13 // Capture the common parameters that we will need to make a pick task, |
14 // and use them when making tasks. Create this once each session, and | 14 // and use them when making tasks. Create this once each session, and |
15 // use it to build a picker task when needed. | 15 // use it to build a picker task when needed. |
16 CleanupTaskFactory::CleanupTaskFactory( | 16 CleanupTaskFactory::CleanupTaskFactory( |
17 OfflinerPolicy* policy, | 17 OfflinerPolicy* policy, |
18 RequestNotifier* notifier, | 18 RequestNotifier* notifier, |
19 RequestCoordinatorEventLogger* event_logger) | 19 RequestCoordinatorEventLogger* event_logger) |
20 : policy_(policy), notifier_(notifier), event_logger_(event_logger) { | 20 : policy_(policy), notifier_(notifier), event_logger_(event_logger) { |
21 DCHECK(policy); | 21 DCHECK(policy); |
22 DCHECK(notifier); | 22 DCHECK(notifier); |
23 DCHECK(event_logger); | 23 DCHECK(event_logger); |
24 } | 24 } |
25 | 25 |
26 CleanupTaskFactory::~CleanupTaskFactory() {} | 26 CleanupTaskFactory::~CleanupTaskFactory() {} |
27 | 27 |
28 std::unique_ptr<CleanupTask> CleanupTaskFactory::CreateCleanupTask( | 28 std::unique_ptr<CleanupTask> CleanupTaskFactory::CreateCleanupTask( |
29 RequestQueueStore* store) { | 29 RequestQueueStore* store) { |
30 std::unique_ptr<CleanupTask> task( | 30 std::unique_ptr<CleanupTask> task( |
31 new CleanupTask(store, policy_, notifier_, event_logger_)); | 31 new CleanupTask(store, policy_, notifier_, event_logger_)); |
32 return task; | 32 return task; |
33 } | 33 } |
34 | 34 |
35 } // namespace offline_pages | 35 } // namespace offline_pages |
OLD | NEW |