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/threading/thread.h" | 5 #include "base/threading/thread.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/synchronization/waitable_event.h" | 10 #include "base/synchronization/waitable_event.h" |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 running_ = false; | 255 running_ = false; |
256 } | 256 } |
257 | 257 |
258 // Let the thread do extra cleanup. | 258 // Let the thread do extra cleanup. |
259 CleanUp(); | 259 CleanUp(); |
260 | 260 |
261 #if defined(OS_WIN) | 261 #if defined(OS_WIN) |
262 com_initializer.reset(); | 262 com_initializer.reset(); |
263 #endif | 263 #endif |
264 | 264 |
265 // Assert that MessageLoop::Quit was called by ThreadQuitHelper. | 265 // Assert that MessageLoop::QuitWhenIdle was called by ThreadQuitHelper. |
266 DCHECK(GetThreadWasQuitProperly()); | 266 DCHECK(GetThreadWasQuitProperly()); |
267 | 267 |
268 // We can't receive messages anymore. | 268 // We can't receive messages anymore. |
269 // (The message loop is destructed at the end of this block) | 269 // (The message loop is destructed at the end of this block) |
270 message_loop_ = nullptr; | 270 message_loop_ = nullptr; |
271 } | 271 } |
272 | 272 |
273 } // namespace base | 273 } // namespace base |
OLD | NEW |