Chromium Code Reviews| Index: ipc/ipc_security_test_util.cc |
| diff --git a/ipc/ipc_security_test_util.cc b/ipc/ipc_security_test_util.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cd685351e83dea5b6b5f4fb23fa20b5d20107822 |
| --- /dev/null |
| +++ b/ipc/ipc_security_test_util.cc |
| @@ -0,0 +1,25 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "ipc/ipc_security_test_util.h" |
| + |
| +#include "base/bind.h" |
| +#include "base/bind_helpers.h" |
| +#include "base/run_loop.h" |
| +#include "ipc/ipc_channel_proxy.h" |
| + |
| +namespace IPC { |
| + |
| +void IpcSecurityTestUtil::PwnMessageReceived(ChannelProxy* channel, |
| + const IPC::Message& message) { |
| + base::RunLoop run_loop; |
| + channel->context()->ipc_task_runner()->PostTaskAndReply( |
| + FROM_HERE, base::Bind(base::IgnoreResult( |
| + &IPC::ChannelProxy::Context::OnMessageReceived), |
|
Tom Sepez
2014/11/08 00:26:31
nit: indentation style. I thought the deal was to
ncarter (slow)
2014/11/08 00:43:05
This was from clang-format. But I agree this was h
|
| + channel->context(), message), |
| + run_loop.QuitClosure()); |
| + run_loop.Run(); |
| +} |
| + |
| +} // namespace IPC |