Chromium Code Reviews| Index: ipc/ipc_message.h |
| diff --git a/ipc/ipc_message.h b/ipc/ipc_message.h |
| index c3d4296cfe3e3adda857d30ad80d6e201dcc9996..85cacf084197a3cdd9f6dc47210a0e13c042896a 100644 |
| --- a/ipc/ipc_message.h |
| +++ b/ipc/ipc_message.h |
| @@ -149,6 +149,15 @@ class IPC_EXPORT Message : public Pickle { |
| return header()->flags; |
| } |
| + void set_flags(uint32 f) { |
| + header()->flags = f; |
| + } |
| + |
| + // This is used when deserializing nested messages. It sets the given header |
|
darin (slow to review)
2012/06/22 21:42:16
nit: people often fail to update comments like thi
|
| + // values. The message should be empty. |
| + void SetHeaderValues(int32 routing, uint32 type, uint32 flags); |
| + |
| + |
| template<class T, class S> |
| static bool Dispatch(const Message* msg, T* obj, S* sender, |
| void (T::*func)()) { |
| @@ -191,12 +200,16 @@ class IPC_EXPORT Message : public Pickle { |
| // On POSIX, a message supports reading / writing FileDescriptor objects. |
| // This is used to pass a file descriptor to the peer of an IPC channel. |
| - // Add a descriptor to the end of the set. Returns false iff the set is full. |
| + // Add a descriptor to the end of the set. Returns false if the set is full. |
| bool WriteFileDescriptor(const base::FileDescriptor& descriptor); |
| + |
| // Get a file descriptor from the message. Returns false on error. |
| // iter: a Pickle iterator to the current location in the message. |
| bool ReadFileDescriptor(PickleIterator* iter, |
| base::FileDescriptor* descriptor) const; |
| + |
| + // Returns true if there are any file descriptors in this message. |
| + bool HasFileDescriptors() const; |
| #endif |
| #ifdef IPC_MESSAGE_LOG_ENABLED |