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

Unified Diff: components/scheduler/base/work_queue_sets.h

Issue 2118903002: scheduler: Move the Blink scheduler into Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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
« no previous file with comments | « components/scheduler/base/work_queue.cc ('k') | components/scheduler/base/work_queue_sets.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/scheduler/base/work_queue_sets.h
diff --git a/components/scheduler/base/work_queue_sets.h b/components/scheduler/base/work_queue_sets.h
deleted file mode 100644
index 0c2c2dcf2c15c939162a07b94e12f82de8f4bf78..0000000000000000000000000000000000000000
--- a/components/scheduler/base/work_queue_sets.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2015 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 COMPONENTS_SCHEDULER_BASE_WORK_QUEUE_SETS_H_
-#define COMPONENTS_SCHEDULER_BASE_WORK_QUEUE_SETS_H_
-
-#include <stddef.h>
-
-#include <map>
-#include <vector>
-
-#include "base/logging.h"
-#include "base/macros.h"
-#include "base/trace_event/trace_event_argument.h"
-#include "components/scheduler/base/task_queue_impl.h"
-#include "components/scheduler/scheduler_export.h"
-
-namespace scheduler {
-namespace internal {
-class TaskQueueImpl;
-
-class SCHEDULER_EXPORT WorkQueueSets {
- public:
- WorkQueueSets(size_t num_sets, const char* name);
- ~WorkQueueSets();
-
- // O(log num queues)
- void AddQueue(WorkQueue* queue, size_t set_index);
-
- // O(log num queues)
- void RemoveQueue(WorkQueue* work_queue);
-
- // O(log num queues)
- void ChangeSetIndex(WorkQueue* queue, size_t set_index);
-
- // O(log num queues)
- void OnPushQueue(WorkQueue* work_queue);
-
- // If empty it's O(1) amortized, otherwise it's O(log num queues)
- void OnPopQueue(WorkQueue* work_queue);
-
- // O(1)
- bool GetOldestQueueInSet(size_t set_index, WorkQueue** out_work_queue) const;
-
- // O(1)
- bool IsSetEmpty(size_t set_index) const;
-
-#if DCHECK_IS_ON() || !defined(NDEBUG)
- // Note this iterates over everything in |enqueue_order_to_work_queue_maps_|.
- // It's intended for use with DCHECKS and for testing
- bool ContainsWorkQueueForTest(const WorkQueue* queue) const;
-#endif
-
- const char* name() const { return name_; }
-
- private:
- typedef std::map<EnqueueOrder, WorkQueue*> EnqueueOrderToWorkQueueMap;
- std::vector<EnqueueOrderToWorkQueueMap> enqueue_order_to_work_queue_maps_;
- const char* name_;
-
- DISALLOW_COPY_AND_ASSIGN(WorkQueueSets);
-};
-
-} // namespace internal
-} // namespace scheduler
-
-#endif // COMPONENTS_SCHEDULER_BASE_WORK_QUEUE_SETS_H_
« no previous file with comments | « components/scheduler/base/work_queue.cc ('k') | components/scheduler/base/work_queue_sets.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698