| Index: ipc/ipc_message_attachment_set.h
|
| diff --git a/ipc/ipc_message_attachment_set.h b/ipc/ipc_message_attachment_set.h
|
| index a216493f303c46fbcf6d2707bd5bcac2e5d61fda..7e848bd3f544207c35f117f5cd06b7055c51e710 100644
|
| --- a/ipc/ipc_message_attachment_set.h
|
| +++ b/ipc/ipc_message_attachment_set.h
|
| @@ -35,6 +35,9 @@ class IPC_EXPORT MessageAttachmentSet
|
| unsigned size() const;
|
| // Return the number of file descriptors
|
| unsigned num_descriptors() const;
|
| + // Return the number of mojo handles in the attachment set
|
| + unsigned num_mojo_handles() const;
|
| +
|
| // Return true if no unconsumed descriptors remain
|
| bool empty() const { return 0 == size(); }
|
|
|
| @@ -48,6 +51,11 @@ class IPC_EXPORT MessageAttachmentSet
|
| // returns: an attachment, or nullptr on error
|
| scoped_refptr<MessageAttachment> GetAttachmentAt(unsigned index);
|
|
|
| + // This must be called after transmitting the descriptors returned by
|
| + // PeekDescriptors. It marks all the descriptors as consumed and closes those
|
| + // which are auto-close.
|
| + void CommitAll();
|
| +
|
| #if defined(OS_POSIX)
|
| // This is the maximum number of descriptors per message. We need to know this
|
| // because the control message kernel interface has to be given a buffer which
|
| @@ -66,10 +74,6 @@ class IPC_EXPORT MessageAttachmentSet
|
| // must be called after these descriptors have been transmitted.
|
| // buffer: (output) a buffer of, at least, size() integers.
|
| void PeekDescriptors(base::PlatformFile* buffer) const;
|
| - // This must be called after transmitting the descriptors returned by
|
| - // PeekDescriptors. It marks all the descriptors as consumed and closes those
|
| - // which are auto-close.
|
| - void CommitAll();
|
| // Returns true if any contained file descriptors appear to be handles to a
|
| // directory.
|
| bool ContainsDirectoryDescriptor() const;
|
|
|