| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h" | 5 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnMetadata( | 337 void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnMetadata( |
| 338 int32 idb_database_id, IndexedDBDatabaseMetadata* metadata) { | 338 int32 idb_database_id, IndexedDBDatabaseMetadata* metadata) { |
| 339 WebIDBDatabase* idb_database = parent_->GetOrTerminateProcess( | 339 WebIDBDatabase* idb_database = parent_->GetOrTerminateProcess( |
| 340 &map_, idb_database_id); | 340 &map_, idb_database_id); |
| 341 if (!idb_database) | 341 if (!idb_database) |
| 342 return; | 342 return; |
| 343 | 343 |
| 344 WebIDBMetadata web_metadata = idb_database->metadata(); | 344 WebIDBMetadata web_metadata = idb_database->metadata(); |
| 345 metadata->name = web_metadata.name; | 345 metadata->name = web_metadata.name; |
| 346 metadata->version = web_metadata.version; | 346 metadata->version = web_metadata.version; |
| 347 metadata->intVersion = web_metadata.intVersion; | 347 metadata->int_version = web_metadata.intVersion; |
| 348 | 348 |
| 349 for (size_t i = 0; i < web_metadata.objectStores.size(); ++i) { | 349 for (size_t i = 0; i < web_metadata.objectStores.size(); ++i) { |
| 350 const WebIDBMetadata::ObjectStore& web_store_metadata = | 350 const WebIDBMetadata::ObjectStore& web_store_metadata = |
| 351 web_metadata.objectStores[i]; | 351 web_metadata.objectStores[i]; |
| 352 IndexedDBObjectStoreMetadata idb_store_metadata; | 352 IndexedDBObjectStoreMetadata idb_store_metadata; |
| 353 idb_store_metadata.name = web_store_metadata.name; | 353 idb_store_metadata.name = web_store_metadata.name; |
| 354 idb_store_metadata.keyPath = IndexedDBKeyPath(web_store_metadata.keyPath); | 354 idb_store_metadata.keyPath = IndexedDBKeyPath(web_store_metadata.keyPath); |
| 355 idb_store_metadata.autoIncrement = web_store_metadata.autoIncrement; | 355 idb_store_metadata.autoIncrement = web_store_metadata.autoIncrement; |
| 356 | 356 |
| 357 for (size_t j = 0; j < web_store_metadata.indexes.size(); ++j) { | 357 for (size_t j = 0; j < web_store_metadata.indexes.size(); ++j) { |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1101 } | 1101 } |
| 1102 | 1102 |
| 1103 void IndexedDBDispatcherHost::TransactionDispatcherHost::OnDestroyed( | 1103 void IndexedDBDispatcherHost::TransactionDispatcherHost::OnDestroyed( |
| 1104 int32 object_id) { | 1104 int32 object_id) { |
| 1105 // TODO(dgrogan): This doesn't seem to be happening with some version change | 1105 // TODO(dgrogan): This doesn't seem to be happening with some version change |
| 1106 // transactions. Possibly introduced with integer version support. | 1106 // transactions. Possibly introduced with integer version support. |
| 1107 transaction_size_map_.erase(object_id); | 1107 transaction_size_map_.erase(object_id); |
| 1108 transaction_url_map_.erase(object_id); | 1108 transaction_url_map_.erase(object_id); |
| 1109 parent_->DestroyObject(&map_, object_id); | 1109 parent_->DestroyObject(&map_, object_id); |
| 1110 } | 1110 } |
| OLD | NEW |