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

Unified Diff: content/common/indexed_db/indexed_db_struct_traits.h

Issue 2449953008: Port messages sent by WebIDBDatabaseImpl to Mojo. (Closed)
Patch Set: Address cmumford@ and jsbell@'s comments. Created 4 years, 1 month 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_struct_traits.h
diff --git a/content/common/indexed_db/indexed_db_struct_traits.h b/content/common/indexed_db/indexed_db_struct_traits.h
index 7c3effefbc9813d86b1d82f91492b5c3e40a0702..a4e24de3ee725e535ac6b8caf560eb65e0499439 100644
--- a/content/common/indexed_db/indexed_db_struct_traits.h
+++ b/content/common/indexed_db/indexed_db_struct_traits.h
@@ -11,6 +11,23 @@
namespace mojo {
template <>
+struct StructTraits<indexed_db::mojom::IndexKeysDataView,
+ content::IndexedDBIndexKeys> {
+ static int64_t index_id(const content::IndexedDBIndexKeys& index_keys) {
+ return index_keys.first;
+ }
+ static const std::vector<content::IndexedDBKey>& index_keys(
+ const content::IndexedDBIndexKeys& index_keys) {
+ return index_keys.second;
+ }
+ static bool Read(indexed_db::mojom::IndexKeysDataView data,
+ content::IndexedDBIndexKeys* out) {
+ out->first = data.index_id();
+ return data.ReadIndexKeys(&out->second);
dcheng 2016/11/03 04:27:04 Nit: out-of-line
Reilly Grant (use Gerrit) 2016/11/03 21:32:22 Done.
+ }
+};
+
+template <>
struct StructTraits<indexed_db::mojom::IndexMetadataDataView,
content::IndexedDBIndexMetadata> {
static int64_t id(const content::IndexedDBIndexMetadata& metadata) {

Powered by Google App Engine
This is Rietveld 408576698