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 <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 } | 943 } |
944 | 944 |
945 //------------------------------------------------------------------------------ | 945 //------------------------------------------------------------------------------ |
946 | 946 |
947 class TestSyncMessageFilter : public SyncMessageFilter { | 947 class TestSyncMessageFilter : public SyncMessageFilter { |
948 public: | 948 public: |
949 TestSyncMessageFilter( | 949 TestSyncMessageFilter( |
950 base::WaitableEvent* shutdown_event, | 950 base::WaitableEvent* shutdown_event, |
951 Worker* worker, | 951 Worker* worker, |
952 scoped_refptr<base::SingleThreadTaskRunner> task_runner) | 952 scoped_refptr<base::SingleThreadTaskRunner> task_runner) |
953 : SyncMessageFilter(shutdown_event), | 953 : SyncMessageFilter(shutdown_event, false), |
954 worker_(worker), | 954 worker_(worker), |
955 task_runner_(task_runner) {} | 955 task_runner_(task_runner) {} |
956 | 956 |
957 void OnFilterAdded(Sender* sender) override { | 957 void OnFilterAdded(Sender* sender) override { |
958 SyncMessageFilter::OnFilterAdded(sender); | 958 SyncMessageFilter::OnFilterAdded(sender); |
959 task_runner_->PostTask( | 959 task_runner_->PostTask( |
960 FROM_HERE, | 960 FROM_HERE, |
961 base::Bind(&TestSyncMessageFilter::SendMessageOnHelperThread, this)); | 961 base::Bind(&TestSyncMessageFilter::SendMessageOnHelperThread, this)); |
962 } | 962 } |
963 | 963 |
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1800 } | 1800 } |
1801 | 1801 |
1802 // Windows needs to send an out-of-band secret to verify the client end of the | 1802 // Windows needs to send an out-of-band secret to verify the client end of the |
1803 // channel. Test that we still connect correctly in that case. | 1803 // channel. Test that we still connect correctly in that case. |
1804 TEST_F(IPCSyncChannelTest, Verified) { | 1804 TEST_F(IPCSyncChannelTest, Verified) { |
1805 Verified(); | 1805 Verified(); |
1806 } | 1806 } |
1807 | 1807 |
1808 } // namespace | 1808 } // namespace |
1809 } // namespace IPC | 1809 } // namespace IPC |
OLD | NEW |