| 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 | 306 |
| 307 ~DatabaseLoader() override { } | 307 ~DatabaseLoader() override { } |
| 308 | 308 |
| 309 void execute(IDBDatabase* idbDatabase) override | 309 void execute(IDBDatabase* idbDatabase) override |
| 310 { | 310 { |
| 311 const IDBDatabaseMetadata databaseMetadata = idbDatabase->metadata(); | 311 const IDBDatabaseMetadata databaseMetadata = idbDatabase->metadata(); |
| 312 | 312 |
| 313 std::unique_ptr<protocol::Array<protocol::IndexedDB::ObjectStore>> objec
tStores = protocol::Array<protocol::IndexedDB::ObjectStore>::create(); | 313 std::unique_ptr<protocol::Array<protocol::IndexedDB::ObjectStore>> objec
tStores = protocol::Array<protocol::IndexedDB::ObjectStore>::create(); |
| 314 | 314 |
| 315 for (const auto& storeMapEntry : databaseMetadata.objectStores) { | 315 for (const auto& storeMapEntry : databaseMetadata.objectStores) { |
| 316 const IDBObjectStoreMetadata& objectStoreMetadata = storeMapEntry.va
lue; | 316 const IDBObjectStoreMetadata& objectStoreMetadata = *storeMapEntry.v
alue; |
| 317 | 317 |
| 318 std::unique_ptr<protocol::Array<protocol::IndexedDB::ObjectStoreInde
x>> indexes = protocol::Array<protocol::IndexedDB::ObjectStoreIndex>::create(); | 318 std::unique_ptr<protocol::Array<protocol::IndexedDB::ObjectStoreInde
x>> indexes = protocol::Array<protocol::IndexedDB::ObjectStoreIndex>::create(); |
| 319 | 319 |
| 320 for (const auto& metadataMapEntry : objectStoreMetadata.indexes) { | 320 for (const auto& metadataMapEntry : objectStoreMetadata.indexes) { |
| 321 const IDBIndexMetadata& indexMetadata = metadataMapEntry.value; | 321 const IDBIndexMetadata& indexMetadata = *metadataMapEntry.value; |
| 322 | 322 |
| 323 std::unique_ptr<ObjectStoreIndex> objectStoreIndex = ObjectStore
Index::create() | 323 std::unique_ptr<ObjectStoreIndex> objectStoreIndex = ObjectStore
Index::create() |
| 324 .setName(indexMetadata.name) | 324 .setName(indexMetadata.name) |
| 325 .setKeyPath(keyPathFromIDBKeyPath(indexMetadata.keyPath)) | 325 .setKeyPath(keyPathFromIDBKeyPath(indexMetadata.keyPath)) |
| 326 .setUnique(indexMetadata.unique) | 326 .setUnique(indexMetadata.unique) |
| 327 .setMultiEntry(indexMetadata.multiEntry).build(); | 327 .setMultiEntry(indexMetadata.multiEntry).build(); |
| 328 indexes->addItem(std::move(objectStoreIndex)); | 328 indexes->addItem(std::move(objectStoreIndex)); |
| 329 } | 329 } |
| 330 | 330 |
| 331 std::unique_ptr<ObjectStore> objectStore = ObjectStore::create() | 331 std::unique_ptr<ObjectStore> objectStore = ObjectStore::create() |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 clearObjectStore->start(idbFactory, document->getSecurityOrigin(), databaseN
ame); | 826 clearObjectStore->start(idbFactory, document->getSecurityOrigin(), databaseN
ame); |
| 827 } | 827 } |
| 828 | 828 |
| 829 DEFINE_TRACE(InspectorIndexedDBAgent) | 829 DEFINE_TRACE(InspectorIndexedDBAgent) |
| 830 { | 830 { |
| 831 visitor->trace(m_inspectedFrames); | 831 visitor->trace(m_inspectedFrames); |
| 832 InspectorBaseAgent::trace(visitor); | 832 InspectorBaseAgent::trace(visitor); |
| 833 } | 833 } |
| 834 | 834 |
| 835 } // namespace blink | 835 } // namespace blink |
| OLD | NEW |