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

Side by Side Diff: components/scheduler/base/nestable_task_runner_for_test.cc

Issue 1424053002: Adds a flag to support "Virtual Time" to the blink scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/scheduler/base/nestable_task_runner_for_test.h"
6
7 #include "base/bind.h"
8 #include "base/bind_helpers.h"
9
10 namespace scheduler {
11
12 // static
13 scoped_refptr<NestableTaskRunnerForTest> NestableTaskRunnerForTest::Create(
14 scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
15 return make_scoped_refptr(new NestableTaskRunnerForTest(task_runner));
16 }
17
18 NestableTaskRunnerForTest::NestableTaskRunnerForTest(
19 scoped_refptr<base::SingleThreadTaskRunner> task_runner)
20 : task_runner_(task_runner) {}
21
22 NestableTaskRunnerForTest::~NestableTaskRunnerForTest() {}
23
24 bool NestableTaskRunnerForTest::PostDelayedTask(
25 const tracked_objects::Location& from_here,
26 const base::Closure& task,
27 base::TimeDelta delay) {
28 return task_runner_->PostDelayedTask(from_here, task, delay);
29 }
30
31 bool NestableTaskRunnerForTest::PostNonNestableDelayedTask(
32 const tracked_objects::Location& from_here,
33 const base::Closure& task,
34 base::TimeDelta delay) {
35 return task_runner_->PostNonNestableDelayedTask(from_here, task, delay);
36 }
37
38 bool NestableTaskRunnerForTest::RunsTasksOnCurrentThread() const {
39 return task_runner_->RunsTasksOnCurrentThread();
40 }
41
42 bool NestableTaskRunnerForTest::IsNested() const {
43 return false;
44 }
45
46 } // namespace scheduler
OLDNEW
« no previous file with comments | « components/scheduler/base/nestable_task_runner_for_test.h ('k') | components/scheduler/base/task_queue_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698