From: Joachim Bauch <jojo@struktur.de>
Date: Tue, 4 Aug 2015 15:15:53 +0200
Subject: battery_status_service: disable more privacy nightmares

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
---
 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
@@ -41,6 +41,7 @@ BatteryStatusService::AddCallback(const BatteryUpdateCallback& callback) {
   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.
@@ -52,6 +53,7 @@ BatteryStatusService::AddCallback(const BatteryUpdateCallback& callback) {
     // Send recent status to the new callback if already available.
     callback.Run(status_);
   }
+#endif
 
   return callback_list_.Add(callback);
 }
-- 
2.11.0

