OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/threading/post_task_and_reply_impl.h" | 5 #include "base/threading/post_task_and_reply_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
11 | 11 |
12 namespace base { | 12 namespace base { |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 // This relay class remembers the MessageLoop that it was created on, and | 16 // This relay class remembers the MessageLoop that it was created on, and |
17 // ensures that both the |task| and |reply| Closures are deleted on this same | 17 // ensures that both the |task| and |reply| Closures are deleted on this same |
18 // thread. Also, |task| is guaranteed to be deleted before |reply| is run or | 18 // thread. Also, |task| is guaranteed to be deleted before |reply| is run or |
19 // deleted. | 19 // deleted. |
20 // | 20 // |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 delete relay; | 85 delete relay; |
86 return false; | 86 return false; |
87 } | 87 } |
88 | 88 |
89 return true; | 89 return true; |
90 } | 90 } |
91 | 91 |
92 } // namespace internal | 92 } // namespace internal |
93 | 93 |
94 } // namespace base | 94 } // namespace base |
OLD | NEW |