diff options
author | erikchen <erikchen@chromium.org> | 2015-08-21 17:26:36 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-22 00:27:24 +0000 |
commit | 37a2e0b682555bf35852d707dbd74b68f345841f (patch) | |
tree | 3d08086581676e7c7b86410b2b6cc5cd8bc305d1 /ipc/ipc_test_messages.h | |
parent | f98cee5f50d3aaa4cd30d40a96a2ab7968260e0e (diff) | |
download | chromium_src-37a2e0b682555bf35852d707dbd74b68f345841f.zip chromium_src-37a2e0b682555bf35852d707dbd74b68f345841f.tar.gz chromium_src-37a2e0b682555bf35852d707dbd74b68f345841f.tar.bz2 |
Reland #1: IPC: Add attachment brokering support to the message header.
This reland fixes a race condition in the unit test SendHandleTwice that caused
the test to flakily fail, mostly on XP machines. This reland also updates switch
statements to contain a block for the newly added enum
BrokerableAttachment::PLACEHOLDER, which was causing problems with the clang
Windows build.
> Message dispatch happens before message translation, and message dispatch
> requires that all brokered attachments have been received. This means that
> attachment brokering needs to function without message translation. This is
> accomplished by modifying the message header to include a new field
> num_brokered_attachments, and writing the attachment ids into the IPC Channel
> immediately following the pickled message itself.
>
> AttachmentBrokerPrivilegedWinUnittest was expanded to test ChannelReader in the
> receiving process. It is now a fully functional end-to-end test of attachment
> brokering.
>
> BUG=493414
TBR=tsepez@chromium.org
BUG=493414
Review URL: https://codereview.chromium.org/1303103002
Cr-Commit-Position: refs/heads/master@{#344933}
Diffstat (limited to 'ipc/ipc_test_messages.h')
-rw-r--r-- | ipc/ipc_test_messages.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ipc/ipc_test_messages.h b/ipc/ipc_test_messages.h new file mode 100644 index 0000000..4bf927e --- /dev/null +++ b/ipc/ipc_test_messages.h @@ -0,0 +1,14 @@ +// Copyright 2015 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 "build/build_config.h" + +#if defined(OS_WIN) +#include "ipc/handle_win.h" +#include "ipc/ipc_message_macros.h" +#define IPC_MESSAGE_START IPCTestMsgStart + +IPC_MESSAGE_CONTROL3(TestHandleWinMsg, int, IPC::HandleWin, int) +IPC_MESSAGE_CONTROL2(TestTwoHandleWinMsg, IPC::HandleWin, IPC::HandleWin) +#endif // defined(OS_WIN) |