diff options
author | Moonchild <moonchild@palemoon.org> | 2020-07-28 15:46:41 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-07-28 15:47:07 +0000 |
commit | 08fb2f306856948ecc71974dd98c0a6d78df25aa (patch) | |
tree | dd008594a9e130c8f2f916de398915cd7e54ad90 /dom/quota/QuotaManagerService.cpp | |
parent | 15ed0691f6fe6e558c7e733af9fca0586c4d554b (diff) | |
download | uxp-08fb2f306856948ecc71974dd98c0a6d78df25aa.tar.gz |
Issue #1391 - Remove the DOM battery API
Diffstat (limited to 'dom/quota/QuotaManagerService.cpp')
-rw-r--r-- | dom/quota/QuotaManagerService.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/dom/quota/QuotaManagerService.cpp b/dom/quota/QuotaManagerService.cpp index bd811dc9b3..22b5d17b16 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); |