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

Side by Side Diff: base/message_loop/message_loop_task_runner.cc

Issue 2823103003: Introduce TaskRunner::RunsTasksInCurrentSequence() (Closed)
Patch Set: rebase Created 3 years, 7 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
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/message_loop/message_loop_task_runner.h" 5 #include "base/message_loop/message_loop_task_runner.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 24 matching lines...) Expand all
35 35
36 bool MessageLoopTaskRunner::PostNonNestableDelayedTask( 36 bool MessageLoopTaskRunner::PostNonNestableDelayedTask(
37 const tracked_objects::Location& from_here, 37 const tracked_objects::Location& from_here,
38 OnceClosure task, 38 OnceClosure task,
39 base::TimeDelta delay) { 39 base::TimeDelta delay) {
40 DCHECK(!task.is_null()) << from_here.ToString(); 40 DCHECK(!task.is_null()) << from_here.ToString();
41 return incoming_queue_->AddToIncomingQueue(from_here, std::move(task), delay, 41 return incoming_queue_->AddToIncomingQueue(from_here, std::move(task), delay,
42 false); 42 false);
43 } 43 }
44 44
45 bool MessageLoopTaskRunner::RunsTasksOnCurrentThread() const { 45 bool MessageLoopTaskRunner::RunsTasksInCurrentSequence() const {
46 AutoLock lock(valid_thread_id_lock_); 46 AutoLock lock(valid_thread_id_lock_);
47 return valid_thread_id_ == PlatformThread::CurrentId(); 47 return valid_thread_id_ == PlatformThread::CurrentId();
48 } 48 }
49 49
50 MessageLoopTaskRunner::~MessageLoopTaskRunner() { 50 MessageLoopTaskRunner::~MessageLoopTaskRunner() {
51 } 51 }
52 52
53 } // namespace internal 53 } // namespace internal
54 54
55 } // namespace base 55 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698