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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "content/browser/in_process_webkit/indexed_db_callbacks.h" | 10 #include "content/browser/in_process_webkit/indexed_db_callbacks.h" |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnMetadata( | 349 void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnMetadata( |
350 int32 idb_database_id, IndexedDBDatabaseMetadata* metadata) { | 350 int32 idb_database_id, IndexedDBDatabaseMetadata* metadata) { |
351 WebIDBDatabase* idb_database = parent_->GetOrTerminateProcess( | 351 WebIDBDatabase* idb_database = parent_->GetOrTerminateProcess( |
352 &map_, idb_database_id); | 352 &map_, idb_database_id); |
353 if (!idb_database) | 353 if (!idb_database) |
354 return; | 354 return; |
355 | 355 |
356 WebIDBMetadata web_metadata = idb_database->metadata(); | 356 WebIDBMetadata web_metadata = idb_database->metadata(); |
357 metadata->name = web_metadata.name; | 357 metadata->name = web_metadata.name; |
358 metadata->version = web_metadata.version; | 358 metadata->version = web_metadata.version; |
| 359 metadata->intVersion = web_metadata.intVersion; |
359 | 360 |
360 for (size_t i = 0; i < web_metadata.objectStores.size(); ++i) { | 361 for (size_t i = 0; i < web_metadata.objectStores.size(); ++i) { |
361 const WebIDBMetadata::ObjectStore& web_store_metadata = | 362 const WebIDBMetadata::ObjectStore& web_store_metadata = |
362 web_metadata.objectStores[i]; | 363 web_metadata.objectStores[i]; |
363 IndexedDBObjectStoreMetadata idb_store_metadata; | 364 IndexedDBObjectStoreMetadata idb_store_metadata; |
364 idb_store_metadata.name = web_store_metadata.name; | 365 idb_store_metadata.name = web_store_metadata.name; |
365 idb_store_metadata.keyPath = IndexedDBKeyPath(web_store_metadata.keyPath); | 366 idb_store_metadata.keyPath = IndexedDBKeyPath(web_store_metadata.keyPath); |
366 idb_store_metadata.autoIncrement = web_store_metadata.autoIncrement; | 367 idb_store_metadata.autoIncrement = web_store_metadata.autoIncrement; |
367 | 368 |
368 for (size_t j = 0; j < web_store_metadata.indexes.size(); ++j) { | 369 for (size_t j = 0; j < web_store_metadata.indexes.size(); ++j) { |
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1138 } | 1139 } |
1139 idb_transaction->didCompleteTaskEvents(); | 1140 idb_transaction->didCompleteTaskEvents(); |
1140 } | 1141 } |
1141 | 1142 |
1142 void IndexedDBDispatcherHost::TransactionDispatcherHost::OnDestroyed( | 1143 void IndexedDBDispatcherHost::TransactionDispatcherHost::OnDestroyed( |
1143 int32 object_id) { | 1144 int32 object_id) { |
1144 transaction_size_map_.erase(object_id); | 1145 transaction_size_map_.erase(object_id); |
1145 transaction_url_map_.erase(object_id); | 1146 transaction_url_map_.erase(object_id); |
1146 parent_->DestroyObject(&map_, object_id); | 1147 parent_->DestroyObject(&map_, object_id); |
1147 } | 1148 } |
OLD | NEW |