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.h" | 8 #include "base/message_loop/message_loop.h" |
9 | 9 |
10 namespace base { | 10 namespace base { |
11 | 11 |
12 SequencedWorkerPoolOwner::SequencedWorkerPoolOwner( | 12 SequencedWorkerPoolOwner::SequencedWorkerPoolOwner( |
13 size_t max_threads, | 13 size_t max_threads, |
14 const std::string& thread_name_prefix) | 14 const std::string& thread_name_prefix) |
15 : constructor_message_loop_(MessageLoop::current()), | 15 : constructor_message_loop_(MessageLoop::current()), |
16 pool_(new SequencedWorkerPool(max_threads, thread_name_prefix, this)), | 16 pool_(new SequencedWorkerPool(max_threads, thread_name_prefix, this)), |
17 has_work_call_count_(0) {} | 17 has_work_call_count_(0) {} |
18 | 18 |
(...skipping 27 matching lines...) Expand all Loading... |
46 } | 46 } |
47 } | 47 } |
48 | 48 |
49 void SequencedWorkerPoolOwner::OnDestruct() { | 49 void SequencedWorkerPoolOwner::OnDestruct() { |
50 constructor_message_loop_->PostTask( | 50 constructor_message_loop_->PostTask( |
51 FROM_HERE, | 51 FROM_HERE, |
52 constructor_message_loop_->QuitWhenIdleClosure()); | 52 constructor_message_loop_->QuitWhenIdleClosure()); |
53 } | 53 } |
54 | 54 |
55 } // namespace base | 55 } // namespace base |
OLD | NEW |