Index: ipc/ipc_message.cc |
diff --git a/ipc/ipc_message.cc b/ipc/ipc_message.cc |
index 008401f14f358c620a7e6a206bb9fb969fa63220..f5e9ac7a8b807cd04842aa8139a5b9b8cfb0b9ee 100644 |
--- a/ipc/ipc_message.cc |
+++ b/ipc/ipc_message.cc |
@@ -166,19 +166,15 @@ void Message::FindNext(const char* range_start, |
bool Message::WriteAttachment( |
scoped_refptr<base::Pickle::Attachment> attachment) { |
- bool brokerable; |
size_t index; |
bool success = attachment_set()->AddAttachment( |
make_scoped_refptr(static_cast<MessageAttachment*>(attachment.get())), |
- &index, &brokerable); |
+ &index); |
DCHECK(success); |
// NOTE: If you add more data to the pickle, make sure to update |
// PickleSizer::AddAttachment. |
- // Write the type of descriptor. |
- WriteBool(brokerable); |
- |
// Write the index of the descriptor so that we don't have to |
// keep the current descriptor as extra decoding state when deserialising. |
WriteInt(static_cast<int>(index)); |
@@ -189,10 +185,6 @@ bool Message::WriteAttachment( |
bool Message::ReadAttachment( |
base::PickleIterator* iter, |
scoped_refptr<base::Pickle::Attachment>* attachment) const { |
- bool brokerable; |
- if (!iter->ReadBool(&brokerable)) |
- return false; |
- |
int index; |
if (!iter->ReadInt(&index)) |
return false; |
@@ -201,9 +193,7 @@ bool Message::ReadAttachment( |
if (!attachment_set) |
return false; |
- *attachment = brokerable |
- ? attachment_set->GetBrokerableAttachmentAt(index) |
- : attachment_set->GetNonBrokerableAttachmentAt(index); |
+ *attachment = attachment_set->GetAttachmentAt(index); |
return nullptr != attachment->get(); |
} |
@@ -212,13 +202,4 @@ bool Message::HasAttachments() const { |
return attachment_set_.get() && !attachment_set_->empty(); |
} |
-bool Message::HasMojoHandles() const { |
- return attachment_set_.get() && attachment_set_->num_mojo_handles() > 0; |
-} |
- |
-bool Message::HasBrokerableAttachments() const { |
- return attachment_set_.get() && |
- attachment_set_->num_brokerable_attachments() > 0; |
-} |
- |
} // namespace IPC |