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

Unified Diff: ipc/handle_win.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/handle_win.h ('k') | ipc/ipc_channel_proxy_unittest_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/handle_win.cc
diff --git a/ipc/handle_win.cc b/ipc/handle_win.cc
index f964c8320570c3171157ee907cc5206cc7862df6..60fa54c7cd1643cd08a3ed8093ab7d02d4f4e7b7 100644
--- a/ipc/handle_win.cc
+++ b/ipc/handle_win.cc
@@ -21,7 +21,7 @@ HandleWin::HandleWin(const HANDLE& handle, Permissions permissions)
: handle_(handle), permissions_(permissions) {}
// static
-void ParamTraits<HandleWin>::Write(Message* m, const param_type& p) {
+void ParamTraits<HandleWin>::Write(base::Pickle* m, const param_type& p) {
scoped_refptr<IPC::internal::HandleAttachmentWin> attachment(
new IPC::internal::HandleAttachmentWin(p.get_handle(),
p.get_permissions()));
@@ -30,16 +30,18 @@ void ParamTraits<HandleWin>::Write(Message* m, const param_type& p) {
}
// static
-bool ParamTraits<HandleWin>::Read(const Message* m,
+bool ParamTraits<HandleWin>::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::WIN_HANDLE) {
return false;
« no previous file with comments | « ipc/handle_win.h ('k') | ipc/ipc_channel_proxy_unittest_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698