(forked from issue 889035)
chrome/browser/chromeos/power/ml/adaptive_screen_brightness_manager.cc (and any other code in Chrome that calls D-Bus services) needs to use dbus::ObjectProxy::WaitForServiceToBeAvailable to wait for powerd to be ready before making D-Bus method calls to it. Otherwise, we log spammy messages like this:
[2758:2758:0925/050136.334732:ERROR:object_proxy.cc(615)] Failed to call method: org.chromium.PowerManager.GetScreenBrightnessPercent: object_path= /org/chromium/PowerManager: org.freedesktop.DBus.Error.UnknownMethod: Method "GetScreenBrightnessPercent" with signature "" on interface "org.chromium.PowerManager" doesn't exist
Note that this message is logged automatically by //dbus.
I've done passes through Chrome in the past to try to fix all callers, but new code has been introduced since then. Cc-ing some other people to see if they have any ideas about ways we could change the API to make this less likely. In general, CallMethod() calls in c'tors and Init methods are suspicious.
Comment 1 by jiameng@chromium.org
, Sep 26Owner: pdyson@chromium.org