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

Unified Diff: chrome/common/ipc_message_utils.h

Issue 14504: Get render_process_host to build on Linux by butchering a bunch of files. (Closed)
Patch Set: re-upload Created 11 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: chrome/common/ipc_message_utils.h
diff --git a/chrome/common/ipc_message_utils.h b/chrome/common/ipc_message_utils.h
index 39bb2313d18700d0e92f7c0a7e1481e9174416ee..e7cf083baa338dd0071f42b7fed00bc0de944a6e 100644
--- a/chrome/common/ipc_message_utils.h
+++ b/chrome/common/ipc_message_utils.h
@@ -208,6 +208,25 @@ struct ParamTraits<uint64> {
}
};
+#if !defined(OS_WIN)
+// TODO(port): why do we need this?
+template <>
+struct ParamTraits<void*> {
+ typedef void* param_type;
+ static void Write(Message* m, const param_type& p) {
+ COMPILE_ASSERT(sizeof(long) == sizeof(void*),
+ assumes_pointers_and_longs_same_size);
+ m->WriteLong(bit_cast<long>(p));
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ return m->ReadLong(iter, reinterpret_cast<long*>(r));
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(StringPrintf(L"%x", p));
+ }
+};
+#endif
+
template <>
struct ParamTraits<double> {
typedef double param_type;

Powered by Google App Engine
This is Rietveld 408576698