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

Unified Diff: base/task_scheduler/utils.h

Issue 1704113002: TaskScheduler [6] SchedulerWorkerThread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@s_4_shutdown
Patch Set: CR from robliao Created 4 years, 9 months 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: base/task_scheduler/utils.h
diff --git a/base/task_scheduler/utils.h b/base/task_scheduler/utils.h
new file mode 100644
index 0000000000000000000000000000000000000000..759669679478487570eee77e9f1e360b08d3a804
--- /dev/null
+++ b/base/task_scheduler/utils.h
@@ -0,0 +1,31 @@
+// 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.
+
+#ifndef BASE_TASK_SCHEDULER_UTILS_H_
+#define BASE_TASK_SCHEDULER_UTILS_H_
+
+#include "base/base_export.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/task_scheduler/sequence.h"
+#include "base/task_scheduler/task.h"
+
+namespace base {
+namespace internal {
+
+class PriorityQueue;
+class TaskTracker;
+
+// If TaskTracker allows |task| to be posted, inserts it into |sequence|. Then,
gab 2016/03/21 19:11:53 s/TaskTracker/|task_tracker|/
fdoray 2016/03/24 19:21:09 Done.
+// inserts |sequence| into |priority_queue| if it was empty before |task| was
+// inserted into it.
+void BASE_EXPORT PostTaskHelper(scoped_ptr<Task> task,
+ scoped_refptr<Sequence> sequence,
+ PriorityQueue* priority_queue,
+ TaskTracker* task_tracker);
+
+} // namespace internal
+} // namespace base
+
+#endif // BASE_TASK_SCHEDULER_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698