Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Issue 2379133002: Merge M54: "Implement base::PowerMonitor::IsOnBatteryPower() for OSX." (Closed)

Created:
4 years, 2 months ago by DaleCurtis
Modified:
4 years, 2 months ago
Reviewers:
CC:
chromium-reviews
Target Ref:
refs/pending/branch-heads/2840
Project:
chromium
Visibility:
Public.

Description

Merge 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -62 lines) Patch
M base/BUILD.gn View 8 chunks +12 lines, -12 lines 0 comments Download
M base/power_monitor/power_monitor_device_source.h View 2 chunks +0 lines, -18 lines 0 comments Download
M base/power_monitor/power_monitor_device_source.cc View 2 chunks +8 lines, -17 lines 0 comments Download
M base/power_monitor/power_monitor_device_source_android.cc View 1 chunk +3 lines, -1 line 0 comments Download
M base/power_monitor/power_monitor_device_source_ios.mm View 1 chunk +5 lines, -0 lines 0 comments Download
M base/power_monitor/power_monitor_device_source_mac.mm View 4 chunks +53 lines, -5 lines 0 comments Download
M base/power_monitor/power_monitor_source.h View 1 chunk +7 lines, -2 lines 0 comments Download
M base/power_monitor/power_monitor_source.cc View 2 chunks +10 lines, -7 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
DaleCurtis
4 years, 2 months ago (2016-09-29 22:07:12 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
dbfd5a68f50540765e6d485322e549a9575386bb.

Powered by Google App Engine
This is Rietveld 408576698