Index: third_party/WebKit/Source/platform/scheduler/base/work_queue.h |
diff --git a/third_party/WebKit/Source/platform/scheduler/base/work_queue.h b/third_party/WebKit/Source/platform/scheduler/base/work_queue.h |
index ae1f21415f09e46bf87a70509ee2a4a31ccb1320..f6e520608d1855941e0b794b58fff0060ded7122 100644 |
--- a/third_party/WebKit/Source/platform/scheduler/base/work_queue.h |
+++ b/third_party/WebKit/Source/platform/scheduler/base/work_queue.h |
@@ -30,9 +30,7 @@ class WorkQueueSets; |
// throttling mechanisms. |
class BLINK_PLATFORM_EXPORT WorkQueue { |
public: |
- WorkQueue(TaskQueueImpl* task_queue, |
- const char* name, |
- TaskQueueImpl::Task::ComparatorFn queue_comparator); |
+ WorkQueue(TaskQueueImpl* task_queue, const char* name); |
~WorkQueue(); |
// Associates this work queue with the given work queue sets. This must be |
@@ -56,7 +54,7 @@ class BLINK_PLATFORM_EXPORT WorkQueue { |
// method ignores any fences. |
const TaskQueueImpl::Task* GetFrontTask() const; |
- // Returns the first task in this queue or null if the queue is empty. This |
+ // Returns the last task in this queue or null if the queue is empty. This |
// method ignores any fences. |
const TaskQueueImpl::Task* GetBackTask() const; |
@@ -64,20 +62,10 @@ class BLINK_PLATFORM_EXPORT WorkQueue { |
// informs the WorkQueueSets if the head changed. |
void Push(TaskQueueImpl::Task task); |
- // Removes a cancelled task from the |work_queue_|. Note |key| isn't required |
- // to be the original task posted, it can be a fake key constructed by |
- // TaskQueueImpl::Task::CreateFakeTaskFromHandle. |
- bool CancelTask(const TaskQueueImpl::Task& key); |
- |
- // Returns true if |work_queue_| contains a task matching |key|. Note |key| |
- // isn't required to be the original task posted, it can be a fake key |
- // constructed by TaskQueueImpl::Task::CreateFakeTaskFromHandle. |
- bool IsTaskPending(const TaskQueueImpl::Task& key) const; |
- |
// Swap the |work_queue_| with |incoming_queue| and if a fence hasn't been |
// reached it informs the WorkQueueSets if the head changed. Assumes |
// |task_queue_->any_thread_lock_| is locked. |
- void SwapLocked(TaskQueueImpl::ComparatorQueue& incoming_queue); |
+ void SwapLocked(std::queue<TaskQueueImpl::Task>& incoming_queue); |
size_t Size() const { return work_queue_.size(); } |
@@ -120,7 +108,7 @@ class BLINK_PLATFORM_EXPORT WorkQueue { |
bool BlockedByFence() const; |
private: |
- TaskQueueImpl::ComparatorQueue work_queue_; |
+ std::queue<TaskQueueImpl::Task> work_queue_; |
WorkQueueSets* work_queue_sets_; // NOT OWNED. |
TaskQueueImpl* task_queue_; // NOT OWNED. |
size_t work_queue_set_index_; |