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

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

Issue 1461143003: Revert of Adds TimeDomains to the TaskQueueManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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..84f61712e0baf52782ee53f443facbef2200fa4d 100644
--- a/components/scheduler/child/idle_helper.cc
+++ b/components/scheduler/child/idle_helper.cc
@@ -7,7 +7,6 @@
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/trace_event_argument.h"
-#include "components/scheduler/base/real_time_domain.h"
#include "components/scheduler/base/task_queue.h"
#include "components/scheduler/base/task_queue_manager.h"
#include "components/scheduler/child/scheduler_helper.h"
@@ -77,17 +76,17 @@
return IdlePeriodState::NOT_IN_IDLE_PERIOD;
}
- base::TimeTicks next_pending_delayed_task;
+ base::TimeTicks next_pending_delayed_task =
+ helper_->NextPendingDelayedTaskRunTime();
base::TimeDelta max_long_idle_period_duration =
base::TimeDelta::FromMilliseconds(kMaximumIdlePeriodMillis);
base::TimeDelta long_idle_period_duration;
- if (helper_->real_time_domain()->NextScheduledRunTime(
- &next_pending_delayed_task)) {
+ if (next_pending_delayed_task.is_null()) {
+ long_idle_period_duration = max_long_idle_period_duration;
+ } else {
// Limit the idle period duration to be before the next pending task.
long_idle_period_duration = std::min(next_pending_delayed_task - now,
max_long_idle_period_duration);
- } else {
- long_idle_period_duration = max_long_idle_period_duration;
}
if (long_idle_period_duration >=
« no previous file with comments | « components/scheduler/base/virtual_time_domain.cc ('k') | components/scheduler/child/idle_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698