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