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 |
15 bool MessageLoopProxyImpl::PostDelayedTask( | 33 bool MessageLoopProxyImpl::PostDelayedTask( |
16 const tracked_objects::Location& from_here, | 34 const tracked_objects::Location& from_here, |
17 const base::Closure& task, | 35 const base::Closure& task, |
18 base::TimeDelta delay) { | 36 base::TimeDelta delay) { |
19 return PostTaskHelper(from_here, task, delay, true); | 37 return PostTaskHelper(from_here, task, delay, true); |
20 } | 38 } |
21 | 39 |
22 bool MessageLoopProxyImpl::PostNonNestableDelayedTask( | 40 bool MessageLoopProxyImpl::PostNonNestableDelayedTask( |
23 const tracked_objects::Location& from_here, | 41 const tracked_objects::Location& from_here, |
24 const base::Closure& task, | 42 const base::Closure& task, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 101 |
84 scoped_refptr<MessageLoopProxy> | 102 scoped_refptr<MessageLoopProxy> |
85 MessageLoopProxy::current() { | 103 MessageLoopProxy::current() { |
86 MessageLoop* cur_loop = MessageLoop::current(); | 104 MessageLoop* cur_loop = MessageLoop::current(); |
87 if (!cur_loop) | 105 if (!cur_loop) |
88 return NULL; | 106 return NULL; |
89 return cur_loop->message_loop_proxy(); | 107 return cur_loop->message_loop_proxy(); |
90 } | 108 } |
91 | 109 |
92 } // namespace base | 110 } // namespace base |
OLD | NEW |