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 17 matching lines...) Expand all Loading... |
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 | 33 |
34 namespace blink { | 34 namespace blink { |
35 | 35 |
36 struct WebIDBMetadata { | 36 struct WebIDBMetadata { |
37 enum { | 37 enum { |
38 NoIntVersion = -1 | 38 NoVersion = -1 |
39 }; | 39 }; |
40 struct Index; | 40 struct Index; |
41 struct ObjectStore; | 41 struct ObjectStore; |
42 | 42 |
43 WebString name; | 43 WebString name; |
44 // FIXME: Both version members need to be present while we support both the | 44 long long version; |
45 // old setVersion and new upgradeneeded API. Once we no longer support | |
46 // setVersion, WebString version can be removed. | |
47 WebString version; | |
48 long long intVersion; | |
49 long long id; | 45 long long id; |
50 long long maxObjectStoreId; | 46 long long maxObjectStoreId; |
51 WebVector<ObjectStore> objectStores; | 47 WebVector<ObjectStore> objectStores; |
52 WebIDBMetadata() | 48 WebIDBMetadata() |
53 : intVersion(NoIntVersion) { } | 49 : version(NoVersion) |
| 50 { |
| 51 } |
54 | 52 |
55 struct ObjectStore { | 53 struct ObjectStore { |
56 WebString name; | 54 WebString name; |
57 WebIDBKeyPath keyPath; | 55 WebIDBKeyPath keyPath; |
58 bool autoIncrement; | 56 bool autoIncrement; |
59 long long id; | 57 long long id; |
60 long long maxIndexId; | 58 long long maxIndexId; |
61 WebVector<Index> indexes; | 59 WebVector<Index> indexes; |
62 ObjectStore() | 60 ObjectStore() |
63 : keyPath(WebIDBKeyPath::createNull()) | 61 : keyPath(WebIDBKeyPath::createNull()) |
(...skipping 10 matching lines...) Expand all Loading... |
74 : keyPath(WebIDBKeyPath::createNull()) | 72 : keyPath(WebIDBKeyPath::createNull()) |
75 , unique(false) | 73 , unique(false) |
76 , multiEntry(false) { } | 74 , multiEntry(false) { } |
77 }; | 75 }; |
78 | 76 |
79 }; | 77 }; |
80 | 78 |
81 } // namespace blink | 79 } // namespace blink |
82 | 80 |
83 #endif // WebIDBMetadata_h | 81 #endif // WebIDBMetadata_h |
OLD | NEW |