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

Side by Side Diff: components/offline_pages/background/pick_request_task_builder.h

Issue 2473553004: Request Picker task (Closed)
Patch Set: CR fixes per DougArnett 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 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_PICK_REQUEST_TASK_BUILDER_H_
6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_PICK_REQUEST_TASK_BUILDER_H_
7
8 #include "components/offline_pages/background/device_conditions.h"
9
fgorski 2016/11/03 22:00:29 nit: space not needed.
Pete Williamson 2016/11/04 18:53:37 Done.
10 #include "components/offline_pages/background/pick_request_task.h"
11 #include "components/offline_pages/background/request_coordinator.h"
12
13 namespace offline_pages {
14
15 class OfflinerPolicy;
16 class RequestCoordinatorEventLogger;
17 class RequestNotifier;
18 class RequestQueue;
19
20 class PickRequestTaskBuilder {
fgorski 2016/11/03 22:00:29 Given the interface presented by this class it fee
Pete Williamson 2016/11/04 18:53:37 Doc added. I'm not sure I understand your request
fgorski 2016/11/04 21:41:28 Yes, I think Factory suits this case better. Also
21 public:
22 PickRequestTaskBuilder(OfflinerPolicy* policy,
23 RequestNotifier* notifier,
24 RequestCoordinatorEventLogger* event_logger);
25
26 ~PickRequestTaskBuilder();
27
28 std::unique_ptr<PickRequestTask> CreatePickerTask(
29 RequestQueue* queue,
30 PickRequestTask::RequestPickedCallback picked_callback,
31 PickRequestTask::RequestNotPickedCallback not_picked_callback,
fgorski 2016/11/03 22:00:29 Could you use const & for both callbacks, unless y
Pete Williamson 2016/11/04 18:53:37 Done.
32 DeviceConditions* conditions,
33 std::set<int64_t>& disabled_requests);
34
35 private:
36 // Unowned pointer to the Policy
37 OfflinerPolicy* policy_;
38 // Unowned pointer to the notifier
39 RequestNotifier* notifier_;
40 // Unowned pointer to the EventLogger
41 RequestCoordinatorEventLogger* event_logger_;
42 };
43
44 } // namespace offline_pages
45
46 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_PICK_REQUEST_TASK_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698