Support base::OnceCallback on base::OneShotTimer

This moves task management logic of base::internal::TimerBase to its
subclasses, so that subclasses can hold user tasks as different types
for each.
Specifically, OneShotTimer's task type is converted to OnceClosure after
this CL, and it gets supporting OnceCallback.

Bug: 850247
Change-Id: Ie017c2ed6e0fb1fe44937a497576d16e5c3dab68
Reviewed-by: Matt Menke <>
Reviewed-by: Gabriel Charette <>
Commit-Queue: Taiju Tsuiki <>
Cr-Commit-Position: refs/heads/master@{#577784}
5 files changed