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

Unified Diff: base/task_scheduler/scheduler_worker_thread_stack.h

Issue 2077093002: Rename SchedulerWorkerThread* to SchedulerWorker* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rename2
Patch Set: CR Feedback Created 4 years, 6 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_thread_stack.h
diff --git a/base/task_scheduler/scheduler_worker_thread_stack.h b/base/task_scheduler/scheduler_worker_thread_stack.h
deleted file mode 100644
index f669af1dcd2f5addae64ca8cf556343e2210cc10..0000000000000000000000000000000000000000
--- a/base/task_scheduler/scheduler_worker_thread_stack.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// 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_SCHEDULER_WORKER_THREAD_STACK_H_
-#define BASE_TASK_SCHEDULER_SCHEDULER_WORKER_THREAD_STACK_H_
-
-#include <stddef.h>
-
-#include <vector>
-
-#include "base/base_export.h"
-#include "base/macros.h"
-
-namespace base {
-namespace internal {
-
-class SchedulerWorkerThread;
-
-// 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
-// amortized O(1). Pop(), Size() and Empty() are O(1). Remove is O(n). This
-// class is NOT thread-safe.
-class BASE_EXPORT SchedulerWorkerThreadStack {
- public:
- SchedulerWorkerThreadStack();
- ~SchedulerWorkerThreadStack();
-
- // Inserts |worker_thread| at the top of the stack. |worker_thread| must not
- // already be on the stack.
- void Push(SchedulerWorkerThread* worker_thread);
-
- // Removes the top SchedulerWorkerThread from the stack and returns it.
- // Returns nullptr if the stack is empty.
- SchedulerWorkerThread* Pop();
-
- // Removes |worker_thread| from the stack.
- void Remove(const SchedulerWorkerThread* worker_thread);
-
- // Returns the number of SchedulerWorkerThreads 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_;
-
- DISALLOW_COPY_AND_ASSIGN(SchedulerWorkerThreadStack);
-};
-
-} // namespace internal
-} // namespace base
-
-#endif // BASE_TASK_SCHEDULER_SCHEDULER_WORKER_THREAD_STACK_H_
« no previous file with comments | « base/task_scheduler/scheduler_worker_thread.cc ('k') | base/task_scheduler/scheduler_worker_thread_stack.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698