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

Unified Diff: ipc/ipc_message_utils.cc

Issue 2484943004: Remove unused parts of IPC::ChannelHandle. (Closed)
Patch Set: rebase Created 4 years, 1 month 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/ipc_channel_nacl.cc ('k') | ipc/ipc_message_utils_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_utils.cc
diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc
index 5a777e169e370870d3f5c7e778396a7ca6358864..f814727ee2b81fff5694adc45d94d0011d477105 100644
--- a/ipc/ipc_message_utils.cc
+++ b/ipc/ipc_message_utils.cc
@@ -22,6 +22,7 @@
#include "ipc/ipc_mojo_param_traits.h"
#if defined(OS_POSIX)
+#include "base/file_descriptor_posix.h"
#include "ipc/ipc_platform_file_attachment_posix.h"
#endif
@@ -1018,45 +1019,40 @@ void ParamTraits<base::UnguessableToken>::Log(const param_type& p,
void ParamTraits<IPC::ChannelHandle>::GetSize(base::PickleSizer* sizer,
const param_type& p) {
- GetParamSize(sizer, p.name);
-#if defined(OS_POSIX)
+#if defined(OS_NACL_SFI)
GetParamSize(sizer, p.socket);
-#endif
+#else
GetParamSize(sizer, p.mojo_handle);
+#endif
}
void ParamTraits<IPC::ChannelHandle>::Write(base::Pickle* m,
const param_type& p) {
-#if defined(OS_WIN)
- // On Windows marshalling pipe handle is not supported.
- DCHECK(p.pipe.handle == NULL);
-#endif // defined (OS_WIN)
- WriteParam(m, p.name);
-#if defined(OS_POSIX)
+#if defined(OS_NACL_SFI)
WriteParam(m, p.socket);
-#endif
+#else
WriteParam(m, p.mojo_handle);
+#endif
}
bool ParamTraits<IPC::ChannelHandle>::Read(const base::Pickle* m,
base::PickleIterator* iter,
param_type* r) {
- return ReadParam(m, iter, &r->name)
-#if defined(OS_POSIX)
- && ReadParam(m, iter, &r->socket)
+#if defined(OS_NACL_SFI)
+ return ReadParam(m, iter, &r->socket);
+#else
+ return ReadParam(m, iter, &r->mojo_handle);
#endif
- && ReadParam(m, iter, &r->mojo_handle);
}
void ParamTraits<IPC::ChannelHandle>::Log(const param_type& p,
std::string* l) {
- l->append(base::StringPrintf("ChannelHandle(%s", p.name.c_str()));
-#if defined(OS_POSIX)
- l->append(", ");
+ l->append("ChannelHandle(");
+#if defined(OS_NACL_SFI)
ParamTraits<base::FileDescriptor>::Log(p.socket, l);
-#endif
- l->append(", ");
+#else
LogParam(p.mojo_handle, l);
+#endif
l->append(")");
}
« no previous file with comments | « ipc/ipc_channel_nacl.cc ('k') | ipc/ipc_message_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698