| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |