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

Unified Diff: ipc/mach_port_mac.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/mach_port_mac.h ('k') | ipc/mojo/ipc_channel_mojo_unittest.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 51a5bd7abfcb0822363e5538bf4a159675262d72..9375d728eab5740899b9a0a72fae098d562eecdd 100644
--- a/ipc/mach_port_mac.cc
+++ b/ipc/mach_port_mac.cc
@@ -12,7 +12,7 @@
namespace IPC {
// static
-void ParamTraits<MachPortMac>::Write(Message* m, const param_type& p) {
+void ParamTraits<MachPortMac>::Write(base::Pickle* m, const param_type& p) {
if (!m->WriteAttachment(
new IPC::internal::MachPortAttachmentMac(p.get_mach_port()))) {
NOTREACHED();
@@ -20,16 +20,18 @@ void ParamTraits<MachPortMac>::Write(Message* m, const param_type& p) {
}
// static
-bool ParamTraits<MachPortMac>::Read(const Message* m,
+bool ParamTraits<MachPortMac>::Read(const base::Pickle* m,
base::PickleIterator* iter,
param_type* r) {
- scoped_refptr<MessageAttachment> attachment;
- if (!m->ReadAttachment(iter, &attachment))
+ scoped_refptr<base::Pickle::Attachment> base_attachment;
+ if (!m->ReadAttachment(iter, &base_attachment))
return false;
+ MessageAttachment* attachment =
+ static_cast<MessageAttachment*>(base_attachment.get());
if (attachment->GetType() != MessageAttachment::TYPE_BROKERABLE_ATTACHMENT)
return false;
BrokerableAttachment* brokerable_attachment =
- static_cast<BrokerableAttachment*>(attachment.get());
+ static_cast<BrokerableAttachment*>(attachment);
if (brokerable_attachment->GetBrokerableType() !=
BrokerableAttachment::MACH_PORT) {
return false;
« no previous file with comments | « ipc/mach_port_mac.h ('k') | ipc/mojo/ipc_channel_mojo_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698