| 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_proxy_impl.h" | 5 #include "base/message_loop_proxy_impl.h" |
| 6 | 6 |
| 7 #include "base/location.h" | 7 #include "base/location.h" |
| 8 #include "base/threading/thread_restrictions.h" | 8 #include "base/threading/thread_restrictions.h" |
| 9 | 9 |
| 10 namespace base { | 10 namespace base { |
| 11 | 11 |
| 12 MessageLoopProxyImpl::~MessageLoopProxyImpl() { | 12 MessageLoopProxyImpl::~MessageLoopProxyImpl() { |
| 13 } | 13 } |
| 14 | 14 |
| 15 // This function will be removed later in the fixing of CR Bug #108171. | |
| 16 bool MessageLoopProxyImpl::PostDelayedTask( | |
| 17 const tracked_objects::Location& from_here, | |
| 18 const base::Closure& task, | |
| 19 int64 delay_ms) { | |
| 20 return PostDelayedTask( | |
| 21 from_here, task, base::TimeDelta::FromMilliseconds(delay_ms)); | |
| 22 } | |
| 23 | |
| 24 // This function will be removed later in the fixing of CR Bug #108171. | |
| 25 bool MessageLoopProxyImpl::PostNonNestableDelayedTask( | |
| 26 const tracked_objects::Location& from_here, | |
| 27 const base::Closure& task, | |
| 28 int64 delay_ms) { | |
| 29 return PostNonNestableDelayedTask( | |
| 30 from_here, task, base::TimeDelta::FromMilliseconds(delay_ms)); | |
| 31 } | |
| 32 | |
| 33 bool MessageLoopProxyImpl::PostDelayedTask( | 15 bool MessageLoopProxyImpl::PostDelayedTask( |
| 34 const tracked_objects::Location& from_here, | 16 const tracked_objects::Location& from_here, |
| 35 const base::Closure& task, | 17 const base::Closure& task, |
| 36 base::TimeDelta delay) { | 18 base::TimeDelta delay) { |
| 37 return PostTaskHelper(from_here, task, delay, true); | 19 return PostTaskHelper(from_here, task, delay, true); |
| 38 } | 20 } |
| 39 | 21 |
| 40 bool MessageLoopProxyImpl::PostNonNestableDelayedTask( | 22 bool MessageLoopProxyImpl::PostNonNestableDelayedTask( |
| 41 const tracked_objects::Location& from_here, | 23 const tracked_objects::Location& from_here, |
| 42 const base::Closure& task, | 24 const base::Closure& task, |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 83 |
| 102 scoped_refptr<MessageLoopProxy> | 84 scoped_refptr<MessageLoopProxy> |
| 103 MessageLoopProxy::current() { | 85 MessageLoopProxy::current() { |
| 104 MessageLoop* cur_loop = MessageLoop::current(); | 86 MessageLoop* cur_loop = MessageLoop::current(); |
| 105 if (!cur_loop) | 87 if (!cur_loop) |
| 106 return NULL; | 88 return NULL; |
| 107 return cur_loop->message_loop_proxy(); | 89 return cur_loop->message_loop_proxy(); |
| 108 } | 90 } |
| 109 | 91 |
| 110 } // namespace base | 92 } // namespace base |
| OLD | NEW |