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

Unified Diff: components/scheduler/base/task_queue.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/task_queue.h ('k') | components/scheduler/base/task_queue_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/scheduler/base/task_queue.cc
diff --git a/components/scheduler/base/task_queue.cc b/components/scheduler/base/task_queue.cc
index 857860557c80cd89c7c8946369cb162e425c34b6..24aadb75d78e2f1111955cba76468cd94d756514 100644
--- a/components/scheduler/base/task_queue.cc
+++ b/components/scheduler/base/task_queue.cc
@@ -6,8 +6,9 @@
namespace scheduler {
-bool TaskQueue::IsQueueEmpty() const {
- return GetQueueState() == QueueState::EMPTY;
+bool TaskQueue::HasPendingImmediateTask() const {
+ QueueState state = GetQueueState();
+ return state == QueueState::NEEDS_PUMPING || state == QueueState::HAS_WORK;
}
} // namespace scheduler
« no previous file with comments | « components/scheduler/base/task_queue.h ('k') | components/scheduler/base/task_queue_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698