Index: src/cancelable-task.cc |
diff --git a/src/cancelable-task.cc b/src/cancelable-task.cc |
index 852f4ffda806bbc2266cd61ee64de2a5f421f419..defbb44775a8c1f64b8eedac62ea21b8376eacd1 100644 |
--- a/src/cancelable-task.cc |
+++ b/src/cancelable-task.cc |
@@ -26,20 +26,14 @@ |
} |
} |
-CancelableTaskManager::CancelableTaskManager() |
- : task_id_counter_(0), canceled_(false) {} |
+CancelableTaskManager::CancelableTaskManager() : task_id_counter_(0) {} |
uint32_t CancelableTaskManager::Register(Cancelable* task) { |
base::LockGuard<base::Mutex> guard(&mutex_); |
uint32_t id = ++task_id_counter_; |
// The loop below is just used when task_id_counter_ overflows. |
while (cancelable_tasks_.count(id) > 0) ++id; |
- if (canceled_) { |
- bool successfully_canceled_task = task->Cancel(); |
- CHECK(successfully_canceled_task); |
- } else { |
- cancelable_tasks_[id] = task; |
- } |
+ cancelable_tasks_[id] = task; |
return id; |
} |
@@ -75,7 +69,6 @@ |
// of canceling we wait for the background tasks that have already been |
// started. |
base::LockGuard<base::Mutex> guard(&mutex_); |
- canceled_ = true; |
// Cancelable tasks could be running or could potentially register new |
// tasks, requiring a loop here. |