| 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 } | 329 } |
| 330 | 330 |
| 331 std::unique_ptr<ObjectStore> objectStore = ObjectStore::create() | 331 std::unique_ptr<ObjectStore> objectStore = ObjectStore::create() |
| 332 .setName(objectStoreMetadata.name) | 332 .setName(objectStoreMetadata.name) |
| 333 .setKeyPath(keyPathFromIDBKeyPath(objectStoreMetadata.keyPath)) | 333 .setKeyPath(keyPathFromIDBKeyPath(objectStoreMetadata.keyPath)) |
| 334 .setAutoIncrement(objectStoreMetadata.autoIncrement) | 334 .setAutoIncrement(objectStoreMetadata.autoIncrement) |
| 335 .setIndexes(std::move(indexes)).build(); | 335 .setIndexes(std::move(indexes)).build(); |
| 336 objectStores->addItem(std::move(objectStore)); | 336 objectStores->addItem(std::move(objectStore)); |
| 337 } | 337 } |
| 338 std::unique_ptr<DatabaseWithObjectStores> result = DatabaseWithObjectSto
res::create() | 338 std::unique_ptr<DatabaseWithObjectStores> result = DatabaseWithObjectSto
res::create() |
| 339 .setName(databaseMetadata.name) | 339 .setName(idbDatabase->name()) |
| 340 .setVersion(databaseMetadata.version) | 340 .setVersion(idbDatabase->version()) |
| 341 .setObjectStores(std::move(objectStores)).build(); | 341 .setObjectStores(std::move(objectStores)).build(); |
| 342 | 342 |
| 343 m_requestCallback->sendSuccess(std::move(result)); | 343 m_requestCallback->sendSuccess(std::move(result)); |
| 344 } | 344 } |
| 345 | 345 |
| 346 RequestCallback* getRequestCallback() override { return m_requestCallback.ge
t(); } | 346 RequestCallback* getRequestCallback() override { return m_requestCallback.ge
t(); } |
| 347 private: | 347 private: |
| 348 DatabaseLoader(ScriptState* scriptState, std::unique_ptr<RequestDatabaseCall
back> requestCallback) | 348 DatabaseLoader(ScriptState* scriptState, std::unique_ptr<RequestDatabaseCall
back> requestCallback) |
| 349 : ExecutableWithDatabase(scriptState) | 349 : ExecutableWithDatabase(scriptState) |
| 350 , m_requestCallback(std::move(requestCallback)) { } | 350 , m_requestCallback(std::move(requestCallback)) { } |
| (...skipping 475 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 |