Index: ipc/ipc_message_utils.cc |
=================================================================== |
--- ipc/ipc_message_utils.cc (revision 65847) |
+++ ipc/ipc_message_utils.cc (working copy) |
@@ -233,6 +233,23 @@ |
l->append(base::Uint64ToString(p)); |
} |
+void ParamTraits<unsigned short>::Write(Message* m, const param_type& p) { |
+ m->WriteBytes(&p, sizeof(param_type)); |
+} |
+ |
+bool ParamTraits<unsigned short>::Read(const Message* m, void** iter, |
+ param_type* r) { |
+ const char* data; |
+ if (!m->ReadBytes(iter, &data, sizeof(param_type))) |
+ return false; |
+ memcpy(r, data, sizeof(param_type)); |
+ return true; |
+} |
+ |
+void ParamTraits<unsigned short>::Log(const param_type& p, std::string* l) { |
+ l->append(base::UintToString(p)); |
+} |
+ |
void ParamTraits<base::Time>::Write(Message* m, const param_type& p) { |
ParamTraits<int64>::Write(m, p.ToInternalValue()); |
} |