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

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

Issue 1966983003: Generate param traits size methods for IPC files in content/ (and traits it depends on). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix owners Created 4 years, 7 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
« no previous file with comments | « content/common/indexed_db/indexed_db_param_traits.h ('k') | content/common/input/input_param_traits.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c684e9f24d76da4a1adab4c3693ce3e068ff7347..afdf070d7c2f9e7959ed6fccdc7d651292936ea4 100644
--- a/content/common/indexed_db/indexed_db_param_traits.cc
+++ b/content/common/indexed_db/indexed_db_param_traits.cc
@@ -30,6 +30,35 @@ using blink::WebIDBKeyTypeString;
namespace IPC {
+void ParamTraits<IndexedDBKey>::GetSize(base::PickleSizer* s,
+ const param_type& p) {
+ GetParamSize(s, static_cast<int>(p.type()));
+ switch (p.type()) {
+ case WebIDBKeyTypeArray:
+ GetParamSize(s, p.array());
+ return;
+ case WebIDBKeyTypeBinary:
+ GetParamSize(s, p.binary());
+ return;
+ case WebIDBKeyTypeString:
+ GetParamSize(s, p.string());
+ return;
+ case WebIDBKeyTypeDate:
+ GetParamSize(s, p.date());
+ return;
+ case WebIDBKeyTypeNumber:
+ GetParamSize(s, p.number());
+ return;
+ case WebIDBKeyTypeInvalid:
+ case WebIDBKeyTypeNull:
+ return;
+ case WebIDBKeyTypeMin:
+ default:
+ NOTREACHED();
+ return;
+ }
+}
+
void ParamTraits<IndexedDBKey>::Write(base::Pickle* m, const param_type& p) {
WriteParam(m, static_cast<int>(p.type()));
switch (p.type()) {
@@ -153,6 +182,24 @@ void ParamTraits<IndexedDBKey>::Log(const param_type& p, std::string* l) {
l->append(")");
}
+void ParamTraits<IndexedDBKeyPath>::GetSize(base::PickleSizer* s,
+ const param_type& p) {
+ GetParamSize(s, static_cast<int>(p.type()));
+ switch (p.type()) {
+ case WebIDBKeyPathTypeArray:
+ GetParamSize(s, p.array());
+ return;
+ case WebIDBKeyPathTypeString:
+ GetParamSize(s, p.string());
+ return;
+ case WebIDBKeyPathTypeNull:
+ return;
+ default:
+ NOTREACHED();
+ return;
+ }
+}
+
void ParamTraits<IndexedDBKeyPath>::Write(base::Pickle* m,
const param_type& p) {
WriteParam(m, static_cast<int>(p.type()));
@@ -231,6 +278,14 @@ void ParamTraits<IndexedDBKeyPath>::Log(const param_type& p, std::string* l) {
l->append(")");
}
+void ParamTraits<IndexedDBKeyRange>::GetSize(base::PickleSizer* s,
+ const param_type& p) {
+ GetParamSize(s, p.lower());
+ GetParamSize(s, p.upper());
+ GetParamSize(s, p.lower_open());
+ GetParamSize(s, p.upper_open());
+}
+
void ParamTraits<IndexedDBKeyRange>::Write(base::Pickle* m,
const param_type& p) {
WriteParam(m, p.lower());
« no previous file with comments | « content/common/indexed_db/indexed_db_param_traits.h ('k') | content/common/input/input_param_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698