Chromium Code Reviews
DescriptionMerge M54: "Implement base::PowerMonitor::IsOnBatteryPower() for OSX."
For whatever reason this was never implemented; this is slimmed
down variant of the implementation in devices/battery/.
During this process I noticed the initial status for "is on
battery power" is incorrect. On Android, ChromeOS the initial
state is later supplied by Java and DBus respectively. On
Windows it was using a OneShotTimer. This replaces the Windows
implementation with a new protected setter which can be used
by the device source implementations to set the initial value
before a PowerMonitor exists.
BUG=649166
TEST=OSX properly detects battery changes. Initial state correct.
Review-Url: https://codereview.chromium.org/2351593004
Cr-Commit-Position: refs/heads/master@{#421350}
(cherry picked from commit 8621728865773df979e061a3b4ab5e6ef80a2cc2)
Committed: https://chromium.googlesource.com/chromium/src/+/dbfd5a68f50540765e6d485322e549a9575386bb
Patch Set 1 #
Messages
Total messages: 2 (1 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||