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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 static const int64_t InvalidId = -1; | 76 static const int64_t InvalidId = -1; |
77 | 77 |
78 typedef HashMap<int64_t, IDBIndexMetadata> IndexMap; | 78 typedef HashMap<int64_t, IDBIndexMetadata> IndexMap; |
79 IndexMap indexes; | 79 IndexMap indexes; |
80 }; | 80 }; |
81 | 81 |
82 struct IDBDatabaseMetadata { | 82 struct IDBDatabaseMetadata { |
83 DISALLOW_NEW(); | 83 DISALLOW_NEW(); |
84 // FIXME: These can probably be collapsed into 0. | 84 // FIXME: These can probably be collapsed into 0. |
85 enum { | 85 enum { |
86 NoIntVersion = -1, | 86 NoVersion = -1, |
87 DefaultIntVersion = 0 | 87 DefaultVersion = 0 |
88 }; | 88 }; |
89 | 89 |
90 typedef HashMap<int64_t, IDBObjectStoreMetadata> ObjectStoreMap; | 90 typedef HashMap<int64_t, IDBObjectStoreMetadata> ObjectStoreMap; |
91 | 91 |
92 IDBDatabaseMetadata() | 92 IDBDatabaseMetadata() |
93 : intVersion(NoIntVersion) | 93 : version(NoVersion) |
94 { | 94 { |
95 } | 95 } |
96 | 96 |
97 IDBDatabaseMetadata(const String& name, int64_t id, int64_t intVersion, int6
4_t maxObjectStoreId) | 97 IDBDatabaseMetadata(const String& name, int64_t id, int64_t version, int64_t
maxObjectStoreId) |
98 : name(name) | 98 : name(name) |
99 , id(id) | 99 , id(id) |
100 , intVersion(intVersion) | 100 , version(version) |
101 , maxObjectStoreId(maxObjectStoreId) | 101 , maxObjectStoreId(maxObjectStoreId) |
102 { | 102 { |
103 } | 103 } |
104 | 104 |
105 explicit IDBDatabaseMetadata(const WebIDBMetadata&); | 105 explicit IDBDatabaseMetadata(const WebIDBMetadata&); |
106 | 106 |
107 String name; | 107 String name; |
108 int64_t id; | 108 int64_t id; |
109 int64_t intVersion; | 109 int64_t version; |
110 int64_t maxObjectStoreId; | 110 int64_t maxObjectStoreId; |
111 | 111 |
112 ObjectStoreMap objectStores; | 112 ObjectStoreMap objectStores; |
113 }; | 113 }; |
114 | 114 |
115 } // namespace blink | 115 } // namespace blink |
116 | 116 |
117 #endif // IDBMetadata_h | 117 #endif // IDBMetadata_h |
OLD | NEW |