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

Unified Diff: content/common/indexed_db/indexed_db_param_traits.cc

Issue 9389025: IndexedDB: Implement IPC plumbing for IDBObjectStore.delete(IDBKeyRange) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename to avoid overloading, remove bad includes Created 8 years, 10 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: 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
« no previous file with comments | « content/common/indexed_db/indexed_db_param_traits.h ('k') | content/common/indexed_db/proxy_webidbobjectstore_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698