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

Unified Diff: components/offline_pages/background/pick_request_task_builder.cc

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 side-by-side diff with in-line comments
Download patch
Index: components/offline_pages/background/pick_request_task_builder.cc
diff --git a/components/offline_pages/background/pick_request_task_builder.cc b/components/offline_pages/background/pick_request_task_builder.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a73d5225cff4b59e4e548f3f8dffd4ba15138aa7
--- /dev/null
+++ b/components/offline_pages/background/pick_request_task_builder.cc
@@ -0,0 +1,32 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// 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_builder.h"
+
+#include "components/offline_pages/background/request_coordinator_event_logger.h"
+
+namespace offline_pages {
+
+PickRequestTaskBuilder::PickRequestTaskBuilder(
+ OfflinerPolicy* policy,
+ RequestNotifier* notifier,
+ RequestCoordinatorEventLogger* event_logger)
+ : policy_(policy), notifier_(notifier), event_logger_(event_logger) {}
+
+PickRequestTaskBuilder::~PickRequestTaskBuilder() {}
+
+std::unique_ptr<PickRequestTask> PickRequestTaskBuilder::CreatePickerTask(
+ RequestQueue* queue,
+ PickRequestTask::RequestPickedCallback picked_callback,
+ PickRequestTask::RequestNotPickedCallback not_picked_callback,
+ DeviceConditions* conditions,
+ std::set<int64_t>& disabled_requests) {
+ std::unique_ptr<PickRequestTask> task;
+ task.reset(new PickRequestTask(queue, policy_, notifier_, event_logger_,
+ picked_callback, not_picked_callback,
+ conditions, disabled_requests));
+ return task;
+}
+
+} // namespace offline_pages

Powered by Google App Engine
This is Rietveld 408576698