diff options
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); |