| Index: chrome/browser/chromeos/drive/job_queue.cc
|
| diff --git a/chrome/browser/chromeos/drive/job_queue.cc b/chrome/browser/chromeos/drive/job_queue.cc
|
| index 40a9ed60b8d391e0f3ac50e093ab251969cd3441..499312d0f0c97a8e3b66a1253883402131b52134 100644
|
| --- a/chrome/browser/chromeos/drive/job_queue.cc
|
| +++ b/chrome/browser/chromeos/drive/job_queue.cc
|
| @@ -4,6 +4,8 @@
|
|
|
| #include "chrome/browser/chromeos/drive/job_queue.h"
|
|
|
| +#include <algorithm>
|
| +
|
| #include "base/logging.h"
|
| #include "base/strings/stringprintf.h"
|
|
|
| @@ -64,4 +66,15 @@ size_t JobQueue::GetNumberOfJobs() const {
|
| return count;
|
| }
|
|
|
| +void JobQueue::Remove(JobID id) {
|
| + for (size_t i = 0; i < queue_.size(); ++i) {
|
| + std::deque<JobID>::iterator iter =
|
| + std::find(queue_[i].begin(), queue_[i].end(), id);
|
| + if (iter != queue_[i].end()) {
|
| + queue_[i].erase(iter);
|
| + break;
|
| + }
|
| + }
|
| +}
|
| +
|
| } // namespace drive
|
|
|