| 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 "ipc/ipc_sync_channel.h" | 5 #include "ipc/ipc_sync_channel.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/location.h" |
| 8 #include "base/logging.h" | 9 #include "base/logging.h" |
| 9 #include "base/threading/thread_local.h" | 10 #include "base/threading/thread_local.h" |
| 10 #include "base/synchronization/waitable_event.h" | 11 #include "base/synchronization/waitable_event.h" |
| 11 #include "base/synchronization/waitable_event_watcher.h" | 12 #include "base/synchronization/waitable_event_watcher.h" |
| 12 #include "ipc/ipc_sync_message.h" | 13 #include "ipc/ipc_sync_message.h" |
| 13 | 14 |
| 14 using base::TimeDelta; | 15 using base::TimeDelta; |
| 15 using base::TimeTicks; | 16 using base::TimeTicks; |
| 16 using base::WaitableEvent; | 17 using base::WaitableEvent; |
| 17 | 18 |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 void SyncChannel::OnWaitableEventSignaled(WaitableEvent* event) { | 505 void SyncChannel::OnWaitableEventSignaled(WaitableEvent* event) { |
| 505 DCHECK(event == sync_context()->GetDispatchEvent()); | 506 DCHECK(event == sync_context()->GetDispatchEvent()); |
| 506 // The call to DispatchMessages might delete this object, so reregister | 507 // The call to DispatchMessages might delete this object, so reregister |
| 507 // the object watcher first. | 508 // the object watcher first. |
| 508 event->Reset(); | 509 event->Reset(); |
| 509 dispatch_watcher_.StartWatching(event, this); | 510 dispatch_watcher_.StartWatching(event, this); |
| 510 sync_context()->DispatchMessages(); | 511 sync_context()->DispatchMessages(); |
| 511 } | 512 } |
| 512 | 513 |
| 513 } // namespace IPC | 514 } // namespace IPC |
| OLD | NEW |