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

Unified Diff: cc/test/scheduler_test_common.cc

Issue 17362002: cc: Remove FakeThread, use SingleThreadTaskRunner in scheduling classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm-fakethread: rebase Created 7 years, 6 months 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/scheduler_test_common.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/scheduler_test_common.cc
diff --git a/cc/test/scheduler_test_common.cc b/cc/test/scheduler_test_common.cc
index 8ccf47ec1610216793a1e07822ba446f11bd1af6..c812056e12991b3f61dae99e451447f2d5370e6f 100644
--- a/cc/test/scheduler_test_common.cc
+++ b/cc/test/scheduler_test_common.cc
@@ -10,31 +10,6 @@ namespace cc {
void FakeTimeSourceClient::OnTimerTick() { tick_called_ = true; }
-FakeThread::FakeThread() { Reset(); }
-
-FakeThread::~FakeThread() {}
-
-void FakeThread::RunPendingTask() {
- ASSERT_TRUE(pending_task_);
- scoped_ptr<base::Closure> task = pending_task_.Pass();
- task->Run();
-}
-
-void FakeThread::PostTask(base::Closure cb) {
- PostDelayedTask(cb, base::TimeDelta());
-}
-
-void FakeThread::PostDelayedTask(base::Closure cb, base::TimeDelta delay) {
- if (run_pending_task_on_overwrite_ && HasPendingTask())
- RunPendingTask();
-
- ASSERT_FALSE(HasPendingTask());
- pending_task_.reset(new base::Closure(cb));
- pending_task_delay_ = delay.InMilliseconds();
-}
-
-bool FakeThread::BelongsToCurrentThread() const { return true; }
-
base::TimeTicks FakeDelayBasedTimeSource::Now() const { return now_; }
} // namespace cc
« no previous file with comments | « cc/test/scheduler_test_common.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698