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

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: fix missing comment 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
Index: ipc/handle_win.cc
diff --git a/ipc/handle_win.cc b/ipc/handle_win.cc
index f964c8320570c3171157ee907cc5206cc7862df6..468077bba01a4987cc1d0b24039baee62771aeca 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,12 +30,14 @@ 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;
+ scoped_refptr<MessageAttachment> attachment = make_scoped_refptr(
+ static_cast<MessageAttachment*>(base_attachment.get()));
if (attachment->GetType() != MessageAttachment::TYPE_BROKERABLE_ATTACHMENT)
return false;
BrokerableAttachment* brokerable_attachment =
« base/pickle.h ('K') | « 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