| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/common/stl_util-inl.h" | 5 #include "chrome/common/task_queue.h" |
| 6 | 6 |
| 7 #include "chrome/common/task_queue.h" | 7 #include "base/stl_util-inl.h" |
| 8 | 8 |
| 9 TaskQueue::TaskQueue() { | 9 TaskQueue::TaskQueue() { |
| 10 } | 10 } |
| 11 | 11 |
| 12 TaskQueue::~TaskQueue() { | 12 TaskQueue::~TaskQueue() { |
| 13 // We own all the pointes in |queue_|. It is our job to delete them. | 13 // We own all the pointes in |queue_|. It is our job to delete them. |
| 14 STLDeleteElements(&queue_); | 14 STLDeleteElements(&queue_); |
| 15 } | 15 } |
| 16 | 16 |
| 17 void TaskQueue::Run() { | 17 void TaskQueue::Run() { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 37 } | 37 } |
| 38 | 38 |
| 39 void TaskQueue::Clear() { | 39 void TaskQueue::Clear() { |
| 40 // Delete all the elements in the queue and clear the dead pointers. | 40 // Delete all the elements in the queue and clear the dead pointers. |
| 41 STLDeleteElements(&queue_); | 41 STLDeleteElements(&queue_); |
| 42 } | 42 } |
| 43 | 43 |
| 44 bool TaskQueue::Empty() const { | 44 bool TaskQueue::Empty() const { |
| 45 return queue_.empty(); | 45 return queue_.empty(); |
| 46 } | 46 } |
| OLD | NEW |