summaryrefslogtreecommitdiffstats
path: root/dom/quota/QuotaManagerService.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-07-28 15:46:41 +0000
committerMoonchild <moonchild@palemoon.org>2020-07-28 15:46:41 +0000
commitad453f0b28bf1ac30f889abf3ae38e95315295b0 (patch)
treec33683c6009278b1c6e9f049465fb2e4eda890d4 /dom/quota/QuotaManagerService.cpp
parentd332d4a60ddc0c82d72706ecb6084af6fed359cc (diff)
downloadUXP-ad453f0b28bf1ac30f889abf3ae38e95315295b0.tar
UXP-ad453f0b28bf1ac30f889abf3ae38e95315295b0.tar.gz
UXP-ad453f0b28bf1ac30f889abf3ae38e95315295b0.tar.lz
UXP-ad453f0b28bf1ac30f889abf3ae38e95315295b0.tar.xz
UXP-ad453f0b28bf1ac30f889abf3ae38e95315295b0.zip
Issue #1391 - Remove the DOM battery API
Diffstat (limited to 'dom/quota/QuotaManagerService.cpp')
-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);