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

Unified Diff: ipc/mach_port_mac.cc

Issue 2494943002: Remove IPC::BrokerableAttachment. (Closed)
Patch Set: extra test output Created 4 years, 1 month 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 | « ipc/mach_port_attachment_mac.cc ('k') | ppapi/proxy/nacl_message_scanner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « ipc/mach_port_attachment_mac.cc ('k') | ppapi/proxy/nacl_message_scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698