| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef WebIDBMetadata_h | 26 #ifndef WebIDBMetadata_h |
| 27 #define WebIDBMetadata_h | 27 #define WebIDBMetadata_h |
| 28 | 28 |
| 29 #include "public/platform/WebCommon.h" | 29 #include "public/platform/WebCommon.h" |
| 30 #include "public/platform/WebString.h" | 30 #include "public/platform/WebString.h" |
| 31 #include "public/platform/WebVector.h" | 31 #include "public/platform/WebVector.h" |
| 32 #include "public/platform/modules/indexeddb/WebIDBKeyPath.h" | 32 #include "public/platform/modules/indexeddb/WebIDBKeyPath.h" |
| 33 #include "public/platform/modules/indexeddb/indexed_db.mojom-blink.h" |
| 33 | 34 |
| 34 namespace blink { | 35 namespace blink { |
| 35 | 36 |
| 36 struct WebIDBMetadata { | 37 struct WebIDBMetadata { |
| 37 enum { | 38 enum { |
| 38 NoVersion = -1 | 39 NoVersion = -1 |
| 39 }; | 40 }; |
| 40 struct Index; | 41 struct Index; |
| 41 struct ObjectStore; | 42 struct ObjectStore; |
| 42 | 43 |
| 43 WebString name; | 44 WebString name; |
| 44 long long version; | 45 long long version; |
| 45 long long id; | 46 long long id; |
| 46 long long maxObjectStoreId; | 47 long long maxObjectStoreId; |
| 47 WebVector<ObjectStore> objectStores; | 48 WebVector<ObjectStore> objectStores; |
| 48 WebIDBMetadata() | 49 WebIDBMetadata() |
| 49 : version(NoVersion) | 50 : version(NoVersion) |
| 50 { | 51 { |
| 51 } | 52 } |
| 52 | 53 |
| 53 struct ObjectStore { | 54 struct ObjectStore { |
| 54 WebString name; | 55 WebString name; |
| 55 WebIDBKeyPath keyPath; | 56 indexed_db::mojom::blink::KeyPathPtr keyPath; |
| 56 bool autoIncrement; | 57 bool autoIncrement; |
| 57 long long id; | 58 long long id; |
| 58 long long maxIndexId; | 59 long long maxIndexId; |
| 59 WebVector<Index> indexes; | 60 WebVector<Index> indexes; |
| 60 ObjectStore() | 61 ObjectStore() |
| 61 : keyPath(WebIDBKeyPath::createNull()) | 62 : autoIncrement(false) |
| 62 , autoIncrement(false) { } | 63 { |
| 64 } |
| 63 }; | 65 }; |
| 64 | 66 |
| 65 struct Index { | 67 struct Index { |
| 66 WebString name; | 68 WebString name; |
| 67 WebIDBKeyPath keyPath; | 69 indexed_db::mojom::blink::KeyPathPtr keyPath; |
| 68 bool unique; | 70 bool unique; |
| 69 bool multiEntry; | 71 bool multiEntry; |
| 70 long long id; | 72 long long id; |
| 71 Index() | 73 Index() |
| 72 : keyPath(WebIDBKeyPath::createNull()) | 74 : unique(false) |
| 73 , unique(false) | 75 , multiEntry(false) |
| 74 , multiEntry(false) { } | 76 { |
| 77 } |
| 75 }; | 78 }; |
| 76 | 79 |
| 77 }; | 80 }; |
| 78 | 81 |
| 79 } // namespace blink | 82 } // namespace blink |
| 80 | 83 |
| 81 #endif // WebIDBMetadata_h | 84 #endif // WebIDBMetadata_h |
| OLD | NEW |