| 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 "ipc/ipc_sync_channel.h" | 5 #include "ipc/ipc_sync_channel.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 Run(); | 193 Run(); |
| 194 } | 194 } |
| 195 | 195 |
| 196 void OnListenerThreadShutdown1(WaitableEvent* listener_event, | 196 void OnListenerThreadShutdown1(WaitableEvent* listener_event, |
| 197 WaitableEvent* ipc_event) { | 197 WaitableEvent* ipc_event) { |
| 198 // SyncChannel needs to be destructed on the thread that it was created on. | 198 // SyncChannel needs to be destructed on the thread that it was created on. |
| 199 channel_.reset(); | 199 channel_.reset(); |
| 200 | 200 |
| 201 base::RunLoop().RunUntilIdle(); | 201 base::RunLoop().RunUntilIdle(); |
| 202 | 202 |
| 203 ipc_thread_.message_loop()->PostTask( | 203 ipc_thread_.task_runner()->PostTask( |
| 204 FROM_HERE, base::Bind(&Worker::OnIPCThreadShutdown, this, | 204 FROM_HERE, base::Bind(&Worker::OnIPCThreadShutdown, this, |
| 205 listener_event, ipc_event)); | 205 listener_event, ipc_event)); |
| 206 } | 206 } |
| 207 | 207 |
| 208 void OnIPCThreadShutdown(WaitableEvent* listener_event, | 208 void OnIPCThreadShutdown(WaitableEvent* listener_event, |
| 209 WaitableEvent* ipc_event) { | 209 WaitableEvent* ipc_event) { |
| 210 base::RunLoop().RunUntilIdle(); | 210 base::RunLoop().RunUntilIdle(); |
| 211 ipc_event->Signal(); | 211 ipc_event->Signal(); |
| 212 | 212 |
| 213 listener_thread_.task_runner()->PostTask( | 213 listener_thread_.task_runner()->PostTask( |
| (...skipping 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1856 } | 1856 } |
| 1857 | 1857 |
| 1858 // Windows needs to send an out-of-band secret to verify the client end of the | 1858 // Windows needs to send an out-of-band secret to verify the client end of the |
| 1859 // channel. Test that we still connect correctly in that case. | 1859 // channel. Test that we still connect correctly in that case. |
| 1860 TEST_F(IPCSyncChannelTest, Verified) { | 1860 TEST_F(IPCSyncChannelTest, Verified) { |
| 1861 Verified(); | 1861 Verified(); |
| 1862 } | 1862 } |
| 1863 | 1863 |
| 1864 } // namespace | 1864 } // namespace |
| 1865 } // namespace IPC | 1865 } // namespace IPC |
| OLD | NEW |