summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel.h
diff options
context:
space:
mode:
authorricea <ricea@chromium.org>2015-08-20 02:22:23 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-20 09:22:54 +0000
commit16e26d48963f94a6412f9b58587b285cd9ca5695 (patch)
treee8fbc9af306cad249e80a6b36582667022aad886 /ipc/ipc_channel.h
parent47e853cbc81496d174cdef98d6ecf4ff3a3570b5 (diff)
downloadchromium_src-16e26d48963f94a6412f9b58587b285cd9ca5695.zip
chromium_src-16e26d48963f94a6412f9b58587b285cd9ca5695.tar.gz
chromium_src-16e26d48963f94a6412f9b58587b285cd9ca5695.tar.bz2
Revert of IPC: Add attachment brokering support to the message header. (patchset #20 id:420001 of https://codereview.chromium.org/1286253002/ )
Reason for revert: Suspected of breaking XP Tests. See, for example https://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%281%29/builds/39586 . Original issue's description: > IPC: Add attachment brokering support to the message header. > > 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 > > Committed: https://crrev.com/e8e4f4fa67ee9db6c2910020ef49318e5df68481 > Cr-Commit-Position: refs/heads/master@{#344389} TBR=tsepez@chromium.org,thakis@chromium.org,erikchen@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=493414 Review URL: https://codereview.chromium.org/1286883003 Cr-Commit-Position: refs/heads/master@{#344461}
Diffstat (limited to 'ipc/ipc_channel.h')
-rw-r--r--ipc/ipc_channel.h32
1 files changed, 6 insertions, 26 deletions
diff --git a/ipc/ipc_channel.h b/ipc/ipc_channel.h
index 9021ab4..c74d084 100644
--- a/ipc/ipc_channel.h
+++ b/ipc/ipc_channel.h
@@ -52,7 +52,7 @@ class IPC_EXPORT Channel : public Endpoint {
MODE_CLIENT_FLAG = 0x2,
MODE_NAMED_FLAG = 0x4,
#if defined(OS_POSIX)
- MODE_OPEN_ACCESS_FLAG = 0x8, // Don't restrict access based on client UID.
+ MODE_OPEN_ACCESS_FLAG = 0x8, // Don't restrict access based on client UID.
#endif
};
@@ -66,8 +66,8 @@ class IPC_EXPORT Channel : public Endpoint {
MODE_NAMED_SERVER = MODE_SERVER_FLAG | MODE_NAMED_FLAG,
MODE_NAMED_CLIENT = MODE_CLIENT_FLAG | MODE_NAMED_FLAG,
#if defined(OS_POSIX)
- MODE_OPEN_NAMED_SERVER =
- MODE_OPEN_ACCESS_FLAG | MODE_SERVER_FLAG | MODE_NAMED_FLAG
+ MODE_OPEN_NAMED_SERVER = MODE_OPEN_ACCESS_FLAG | MODE_SERVER_FLAG |
+ MODE_NAMED_FLAG
#endif
};
@@ -195,9 +195,9 @@ class IPC_EXPORT Channel : public Endpoint {
// threads. This is constant for the lifetime of the |Channel|.
virtual bool IsSendThreadSafe() const;
-// NaCl in Non-SFI mode runs on Linux directly, and the following functions
-// compiled on Linux are also needed. Please see also comments in
-// components/nacl_nonsfi.gyp for more details.
+ // NaCl in Non-SFI mode runs on Linux directly, and the following functions
+ // compiled on Linux are also needed. Please see also comments in
+ // components/nacl_nonsfi.gyp for more details.
#if defined(OS_POSIX) && !defined(OS_NACL_SFI)
// On POSIX an IPC::Channel wraps a socketpair(), this method returns the
// FD # for the client end of the socket.
@@ -240,26 +240,6 @@ class IPC_EXPORT Channel : public Endpoint {
// process such that it acts similar to if it was exec'd, for tests.
static void NotifyProcessForkedForTesting();
#endif
-
- protected:
- // An OutputElement is a wrapper around a Message or raw buffer while it is
- // waiting to be passed to the system's underlying IPC mechanism.
- class OutputElement {
- public:
- // Takes ownership of message.
- OutputElement(Message* message);
- // Takes ownership of the buffer.
- OutputElement(void* buffer, size_t length);
- ~OutputElement();
- size_t size() const;
- const void* data() const;
- const Message* get_message() const { return message_.get(); }
-
- private:
- scoped_ptr<const Message> message_;
- void* buffer_;
- size_t length_;
- };
};
#if defined(OS_POSIX)