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

Side by Side Diff: base/test/null_task_runner.cc

Issue 2122543002: Replace Closure in TaskRunner::PostTask with OneShotCallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@07_oneshot
Patch Set: fix Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « base/test/null_task_runner.h ('k') | base/test/test_mock_time_task_runner.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/test/null_task_runner.h" 5 #include "base/test/null_task_runner.h"
6 6
7 #include "base/callback.h"
8
7 namespace base { 9 namespace base {
8 10
9 NullTaskRunner::NullTaskRunner() {} 11 NullTaskRunner::NullTaskRunner() {}
10 12
11 NullTaskRunner::~NullTaskRunner() {} 13 NullTaskRunner::~NullTaskRunner() {}
12 14
13 bool NullTaskRunner::PostDelayedTask( 15 bool NullTaskRunner::PostDelayedTask(const tracked_objects::Location& from_here,
14 const tracked_objects::Location& from_here, 16 base::OnceClosure task,
15 const base::Closure& task, 17 base::TimeDelta delay) {
16 base::TimeDelta delay) {
17 return false; 18 return false;
18 } 19 }
19 20
20 bool NullTaskRunner::PostNonNestableDelayedTask( 21 bool NullTaskRunner::PostNonNestableDelayedTask(
21 const tracked_objects::Location& from_here, 22 const tracked_objects::Location& from_here,
22 const base::Closure& task, 23 base::OnceClosure task,
23 base::TimeDelta delay) { 24 base::TimeDelta delay) {
24 return false; 25 return false;
25 } 26 }
26 27
27 bool NullTaskRunner::RunsTasksOnCurrentThread() const { 28 bool NullTaskRunner::RunsTasksOnCurrentThread() const {
28 return true; 29 return true;
29 } 30 }
30 31
31 } // namespace base 32 } // namespace base
OLDNEW
« no previous file with comments | « base/test/null_task_runner.h ('k') | base/test/test_mock_time_task_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698