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 "remoting/base/auto_thread.h" | 5 #include "remoting/base/auto_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/run_loop.h" |
9 #include "base/synchronization/waitable_event.h" | 10 #include "base/synchronization/waitable_event.h" |
10 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" | 11 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" |
11 #include "base/threading/thread_local.h" | 12 #include "base/threading/thread_local.h" |
12 #include "base/threading/thread_restrictions.h" | 13 #include "base/threading/thread_restrictions.h" |
13 #include "build/build_config.h" | 14 #include "build/build_config.h" |
14 #include "remoting/base/auto_thread_task_runner.h" | 15 #include "remoting/base/auto_thread_task_runner.h" |
15 | 16 |
16 #if defined(OS_WIN) | 17 #if defined(OS_WIN) |
17 #include "base/win/scoped_com_initializer.h" | 18 #include "base/win/scoped_com_initializer.h" |
18 #endif | 19 #endif |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 startup_data_->event.Signal(); | 201 startup_data_->event.Signal(); |
201 // startup_data_ can't be touched anymore since the starting thread is now | 202 // startup_data_ can't be touched anymore since the starting thread is now |
202 // unlocked. | 203 // unlocked. |
203 | 204 |
204 #if defined(OS_WIN) | 205 #if defined(OS_WIN) |
205 // Initialize COM on the thread, if requested. | 206 // Initialize COM on the thread, if requested. |
206 std::unique_ptr<base::win::ScopedCOMInitializer> com_initializer( | 207 std::unique_ptr<base::win::ScopedCOMInitializer> com_initializer( |
207 CreateComInitializer(com_init_type_)); | 208 CreateComInitializer(com_init_type_)); |
208 #endif | 209 #endif |
209 | 210 |
210 message_loop.Run(); | 211 base::RunLoop().Run(); |
211 | 212 |
212 // Assert that MessageLoop::QuitWhenIdle was called by AutoThread::QuitThread. | 213 // Assert that MessageLoop::QuitWhenIdle was called by AutoThread::QuitThread. |
213 DCHECK(was_quit_properly_); | 214 DCHECK(was_quit_properly_); |
214 } | 215 } |
215 | 216 |
216 } // namespace base | 217 } // namespace base |
OLD | NEW |