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

Unified Diff: ipc/mach_port_attachment_mac.cc

Issue 2504063002: Revert of Remove IPC::BrokerableAttachment. (Closed)
Patch Set: 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.h ('k') | ipc/mach_port_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/mach_port_attachment_mac.cc
diff --git a/ipc/mach_port_attachment_mac.cc b/ipc/mach_port_attachment_mac.cc
index 55a85cba7d04e48a895291909ccbb72fc6f502fb..215afa967adeb066e70e8b25784214bfa961de40 100644
--- a/ipc/mach_port_attachment_mac.cc
+++ b/ipc/mach_port_attachment_mac.cc
@@ -24,6 +24,10 @@
FromWire from_wire)
: mach_port_(mach_port), owns_mach_port_(true) {}
+MachPortAttachmentMac::MachPortAttachmentMac(const WireFormat& wire_format)
+ : mach_port_(static_cast<mach_port_t>(wire_format.mach_port)),
+ owns_mach_port_(true) {}
+
MachPortAttachmentMac::~MachPortAttachmentMac() {
if (mach_port_ != MACH_PORT_NULL && owns_mach_port_) {
kern_return_t kr = mach_port_mod_refs(mach_task_self(), mach_port_,
@@ -33,8 +37,14 @@
}
}
-MessageAttachment::Type MachPortAttachmentMac::GetType() const {
- return Type::MACH_PORT;
+MachPortAttachmentMac::BrokerableType MachPortAttachmentMac::GetBrokerableType()
+ const {
+ return MACH_PORT;
+}
+
+MachPortAttachmentMac::WireFormat MachPortAttachmentMac::GetWireFormat(
+ const base::ProcessId& destination) const {
+ return WireFormat(static_cast<uint32_t>(mach_port_), destination);
}
} // namespace internal
« no previous file with comments | « ipc/mach_port_attachment_mac.h ('k') | ipc/mach_port_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698