Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Unified Diff: components/scheduler/child/idle_helper.cc

Issue 1441073006: Move throttling of background timers into the renderer scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Last few changes Sami requested Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/scheduler/base/virtual_time_domain.cc ('k') | components/scheduler/child/scheduler_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/scheduler/child/idle_helper.cc
diff --git a/components/scheduler/child/idle_helper.cc b/components/scheduler/child/idle_helper.cc
index f007baec665c1234173c7ebc2a37f773a9709017..b0fb06a8bd400d74ad0cd08ca24e135869b8d243 100644
--- a/components/scheduler/child/idle_helper.cc
+++ b/components/scheduler/child/idle_helper.cc
@@ -93,7 +93,7 @@ IdleHelper::IdlePeriodState IdleHelper::ComputeNewLongIdlePeriodState(
if (long_idle_period_duration >=
base::TimeDelta::FromMilliseconds(kMinimumIdlePeriodDurationMillis)) {
*next_long_idle_period_delay_out = long_idle_period_duration;
- if (idle_queue_->IsQueueEmpty()) {
+ if (!idle_queue_->HasPendingImmediateTask()) {
return IdlePeriodState::IN_LONG_IDLE_PERIOD_PAUSED;
} else if (long_idle_period_duration == max_long_idle_period_duration) {
return IdlePeriodState::IN_LONG_IDLE_PERIOD_WITH_MAX_DEADLINE;
« no previous file with comments | « components/scheduler/base/virtual_time_domain.cc ('k') | components/scheduler/child/scheduler_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698