Index: content/common/indexed_db/indexed_db_param_traits.cc |
diff --git a/content/common/indexed_db/indexed_db_param_traits.cc b/content/common/indexed_db/indexed_db_param_traits.cc |
index 34dfde579925c35a7034329ae1d934e526afb235..c580cd13616bac7736fe0ac9bbb6b6544271db22 100644 |
--- a/content/common/indexed_db/indexed_db_param_traits.cc |
+++ b/content/common/indexed_db/indexed_db_param_traits.cc |
@@ -5,6 +5,7 @@ |
#include "content/common/indexed_db/indexed_db_param_traits.h" |
#include "content/common/indexed_db/indexed_db_key.h" |
+#include "content/common/indexed_db/indexed_db_key_range.h" |
#include "content/public/common/serialized_script_value.h" |
#include "ipc/ipc_message_utils.h" |
@@ -140,4 +141,47 @@ void ParamTraits<IndexedDBKey>::Log(const param_type& p, std::string* l) { |
l->append(")"); |
} |
+void ParamTraits<IndexedDBKeyRange>::Write(Message* m, const param_type& p) { |
+ WriteParam(m, p.lower()); |
+ WriteParam(m, p.upper()); |
+ WriteParam(m, p.lowerOpen()); |
+ WriteParam(m, p.upperOpen()); |
+} |
+ |
+bool ParamTraits<IndexedDBKeyRange>::Read(const Message* m, |
+ void** iter, |
+ param_type* r) { |
+ |
+ IndexedDBKey lower; |
+ if (!ReadParam(m, iter, &lower)) |
+ return false; |
+ |
+ IndexedDBKey upper; |
+ if (!ReadParam(m, iter, &upper)) |
+ return false; |
+ |
+ bool lower_open; |
+ if (!ReadParam(m, iter, &lower_open)) |
+ return false; |
+ |
+ bool upper_open; |
+ if (!ReadParam(m, iter, &upper_open)) |
+ return false; |
+ |
+ r->Set(lower, upper, lower_open, upper_open); |
+ return true; |
+} |
+ |
+void ParamTraits<IndexedDBKeyRange>::Log(const param_type& p, std::string* l) { |
+ l->append("<IndexedDBKeyRange>(lower="); |
+ LogParam(p.lower(), l); |
+ l->append(", upper="); |
+ LogParam(p.upper(), l); |
+ l->append(", lower_open="); |
+ LogParam(p.lowerOpen(), l); |
+ l->append(", upper_open="); |
+ LogParam(p.upperOpen(), l); |
+ l->append(")"); |
+} |
+ |
} // namespace IPC |