summaryrefslogtreecommitdiffstats
path: root/chrome/common/ipc_message.cc
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-07 00:39:26 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-07 00:39:26 +0000
commit526776cf6ba5d6370ef28c9b483141fb0e4b1ae6 (patch)
tree5dd943dee4f2c74661c97f09a04b2358b16e3185 /chrome/common/ipc_message.cc
parent95284326ea69903454907a200ad43ec41d158105 (diff)
downloadchromium_src-526776cf6ba5d6370ef28c9b483141fb0e4b1ae6.zip
chromium_src-526776cf6ba5d6370ef28c9b483141fb0e4b1ae6.tar.gz
chromium_src-526776cf6ba5d6370ef28c9b483141fb0e4b1ae6.tar.bz2
FileDescriptor: passing fds over IPC
This patch introduces a FileDescriptor object which can be included in IPC messages and will perform the magic needed to pass file descriptors over IPC. After some consideration, Windows will continue to do the current DuplicateHandle tricks. Review URL: http://codereview.chromium.org/20027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9369 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/ipc_message.cc')
-rw-r--r--chrome/common/ipc_message.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/common/ipc_message.cc b/chrome/common/ipc_message.cc
index fe61423..67dfad8 100644
--- a/chrome/common/ipc_message.cc
+++ b/chrome/common/ipc_message.cc
@@ -5,6 +5,7 @@
#include "chrome/common/ipc_message.h"
#include "base/logging.h"
+#include "build/build_config.h"
namespace IPC {
@@ -16,6 +17,9 @@ Message::~Message() {
Message::Message()
: Pickle(sizeof(Header)) {
header()->routing = header()->type = header()->flags = 0;
+#if defined(OS_POSIX)
+ header()->num_fds = 0;
+#endif
InitLoggingVariables();
}
@@ -24,6 +28,9 @@ Message::Message(int32 routing_id, uint16 type, PriorityValue priority)
header()->routing = routing_id;
header()->type = type;
header()->flags = priority;
+#if defined(OS_POSIX)
+ header()->num_fds = 0;
+#endif
InitLoggingVariables();
}