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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 ~DatabaseLoader() override {} | 336 ~DatabaseLoader() override {} |
337 | 337 |
338 void execute(IDBDatabase* idbDatabase) override { | 338 void execute(IDBDatabase* idbDatabase) override { |
339 const IDBDatabaseMetadata databaseMetadata = idbDatabase->metadata(); | 339 const IDBDatabaseMetadata databaseMetadata = idbDatabase->metadata(); |
340 | 340 |
341 std::unique_ptr<protocol::Array<protocol::IndexedDB::ObjectStore>> | 341 std::unique_ptr<protocol::Array<protocol::IndexedDB::ObjectStore>> |
342 objectStores = | 342 objectStores = |
343 protocol::Array<protocol::IndexedDB::ObjectStore>::create(); | 343 protocol::Array<protocol::IndexedDB::ObjectStore>::create(); |
344 | 344 |
345 for (const auto& storeMapEntry : databaseMetadata.objectStores) { | 345 for (const auto& storeMapEntry : databaseMetadata.objectStores) { |
346 const IDBObjectStoreMetadata& objectStoreMetadata = storeMapEntry.value; | 346 const IDBObjectStoreMetadata& objectStoreMetadata = *storeMapEntry.value; |
347 | 347 |
348 std::unique_ptr<protocol::Array<protocol::IndexedDB::ObjectStoreIndex>> | 348 std::unique_ptr<protocol::Array<protocol::IndexedDB::ObjectStoreIndex>> |
349 indexes = | 349 indexes = |
350 protocol::Array<protocol::IndexedDB::ObjectStoreIndex>::create(); | 350 protocol::Array<protocol::IndexedDB::ObjectStoreIndex>::create(); |
351 | 351 |
352 for (const auto& metadataMapEntry : objectStoreMetadata.indexes) { | 352 for (const auto& metadataMapEntry : objectStoreMetadata.indexes) { |
353 const IDBIndexMetadata& indexMetadata = metadataMapEntry.value; | 353 const IDBIndexMetadata& indexMetadata = *metadataMapEntry.value; |
354 | 354 |
355 std::unique_ptr<ObjectStoreIndex> objectStoreIndex = | 355 std::unique_ptr<ObjectStoreIndex> objectStoreIndex = |
356 ObjectStoreIndex::create() | 356 ObjectStoreIndex::create() |
357 .setName(indexMetadata.name) | 357 .setName(indexMetadata.name) |
358 .setKeyPath(keyPathFromIDBKeyPath(indexMetadata.keyPath)) | 358 .setKeyPath(keyPathFromIDBKeyPath(indexMetadata.keyPath)) |
359 .setUnique(indexMetadata.unique) | 359 .setUnique(indexMetadata.unique) |
360 .setMultiEntry(indexMetadata.multiEntry) | 360 .setMultiEntry(indexMetadata.multiEntry) |
361 .build(); | 361 .build(); |
362 indexes->addItem(std::move(objectStoreIndex)); | 362 indexes->addItem(std::move(objectStoreIndex)); |
363 } | 363 } |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 clearObjectStore->start(idbFactory, document->getSecurityOrigin(), | 926 clearObjectStore->start(idbFactory, document->getSecurityOrigin(), |
927 databaseName); | 927 databaseName); |
928 } | 928 } |
929 | 929 |
930 DEFINE_TRACE(InspectorIndexedDBAgent) { | 930 DEFINE_TRACE(InspectorIndexedDBAgent) { |
931 visitor->trace(m_inspectedFrames); | 931 visitor->trace(m_inspectedFrames); |
932 InspectorBaseAgent::trace(visitor); | 932 InspectorBaseAgent::trace(visitor); |
933 } | 933 } |
934 | 934 |
935 } // namespace blink | 935 } // namespace blink |
OLD | NEW |