Index: ipc/mach_port_mac.cc |
diff --git a/ipc/mach_port_mac.cc b/ipc/mach_port_mac.cc |
index a482d24d7f03ee1d4de77b773bbf89fe43f00b9a..6d3045a560660f139a611da4d85ede2addb99bd1 100644 |
--- a/ipc/mach_port_mac.cc |
+++ b/ipc/mach_port_mac.cc |
@@ -34,16 +34,10 @@ bool ParamTraits<MachPortMac>::Read(const base::Pickle* m, |
return false; |
MessageAttachment* attachment = |
static_cast<MessageAttachment*>(base_attachment.get()); |
- if (attachment->GetType() != MessageAttachment::TYPE_BROKERABLE_ATTACHMENT) |
+ if (attachment->GetType() != MessageAttachment::Type::MACH_PORT) |
return false; |
- BrokerableAttachment* brokerable_attachment = |
- static_cast<BrokerableAttachment*>(attachment); |
- if (brokerable_attachment->GetBrokerableType() != |
- BrokerableAttachment::MACH_PORT) { |
- return false; |
- } |
IPC::internal::MachPortAttachmentMac* mach_port_attachment = |
- static_cast<IPC::internal::MachPortAttachmentMac*>(brokerable_attachment); |
+ static_cast<IPC::internal::MachPortAttachmentMac*>(attachment); |
r->set_mach_port(mach_port_attachment->get_mach_port()); |
mach_port_attachment->reset_mach_port_ownership(); |
return true; |