Index: ipc/ipc_message_utils.h |
diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h |
index 58d6aa26da34fb125d45bd9f2ddd3f767a2f7313..40dd6706cb0ee93205a21f1b8c57a7b545935e3a 100644 |
--- a/ipc/ipc_message_utils.h |
+++ b/ipc/ipc_message_utils.h |
@@ -307,6 +307,37 @@ struct IPC_EXPORT ParamTraits<double> { |
static void Log(const param_type& p, std::string* l); |
}; |
+template <class P, size_t Size> |
+struct ParamTraits<P[Size]> { |
+ using param_type = P[Size]; |
+ static void GetSize(base::PickleSizer* sizer, const param_type& p) { |
+ for (const P& element : p) |
+ GetParamSize(sizer, element); |
+ } |
+ static void Write(base::Pickle* m, const param_type& p) { |
+ for (const P& element : p) |
+ WriteParam(m, element); |
+ } |
+ static bool Read(const base::Pickle* m, |
+ base::PickleIterator* iter, |
+ param_type* r) { |
+ for (P& element : *r) { |
+ if (!ReadParam(m, iter, &element)) |
+ return false; |
+ } |
+ return true; |
+ } |
+ static void Log(const param_type& p, std::string* l) { |
+ l->append("["); |
+ for (const P& element : p) { |
+ if (&element != &p[0]) |
+ l->append(" "); |
+ LogParam(element, l); |
+ } |
+ l->append("]"); |
+ } |
+}; |
+ |
// STL ParamTraits ------------------------------------------------------------- |
template <> |