Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3630)

Unified Diff: chrome/common/ipc_message.h

Issue 20027: Capability: passing fds over IPC (Closed)
Patch Set: ... Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/ipc_channel_posix.cc ('k') | chrome/common/ipc_message.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/ipc_message.h
diff --git a/chrome/common/ipc_message.h b/chrome/common/ipc_message.h
index 040a346bbd8a2d3a59bbbd443ad19ad77e12ba00..0af3b44de0c4a932125c2847d989abaea2c6b356 100644
--- a/chrome/common/ipc_message.h
+++ b/chrome/common/ipc_message.h
@@ -16,6 +16,8 @@
#ifndef NDEBUG
#define IPC_MESSAGE_LOG_ENABLED
#endif
+#elif defined(OS_POSIX)
+#include "chrome/common/file_descriptor_posix.h"
#endif
namespace IPC {
@@ -159,6 +161,10 @@ class Message : public Pickle {
return Pickle::FindNext(sizeof(Header), range_start, range_end);
}
+#if defined(OS_POSIX)
+ DescriptorSet* descriptor_set() const { return &descriptor_set_; }
+#endif
+
#ifdef IPC_MESSAGE_LOG_ENABLED
// Adds the outgoing time from Time::Now() at the end of the message and sets
// a bit to indicate that it's been added.
@@ -201,9 +207,12 @@ class Message : public Pickle {
#pragma pack(push, 2)
struct Header : Pickle::Header {
- int32 routing; // ID of the view that this message is destined for
- uint16 type; // specifies the user-defined message type
- uint16 flags; // specifies control flags for the message
+ int32 routing; // ID of the view that this message is destined for
+ uint16 type; // specifies the user-defined message type
+ uint16 flags; // specifies control flags for the message
+#if defined(OS_POSIX)
+ uint32 num_fds; // the number of descriptors included with this message
+#endif
};
#pragma pack(pop)
@@ -216,6 +225,11 @@ class Message : public Pickle {
void InitLoggingVariables();
+#if defined(OS_POSIX)
+ // The set of file descriptors associated with this message.
+ mutable DescriptorSet descriptor_set_;
+#endif
+
#ifdef IPC_MESSAGE_LOG_ENABLED
// Used for logging.
mutable int64 received_time_;
« no previous file with comments | « chrome/common/ipc_channel_posix.cc ('k') | chrome/common/ipc_message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698