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

Unified Diff: cc/test/ordered_simple_task_runner.cc

Issue 2590593002: Revert of [Reland] Scheduler refactoring to virtually eliminate redundant DoWorks (Closed)
Patch Set: Created 4 years 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 | « cc/test/ordered_simple_task_runner.h ('k') | third_party/WebKit/Source/platform/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/ordered_simple_task_runner.cc
diff --git a/cc/test/ordered_simple_task_runner.cc b/cc/test/ordered_simple_task_runner.cc
index 161704fc45897fe97f643db91b94b3639b4c1936..9dc4bbcd2dacb680d586699576a632e286aab037 100644
--- a/cc/test/ordered_simple_task_runner.cc
+++ b/cc/test/ordered_simple_task_runner.cc
@@ -137,8 +137,6 @@
}
base::TimeTicks OrderedSimpleTaskRunner::NextTaskTime() {
- RemoveCancelledTasks();
-
if (pending_tasks_.size() <= 0) {
return AbsoluteMaxNow();
}
@@ -148,7 +146,6 @@
base::TimeDelta OrderedSimpleTaskRunner::DelayToNextTaskTime() {
DCHECK(thread_checker_.CalledOnValidThread());
- RemoveCancelledTasks();
if (pending_tasks_.size() <= 0) {
return AbsoluteMaxNow() - base::TimeTicks();
@@ -201,11 +198,6 @@
}
while (pending_tasks_.size() > 0) {
- // Skip canceled tasks.
- if (pending_tasks_.begin()->task.IsCancelled()) {
- pending_tasks_.erase(pending_tasks_.begin());
- continue;
- }
// Check if we should continue to run pending tasks.
bool condition_success = true;
for (std::vector<base::Callback<bool(void)>>::iterator it =
@@ -352,15 +344,4 @@
return true;
}
-void OrderedSimpleTaskRunner::RemoveCancelledTasks() {
- std::set<TestOrderablePendingTask>::iterator it = pending_tasks_.begin();
- while (it != pending_tasks_.end()) {
- if (it->task.IsCancelled()) {
- it = pending_tasks_.erase(it);
- } else {
- it++;
- }
- }
-}
-
} // namespace cc
« no previous file with comments | « cc/test/ordered_simple_task_runner.h ('k') | third_party/WebKit/Source/platform/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698