[TaskScheduler] Introduce TrackedRef and replace SchedulerWorkerPoolImpl::live_workers_count with it

See tracked_ref.h for details.

This CL is intended to mostly be a no-op. The important bit is introducing TrackedRefs
so they can be used in https://chromium-review.googlesource.com/c/chromium/src/+/1013597
to fix crbug.com/827615 once and for all

Also clean up |join_for_testing_returned_| which only needs to be a bool in DCHECK_IS_ON() builds.

R=fdoray@chromium.org

Bug: 827615
Change-Id: Ia7fe988260dbc91164f71816d19a2ac5556271b5
Reviewed-on: https://chromium-review.googlesource.com/1013250
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552104}

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