TaskScheduler: Don't use a callback to post a task from TaskTracker.

Replace the existing TaskTracker::PostTask() method (which runs a
callback when it allows a task to be posted) with a
TaskTracker::WillPostTask() method (which returns true when it allows
a task to be posted). The caller is responsible for posting the task
when the new method returns true.

BUG=553459

Review URL: https://codereview.chromium.org/1862113002

Cr-Commit-Position: refs/heads/master@{#386072}


CrOS-Libchrome-Original-Commit: 7eef862850afcd443ea44fdebeb286b2b35d4ca2
4 files changed
tree: 88288f569956fd9a2493bd3396bbe46aedbc4cab
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/