LeOSium_webview/LeOS/patches/disable-battery-status-upda...

47 lines
1.6 KiB
Diff
Raw Permalink Normal View History

2023-11-18 11:46:19 +01:00
From: Joachim Bauch <jojo@struktur.de>
Date: Tue, 4 Aug 2015 15:15:53 +0200
Subject: disable battery status updater
The W3C Battery Status API[1] has quite a laughable statement:
"The information disclosed has minimal impact on privacy or
fingerprinting, and therefore is exposed without permission grants".
Along comes a paper "The leaking battery, A privacy analysis of the
HTML5 Battery Status API."
Clean up after the W3C and disable the battery status updater which
could be used to identity users[2].
[1] http://www.w3.org/TR/battery-status/
[2] https://eprint.iacr.org/2015/616.pdf
References: https://github.com/iridium-browser/iridium-browser/issues/40
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
services/device/battery/battery_status_service.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/services/device/battery/battery_status_service.cc b/services/device/battery/battery_status_service.cc
--- a/services/device/battery/battery_status_service.cc
+++ b/services/device/battery/battery_status_service.cc
@@ -43,6 +43,7 @@ base::CallbackListSubscription BatteryStatusService::AddCallback(
if (!battery_fetcher_)
battery_fetcher_ = BatteryStatusManager::Create(update_callback_);
+#if 0
if (callback_list_.empty()) {
bool success = battery_fetcher_->StartListeningBatteryChange();
// On failure pass the default values back.
@@ -54,6 +55,7 @@ base::CallbackListSubscription BatteryStatusService::AddCallback(
// Send recent status to the new callback if already available.
callback.Run(status_);
}
+#endif
return callback_list_.Add(callback);
}
--
2.25.1