summaryrefslogtreecommitdiffstats
path: root/dom/quota
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-07-28 15:46:41 +0000
committerMoonchild <moonchild@palemoon.org>2020-07-28 15:47:07 +0000
commit08fb2f306856948ecc71974dd98c0a6d78df25aa (patch)
treedd008594a9e130c8f2f916de398915cd7e54ad90 /dom/quota
parent15ed0691f6fe6e558c7e733af9fca0586c4d554b (diff)
downloadUXP-08fb2f306856948ecc71974dd98c0a6d78df25aa.tar
UXP-08fb2f306856948ecc71974dd98c0a6d78df25aa.tar.gz
UXP-08fb2f306856948ecc71974dd98c0a6d78df25aa.tar.lz
UXP-08fb2f306856948ecc71974dd98c0a6d78df25aa.tar.xz
UXP-08fb2f306856948ecc71974dd98c0a6d78df25aa.zip
Issue #1391 - Remove the DOM battery API
Diffstat (limited to 'dom/quota')
-rw-r--r--dom/quota/QuotaManagerService.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/dom/quota/QuotaManagerService.cpp b/dom/quota/QuotaManagerService.cpp
index bd811dc9b..22b5d17b1 100644
--- a/dom/quota/QuotaManagerService.cpp
+++ b/dom/quota/QuotaManagerService.cpp
@@ -432,30 +432,6 @@ QuotaManagerService::PerformIdleMaintenance()
MOZ_ASSERT(XRE_IsParentProcess());
MOZ_ASSERT(NS_IsMainThread());
- // If we're running on battery power then skip all idle maintenance since we
- // would otherwise be doing lots of disk I/O.
- BatteryInformation batteryInfo;
-
-#ifdef MOZ_WIDGET_ANDROID
- // Android XPCShell doesn't load the AndroidBridge that is needed to make
- // GetCurrentBatteryInformation work...
- if (!QuotaManager::IsRunningXPCShellTests())
-#endif
- {
- GetCurrentBatteryInformation(&batteryInfo);
- }
-
- // If we're running XPCShell because we always want to be able to test this
- // code so pretend that we're always charging.
- if (QuotaManager::IsRunningXPCShellTests()) {
- batteryInfo.level() = 100;
- batteryInfo.charging() = true;
- }
-
- if (NS_WARN_IF(!batteryInfo.charging())) {
- return;
- }
-
if (QuotaManager::IsRunningXPCShellTests()) {
// We don't want user activity to impact this code if we're running tests.
Unused << Observe(nullptr, OBSERVER_TOPIC_IDLE, nullptr);