fix: power observer dbus crash (#15030)

* fix: check dbus response for nullptr before using

* chore: use BindOnce for ProxyObject::CallMethod cb

* chore: comment out name of unused argument

* fix: re-enable and fix linux power monitor tests

* fix: change tyop from code comments

* refactor: don't keep unnecessary dbus pointer

* chore: remove the 'TODO: fix this' spec comment
This commit is contained in:
Charles Kerr 2018-10-09 00:32:19 -05:00 committed by GitHub
parent 7df51eef3c
commit 05f4860889
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 41 additions and 39 deletions

View file

@ -40,7 +40,6 @@ class PowerObserverLinux : public base::PowerObserver {
base::Callback<bool()> should_shutdown_;
scoped_refptr<dbus::Bus> bus_;
scoped_refptr<dbus::ObjectProxy> logind_;
std::string lock_owner_name_;
base::ScopedFD sleep_lock_;