Use WeakPtr to simplify the DBUS Timeout helper.

The internal Timeout wrapper for DBusTimeout was previously ref-counted
to ensure that it was still valid when HandleTimeout fires. This CL adds
a WeakPtrFactory to Timeout, allowing it to be safely deleted when the
corresponding DBusTimeout is removed, with HandleTimeout becoming a
no-op.

TEST=dbus_unittests

Change-Id: I3caffc8062dc6a30e10005395f8ed8cd447b878a
Reviewed-on: https://chromium-review.googlesource.com/566338
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: Ryo Hashimoto <hashimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485820}

CrOS-Libchrome-Original-Commit: 811f6da4defd33a51bcdd2fb394ad02061af29e1
1 file changed
tree: 06f5fa2fa5243383ffe544043ce8d965734660b5
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/