| Index: third_party/WebKit/Source/modules/indexeddb/IDBMetadata.cpp
|
| diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBMetadata.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBMetadata.cpp
|
| index e2b28eae4389b401287565c39ae6c90b2904903c..41157696a11953f686d0a05c0ae53b84a8d540d0 100644
|
| --- a/third_party/WebKit/Source/modules/indexeddb/IDBMetadata.cpp
|
| +++ b/third_party/WebKit/Source/modules/indexeddb/IDBMetadata.cpp
|
| @@ -4,23 +4,22 @@
|
|
|
| #include "modules/indexeddb/IDBMetadata.h"
|
|
|
| -#include "public/platform/modules/indexeddb/WebIDBMetadata.h"
|
| -
|
| namespace blink {
|
|
|
| -IDBDatabaseMetadata::IDBDatabaseMetadata(const WebIDBMetadata& webMetadata)
|
| - : name(webMetadata.name)
|
| - , id(webMetadata.id)
|
| - , version(webMetadata.version)
|
| - , maxObjectStoreId(webMetadata.maxObjectStoreId)
|
| +IDBDatabaseMetadata::IDBDatabaseMetadata(indexed_db::mojom::blink::DatabaseMetadataPtr databaseMetadata)
|
| + : name(databaseMetadata->name)
|
| + , id(databaseMetadata->id)
|
| + , version(databaseMetadata->version)
|
| + , maxObjectStoreId(databaseMetadata->max_object_store_id)
|
| {
|
| - for (size_t i = 0; i < webMetadata.objectStores.size(); ++i) {
|
| - const WebIDBMetadata::ObjectStore webObjectStore = webMetadata.objectStores[i];
|
| - IDBObjectStoreMetadata objectStore(webObjectStore.name, webObjectStore.id, IDBKeyPath(webObjectStore.keyPath), webObjectStore.autoIncrement, webObjectStore.maxIndexId);
|
|
|
| - for (size_t j = 0; j < webObjectStore.indexes.size(); ++j) {
|
| - const WebIDBMetadata::Index webIndex = webObjectStore.indexes[j];
|
| - IDBIndexMetadata index(webIndex.name, webIndex.id, IDBKeyPath(webIndex.keyPath), webIndex.unique, webIndex.multiEntry);
|
| + for (size_t idxStore = 0; idxStore < databaseMetadata->object_stores.size(); idxStore++) {
|
| + const auto& storeMetadata = databaseMetadata->object_stores[idxStore];
|
| + IDBObjectStoreMetadata objectStore(storeMetadata->name, storeMetadata->id, IDBKeyPath(storeMetadata->key_path), storeMetadata->auto_increment, storeMetadata->max_index_id);
|
| +
|
| + for (size_t idxIndex = 0; idxIndex < storeMetadata->indexes.size(); idxIndex++) {
|
| + const auto& indexMetadata = storeMetadata->indexes[idxIndex];
|
| + IDBIndexMetadata index(indexMetadata->name, indexMetadata->id, IDBKeyPath(indexMetadata->key_path), indexMetadata->unique, indexMetadata->multi_entry);
|
| objectStore.indexes.set(index.id, index);
|
| }
|
| objectStores.set(objectStore.id, objectStore);
|
|
|