| Index: base/task_scheduler/scheduler_worker_stack.h
|
| diff --git a/base/task_scheduler/scheduler_worker_thread_stack.h b/base/task_scheduler/scheduler_worker_stack.h
|
| similarity index 38%
|
| rename from base/task_scheduler/scheduler_worker_thread_stack.h
|
| rename to base/task_scheduler/scheduler_worker_stack.h
|
| index f669af1dcd2f5addae64ca8cf556343e2210cc10..1d1748ca10520a7a39b626268edec3f81a97ff01 100644
|
| --- a/base/task_scheduler/scheduler_worker_thread_stack.h
|
| +++ b/base/task_scheduler/scheduler_worker_stack.h
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef BASE_TASK_SCHEDULER_SCHEDULER_WORKER_THREAD_STACK_H_
|
| -#define BASE_TASK_SCHEDULER_SCHEDULER_WORKER_THREAD_STACK_H_
|
| +#ifndef BASE_TASK_SCHEDULER_SCHEDULER_WORKER_STACK_H_
|
| +#define BASE_TASK_SCHEDULER_SCHEDULER_WORKER_STACK_H_
|
|
|
| #include <stddef.h>
|
|
|
| @@ -15,42 +15,42 @@
|
| namespace base {
|
| namespace internal {
|
|
|
| -class SchedulerWorkerThread;
|
| +class SchedulerWorker;
|
|
|
| -// A stack of SchedulerWorkerThreads. Supports removal of arbitrary
|
| -// SchedulerWorkerThreads. DCHECKs when a SchedulerWorkerThread is inserted
|
| -// multiple times. SchedulerWorkerThreads are not owned by the stack. Push() is
|
| +// A stack of SchedulerWorkers. Supports removal of arbitrary
|
| +// SchedulerWorkers. DCHECKs when a SchedulerWorker is inserted
|
| +// multiple times. SchedulerWorkers are not owned by the stack. Push() is
|
| // amortized O(1). Pop(), Size() and Empty() are O(1). Remove is O(n). This
|
| // class is NOT thread-safe.
|
| -class BASE_EXPORT SchedulerWorkerThreadStack {
|
| +class BASE_EXPORT SchedulerWorkerStack {
|
| public:
|
| - SchedulerWorkerThreadStack();
|
| - ~SchedulerWorkerThreadStack();
|
| + SchedulerWorkerStack();
|
| + ~SchedulerWorkerStack();
|
|
|
| - // Inserts |worker_thread| at the top of the stack. |worker_thread| must not
|
| - // already be on the stack.
|
| - void Push(SchedulerWorkerThread* worker_thread);
|
| + // Inserts |worker| at the top of the stack. |worker| must not already be on
|
| + // the stack.
|
| + void Push(SchedulerWorker* worker);
|
|
|
| - // Removes the top SchedulerWorkerThread from the stack and returns it.
|
| + // Removes the top SchedulerWorker from the stack and returns it.
|
| // Returns nullptr if the stack is empty.
|
| - SchedulerWorkerThread* Pop();
|
| + SchedulerWorker* Pop();
|
|
|
| - // Removes |worker_thread| from the stack.
|
| - void Remove(const SchedulerWorkerThread* worker_thread);
|
| + // Removes |worker| from the stack.
|
| + void Remove(const SchedulerWorker* worker);
|
|
|
| - // Returns the number of SchedulerWorkerThreads on the stack.
|
| + // Returns the number of SchedulerWorkers on the stack.
|
| size_t Size() const { return stack_.size(); }
|
|
|
| // Returns true if the stack is empty.
|
| bool IsEmpty() const { return stack_.empty(); }
|
|
|
| private:
|
| - std::vector<SchedulerWorkerThread*> stack_;
|
| + std::vector<SchedulerWorker*> stack_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(SchedulerWorkerThreadStack);
|
| + DISALLOW_COPY_AND_ASSIGN(SchedulerWorkerStack);
|
| };
|
|
|
| } // namespace internal
|
| } // namespace base
|
|
|
| -#endif // BASE_TASK_SCHEDULER_SCHEDULER_WORKER_THREAD_STACK_H_
|
| +#endif // BASE_TASK_SCHEDULER_SCHEDULER_WORKER_STACK_H_
|
|
|