| 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 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 984 } | 984 } |
| 985 | 985 |
| 986 //------------------------------------------------------------------------------ | 986 //------------------------------------------------------------------------------ |
| 987 | 987 |
| 988 class TestSyncMessageFilter : public SyncMessageFilter { | 988 class TestSyncMessageFilter : public SyncMessageFilter { |
| 989 public: | 989 public: |
| 990 TestSyncMessageFilter( | 990 TestSyncMessageFilter( |
| 991 base::WaitableEvent* shutdown_event, | 991 base::WaitableEvent* shutdown_event, |
| 992 Worker* worker, | 992 Worker* worker, |
| 993 scoped_refptr<base::SingleThreadTaskRunner> task_runner) | 993 scoped_refptr<base::SingleThreadTaskRunner> task_runner) |
| 994 : SyncMessageFilter(shutdown_event, false), | 994 : SyncMessageFilter(shutdown_event), |
| 995 worker_(worker), | 995 worker_(worker), |
| 996 task_runner_(task_runner) {} | 996 task_runner_(task_runner) {} |
| 997 | 997 |
| 998 void OnFilterAdded(Sender* sender) override { | 998 void OnFilterAdded(Sender* sender) override { |
| 999 SyncMessageFilter::OnFilterAdded(sender); | 999 SyncMessageFilter::OnFilterAdded(sender); |
| 1000 task_runner_->PostTask( | 1000 task_runner_->PostTask( |
| 1001 FROM_HERE, | 1001 FROM_HERE, |
| 1002 base::Bind(&TestSyncMessageFilter::SendMessageOnHelperThread, this)); | 1002 base::Bind(&TestSyncMessageFilter::SendMessageOnHelperThread, this)); |
| 1003 } | 1003 } |
| 1004 | 1004 |
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1861 } | 1861 } |
| 1862 | 1862 |
| 1863 // Windows needs to send an out-of-band secret to verify the client end of the | 1863 // Windows needs to send an out-of-band secret to verify the client end of the |
| 1864 // channel. Test that we still connect correctly in that case. | 1864 // channel. Test that we still connect correctly in that case. |
| 1865 TEST_F(IPCSyncChannelTest, Verified) { | 1865 TEST_F(IPCSyncChannelTest, Verified) { |
| 1866 Verified(); | 1866 Verified(); |
| 1867 } | 1867 } |
| 1868 | 1868 |
| 1869 } // namespace | 1869 } // namespace |
| 1870 } // namespace IPC | 1870 } // namespace IPC |
| OLD | NEW |