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

Unified Diff: base/task_scheduler/scheduler_worker_pool.h

Issue 2721553003: Remove SingleThreadTaskRunner Support from SchedulerWorkerPoolImpl (Closed)
Patch Set: Rebase to 08266b3 Created 3 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/scheduler_worker_pool.h
diff --git a/base/task_scheduler/scheduler_worker_pool.h b/base/task_scheduler/scheduler_worker_pool.h
index c742ac3c454283d88b782b852831e4e0a5103710..f7a89084c59b55dd12ded877fca205816b717de1 100644
--- a/base/task_scheduler/scheduler_worker_pool.h
+++ b/base/task_scheduler/scheduler_worker_pool.h
@@ -10,7 +10,6 @@
#include "base/base_export.h"
#include "base/memory/ref_counted.h"
#include "base/sequenced_task_runner.h"
-#include "base/single_thread_task_runner.h"
#include "base/task_runner.h"
#include "base/task_scheduler/sequence.h"
#include "base/task_scheduler/task.h"
@@ -19,7 +18,6 @@
namespace base {
namespace internal {
-class SchedulerWorker;
class SequenceSortKey;
// Interface for a worker pool.
@@ -39,12 +37,6 @@ class BASE_EXPORT SchedulerWorkerPool {
virtual scoped_refptr<SequencedTaskRunner>
CreateSequencedTaskRunnerWithTraits(const TaskTraits& traits) = 0;
- // Returns a SingleThreadTaskRunner whose PostTask invocations result in
- // scheduling tasks in this SchedulerWorkerPool using |traits|. Tasks run on a
- // single thread in posting order.
- virtual scoped_refptr<SingleThreadTaskRunner>
- CreateSingleThreadTaskRunnerWithTraits(const TaskTraits& traits) = 0;
-
// Inserts |sequence| with |sequence_sort_key| into a queue of Sequences that
// can be processed by any worker owned by this SchedulerWorkerPool. Must only
// be used to put |sequence| back into a queue after running a Task from it.
@@ -54,24 +46,16 @@ class BASE_EXPORT SchedulerWorkerPool {
const SequenceSortKey& sequence_sort_key) = 0;
// Posts |task| to be executed by this SchedulerWorkerPool as part of
- // |sequence|. If |worker| is non-null, |task| will be scheduled to run on it
- // specifically (note: |worker| must be owned by this SchedulerWorkerPool);
- // otherwise, |task| will be added to the pending shared work. |task| won't be
- // executed before its delayed run time, if any. Returns true if |task| is
- // posted.
+ // |sequence|. |task| won't be executed before its delayed run time, if any.
+ // Returns true if |task| is posted.
virtual bool PostTaskWithSequence(std::unique_ptr<Task> task,
- scoped_refptr<Sequence> sequence,
- SchedulerWorker* worker) = 0;
+ scoped_refptr<Sequence> sequence) = 0;
// Posts |task| to be executed by this SchedulerWorkerPool as part of
- // |sequence|. If |worker| is non-null, |task| will be scheduled to run on it
- // specifically (note: |worker| must be owned by this SchedulerWorkerPool);
- // otherwise, |task| will be added to the pending shared work. This must only
- // be called after |task| has gone through PostTaskWithSequence() and after
- // |task|'s delayed run time.
+ // |sequence|. This must only be called after |task| has gone through
+ // PostTaskWithSequence() and after |task|'s delayed run time.
virtual void PostTaskWithSequenceNow(std::unique_ptr<Task> task,
- scoped_refptr<Sequence> sequence,
- SchedulerWorker* worker) = 0;
+ scoped_refptr<Sequence> sequence) = 0;
};
} // namespace internal

Powered by Google App Engine
This is Rietveld 408576698