Chromium Code Reviews| Index: content/common/indexed_db/indexed_db.mojom |
| diff --git a/content/common/indexed_db/indexed_db.mojom b/content/common/indexed_db/indexed_db.mojom |
| index b715909b9967a1299bd6577488613056b3a88fdf..2574aa62fcaf494c68dc3c6eb98a51797cf79c2c 100644 |
| --- a/content/common/indexed_db/indexed_db.mojom |
| +++ b/content/common/indexed_db/indexed_db.mojom |
| @@ -23,14 +23,44 @@ enum DataLoss { |
| Total, |
| }; |
| -[Native] |
| -struct Key; |
| +// Represents key types that hold no data and so cannot be options in the |
| +// KeyData union. |
| +enum DatalessKeyType { |
| + Invalid, |
| + Null, |
| +}; |
| -[Native] |
| -struct KeyPath; |
| +union KeyData { |
| + array<Key> key_array; |
| + array<uint8> binary; |
| + mojo.common.mojom.String16 string; |
| + double date; |
| + double number; |
| + DatalessKeyType other; |
|
jsbell
2016/11/17 04:32:42
Ugh. I remember this falling out of very early Web
Reilly Grant (use Gerrit)
2016/11/17 21:31:17
Added a little TODO.
|
| +}; |
| -[Native] |
| -struct KeyRange; |
| +// Defined as a structure so that it can by typemapped with StructTraits. |
| +struct Key { |
| + KeyData data; |
| +}; |
| + |
| +// Represents WebIDBKeyPathTypeString and WebIDBKeyPathTypeArray in a key path. |
| +union KeyPathData { |
| + mojo.common.mojom.String16 string; |
| + array<mojo.common.mojom.String16> string_array; |
| +}; |
| + |
| +struct KeyPath { |
| + // A null value here corresponds to WebIDBKeyPathTypeNull. |
| + KeyPathData? data; |
| +}; |
| + |
| +struct KeyRange { |
| + Key lower; |
| + Key upper; |
| + bool lower_open; |
| + bool upper_open; |
| +}; |
| enum PutMode { |
| AddOrUpdate, |