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 | ed150971884f2ebd4fc45a28fc505e84f8cfc24b (patch) | |
tree | dd008594a9e130c8f2f916de398915cd7e54ad90 /dom/quota | |
parent | 6fb8128feefb605a695f8d474e04dff394fa88fe (diff) | |
download | uxp-ed150971884f2ebd4fc45a28fc505e84f8cfc24b.tar.gz |
Issue mcp-graveyard/UXP#1391 - Remove the DOM battery API
Diffstat (limited to 'dom/quota')
-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); |