summaryrefslogtreecommitdiffstats
path: root/chromium/base/power_monitor
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-02-13 16:23:34 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-02-14 10:37:21 +0000
commit38a9a29f4f9436cace7f0e7abf9c586057df8a4e (patch)
treec4e8c458dc595bc0ddb435708fa2229edfd00bd4 /chromium/base/power_monitor
parente684a3455bcc29a6e3e66a004e352dea4e1141e7 (diff)
BASELINE: Update Chromium to 73.0.3683.37
Change-Id: I08c9af2948b645f671e5d933aca1f7a90ea372f2 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/base/power_monitor')
-rw-r--r--chromium/base/power_monitor/power_monitor_device_source_android.cc4
-rw-r--r--chromium/base/power_monitor/power_monitor_device_source_mac.mm9
2 files changed, 7 insertions, 6 deletions
diff --git a/chromium/base/power_monitor/power_monitor_device_source_android.cc b/chromium/base/power_monitor/power_monitor_device_source_android.cc
index 7688513501d..a9898aac3bf 100644
--- a/chromium/base/power_monitor/power_monitor_device_source_android.cc
+++ b/chromium/base/power_monitor/power_monitor_device_source_android.cc
@@ -19,9 +19,7 @@ namespace android {
// Native implementation of PowerMonitor.java. Note: This will be invoked by
// PowerMonitor.java shortly after startup to set the correct initial value for
// "is on battery power."
-void JNI_PowerMonitor_OnBatteryChargingChanged(
- JNIEnv* env,
- const JavaParamRef<jclass>& clazz) {
+void JNI_PowerMonitor_OnBatteryChargingChanged(JNIEnv* env) {
ProcessPowerEventHelper(PowerMonitorSource::POWER_STATE_EVENT);
}
diff --git a/chromium/base/power_monitor/power_monitor_device_source_mac.mm b/chromium/base/power_monitor/power_monitor_device_source_mac.mm
index be2b8b94743..a25cf0e57f3 100644
--- a/chromium/base/power_monitor/power_monitor_device_source_mac.mm
+++ b/chromium/base/power_monitor/power_monitor_device_source_mac.mm
@@ -111,12 +111,15 @@ void PowerMonitorDeviceSource::PlatformInit() {
return;
// Add the notification port and battery monitor to the application runloop
- CFRunLoopAddSource(CFRunLoopGetCurrent(), IONotificationPortGetRunLoopSource(
- g_notification_port_ref),
- kCFRunLoopCommonModes);
+ CFRunLoopAddSource(
+ CFRunLoopGetCurrent(),
+ IONotificationPortGetRunLoopSource(g_notification_port_ref),
+ kCFRunLoopCommonModes);
base::ScopedCFTypeRef<CFRunLoopSourceRef> battery_status_ref(
IOPSNotificationCreateRunLoopSource(BatteryEventCallback, nullptr));
+ DCHECK(battery_status_ref); // crbug.com/897557
+
CFRunLoopAddSource(CFRunLoopGetCurrent(), battery_status_ref,
kCFRunLoopDefaultMode);
g_battery_status_ref = battery_status_ref.release();