Implement most of Chrome IPC for Fuchsia.
- Clean up the Handle[Attachment]Fuchsia classes, removing unused fields.
- Add a missing OS_FUCHSIA case to ipc_message_utils.cc
- Update the test filters.
Bug: 734791
Change-Id: I6ce0eb74166fbb40b16d9c77ebb782c514d3a160
Reviewed-on: https://chromium-review.googlesource.com/609384
Commit-Queue: Wez <[email protected]>
Reviewed-by: Ken Rockot <[email protected]>
Cr-Commit-Position: refs/heads/master@{#493436}
diff --git a/ipc/handle_fuchsia.cc b/ipc/handle_fuchsia.cc
index 8b3cc51..26dc9cf 100644
--- a/ipc/handle_fuchsia.cc
+++ b/ipc/handle_fuchsia.cc
@@ -15,17 +15,14 @@
namespace IPC {
-HandleFuchsia::HandleFuchsia()
- : handle_(MX_HANDLE_INVALID), permissions_(INVALID) {}
+HandleFuchsia::HandleFuchsia() : handle_(MX_HANDLE_INVALID) {}
-HandleFuchsia::HandleFuchsia(const mx_handle_t& handle, Permissions permissions)
- : handle_(handle), permissions_(permissions) {}
+HandleFuchsia::HandleFuchsia(const mx_handle_t& handle) : handle_(handle) {}
// static
void ParamTraits<HandleFuchsia>::Write(base::Pickle* m, const param_type& p) {
scoped_refptr<IPC::internal::HandleAttachmentFuchsia> attachment(
- new IPC::internal::HandleAttachmentFuchsia(p.get_handle(),
- p.get_permissions()));
+ new IPC::internal::HandleAttachmentFuchsia(p.get_handle()));
if (!m->WriteAttachment(std::move(attachment)))
NOTREACHED();
}
@@ -43,15 +40,13 @@
return false;
IPC::internal::HandleAttachmentFuchsia* handle_attachment =
static_cast<IPC::internal::HandleAttachmentFuchsia*>(attachment);
- r->set_handle(handle_attachment->get_handle());
- handle_attachment->reset_handle_ownership();
+ r->set_handle(handle_attachment->Take());
return true;
}
// static
void ParamTraits<HandleFuchsia>::Log(const param_type& p, std::string* l) {
l->append(base::StringPrintf("0x%x", p.get_handle()));
- l->append(base::IntToString(p.get_permissions()));
}
} // namespace IPC