Index: base/task_queue.cc |
diff --git a/base/task_queue.cc b/base/task_queue.cc |
index e3c196b533b66f3abec319305abe9e8a5fc253ae..fdff8ac92638796e3cad2a10a95ba2c5bfaafcc7 100644 |
--- a/base/task_queue.cc |
+++ b/base/task_queue.cc |
@@ -15,6 +15,22 @@ TaskQueue::~TaskQueue() { |
STLDeleteElements(&queue_); |
} |
+void TaskQueue::Push(Task* task) { |
+ DCHECK(task); |
+ |
+ // Add the task to the back of the queue. |
+ queue_.push_back(task); |
+} |
+ |
+void TaskQueue::Clear() { |
+ // Delete all the elements in the queue and clear the dead pointers. |
+ STLDeleteElements(&queue_); |
+} |
+ |
+bool TaskQueue::IsEmpty() const { |
+ return queue_.empty(); |
+} |
+ |
void TaskQueue::Run() { |
// Nothing to run if our queue is empty. |
if (queue_.empty()) |
@@ -31,19 +47,3 @@ void TaskQueue::Run() { |
delete (*task); |
} |
} |
- |
-void TaskQueue::Push(Task* task) { |
- DCHECK(task); |
- |
- // Add the task to the back of the queue. |
- queue_.push_back(task); |
-} |
- |
-void TaskQueue::Clear() { |
- // Delete all the elements in the queue and clear the dead pointers. |
- STLDeleteElements(&queue_); |
-} |
- |
-bool TaskQueue::IsEmpty() const { |
- return queue_.empty(); |
-} |