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

Unified Diff: ipc/mojo/ipc_mojo_message_helper.cc

Issue 1659003003: IPC::Message -> base::Pickle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more mac fix Created 4 years, 11 months 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/mojo/ipc_mojo_message_helper.h ('k') | ipc/param_traits_macros.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/mojo/ipc_mojo_message_helper.cc
diff --git a/ipc/mojo/ipc_mojo_message_helper.cc b/ipc/mojo/ipc_mojo_message_helper.cc
index 8b8344ec766c514d2a4a1c8bce92f5ca05739c66..ae5e83a2cdb12e54c5807b967217e83d40dfbb17 100644
--- a/ipc/mojo/ipc_mojo_message_helper.cc
+++ b/ipc/mojo/ipc_mojo_message_helper.cc
@@ -12,7 +12,7 @@ namespace IPC {
// static
bool MojoMessageHelper::WriteMessagePipeTo(
- Message* message,
+ base::Pickle* message,
mojo::ScopedMessagePipeHandle handle) {
message->WriteAttachment(new internal::MojoHandleAttachment(
mojo::ScopedHandle::From(std::move(handle))));
@@ -21,17 +21,19 @@ bool MojoMessageHelper::WriteMessagePipeTo(
// static
bool MojoMessageHelper::ReadMessagePipeFrom(
- const Message* message,
+ const base::Pickle* message,
base::PickleIterator* iter,
mojo::ScopedMessagePipeHandle* handle) {
- scoped_refptr<MessageAttachment> attachment;
+ scoped_refptr<base::Pickle::Attachment> attachment;
if (!message->ReadAttachment(iter, &attachment)) {
LOG(ERROR) << "Failed to read attachment for message pipe.";
return false;
}
- if (attachment->GetType() != MessageAttachment::TYPE_MOJO_HANDLE) {
- LOG(ERROR) << "Unxpected attachment type:" << attachment->GetType();
+ MessageAttachment::Type type =
+ static_cast<MessageAttachment*>(attachment.get())->GetType();
+ if (type != MessageAttachment::TYPE_MOJO_HANDLE) {
+ LOG(ERROR) << "Unxpected attachment type:" << type;
return false;
}
« no previous file with comments | « ipc/mojo/ipc_mojo_message_helper.h ('k') | ipc/param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698