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/test/sequenced_worker_pool_owner.h" | 5 #include "base/test/sequenced_worker_pool_owner.h" |
6 | 6 |
7 #include "base/location.h" | 7 #include "base/location.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 void SequencedWorkerPoolOwner::WillWaitForShutdown() { | 47 void SequencedWorkerPoolOwner::WillWaitForShutdown() { |
48 if (!will_wait_for_shutdown_callback_.is_null()) { | 48 if (!will_wait_for_shutdown_callback_.is_null()) { |
49 will_wait_for_shutdown_callback_.Run(); | 49 will_wait_for_shutdown_callback_.Run(); |
50 | 50 |
51 // Release the reference to the callback to prevent retain cycles. | 51 // Release the reference to the callback to prevent retain cycles. |
52 will_wait_for_shutdown_callback_ = Closure(); | 52 will_wait_for_shutdown_callback_ = Closure(); |
53 } | 53 } |
54 } | 54 } |
55 | 55 |
56 void SequencedWorkerPoolOwner::OnDestruct() { | 56 void SequencedWorkerPoolOwner::OnDestruct() { |
57 constructor_message_loop_->PostTask(FROM_HERE, exit_loop_.QuitClosure()); | 57 constructor_message_loop_->task_runner()->PostTask(FROM_HERE, |
| 58 exit_loop_.QuitClosure()); |
58 } | 59 } |
59 | 60 |
60 } // namespace base | 61 } // namespace base |
OLD | NEW |