Removes TaskQueueBase::Current call in repeating task.

Bug: webrtc:10365
Change-Id: Ie9fd1a28e96680b8b4b6ef8339c3eaba21ef9e18
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126781
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27092}
This commit is contained in:
Sebastian Jansson 2019-03-11 17:28:03 +01:00
parent cda86dd483
commit 793597b7c9

View File

@ -101,10 +101,6 @@ class RepeatingTaskHandle {
task_queue->PostTask(std::move(repeating_task));
return RepeatingTaskHandle(repeating_task_ptr);
}
template <class Closure>
static RepeatingTaskHandle Start(Closure&& closure) {
return Start(TaskQueueBase::Current(), std::forward<Closure>(closure));
}
// DelayedStart is equivalent to Start except that the first invocation of the
// closure will be delayed by the given amount.
@ -119,12 +115,6 @@ class RepeatingTaskHandle {
task_queue->PostDelayedTask(std::move(repeating_task), first_delay.ms());
return RepeatingTaskHandle(repeating_task_ptr);
}
template <class Closure>
static RepeatingTaskHandle DelayedStart(TimeDelta first_delay,
Closure&& closure) {
return DelayedStart(TaskQueueBase::Current(), first_delay,
std::forward<Closure>(closure));
}
// Stops future invocations of the repeating task closure. Can only be called
// from the TaskQueue where the task is running. The closure is guaranteed to