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

Side by Side Diff: components/offline_pages/background/pick_request_task_factory.cc

Issue 2489443002: Move all components/offline_pages/ files into component/offline_pages/core (Closed)
Patch Set: update Created 4 years, 1 month 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "components/offline_pages/background/pick_request_task_factory.h"
6
7 #include "components/offline_pages/background/offliner_policy.h"
8 #include "components/offline_pages/background/request_coordinator_event_logger.h "
9 #include "components/offline_pages/background/request_notifier.h"
10
11 namespace offline_pages {
12
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
15 // use it to build a picker task when needed.
16 PickRequestTaskFactory::PickRequestTaskFactory(
17 OfflinerPolicy* policy,
18 RequestNotifier* notifier,
19 RequestCoordinatorEventLogger* event_logger)
20 : policy_(policy), notifier_(notifier), event_logger_(event_logger) {}
21
22 PickRequestTaskFactory::~PickRequestTaskFactory() {}
23
24 std::unique_ptr<PickRequestTask> PickRequestTaskFactory::CreatePickerTask(
25 RequestQueueStore* store,
26 const PickRequestTask::RequestPickedCallback& picked_callback,
27 const PickRequestTask::RequestNotPickedCallback& not_picked_callback,
28 DeviceConditions& conditions,
29 std::set<int64_t>& disabled_requests) {
30 std::unique_ptr<PickRequestTask> task(new PickRequestTask(
31 store, policy_, notifier_, event_logger_, picked_callback,
32 not_picked_callback, conditions, disabled_requests));
33 return task;
34 }
35
36 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698