| 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/common/indexed_db/proxy_webidbdatabase_impl.h" | 5 #include "content/common/indexed_db/proxy_webidbdatabase_impl.h" |
| 6 | 6 |
| 7 #include "content/common/child_thread.h" | 7 #include "content/common/child_thread.h" |
| 8 #include "content/common/indexed_db/indexed_db_messages.h" | 8 #include "content/common/indexed_db/indexed_db_messages.h" |
| 9 #include "content/common/indexed_db/indexed_db_dispatcher.h" | 9 #include "content/common/indexed_db/indexed_db_dispatcher.h" |
| 10 #include "content/common/indexed_db/proxy_webidbobjectstore_impl.h" | 10 #include "content/common/indexed_db/proxy_webidbobjectstore_impl.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 } | 44 } |
| 45 | 45 |
| 46 WebIDBMetadata RendererWebIDBDatabaseImpl::metadata() const { | 46 WebIDBMetadata RendererWebIDBDatabaseImpl::metadata() const { |
| 47 IndexedDBDatabaseMetadata idb_metadata; | 47 IndexedDBDatabaseMetadata idb_metadata; |
| 48 IndexedDBDispatcher::Send( | 48 IndexedDBDispatcher::Send( |
| 49 new IndexedDBHostMsg_DatabaseMetadata(idb_database_id_, &idb_metadata)); | 49 new IndexedDBHostMsg_DatabaseMetadata(idb_database_id_, &idb_metadata)); |
| 50 | 50 |
| 51 WebIDBMetadata web_metadata; | 51 WebIDBMetadata web_metadata; |
| 52 web_metadata.name = idb_metadata.name; | 52 web_metadata.name = idb_metadata.name; |
| 53 web_metadata.version = idb_metadata.version; | 53 web_metadata.version = idb_metadata.version; |
| 54 web_metadata.intVersion = idb_metadata.intVersion; | 54 web_metadata.intVersion = idb_metadata.int_version; |
| 55 web_metadata.objectStores = WebVector<WebIDBMetadata::ObjectStore>( | 55 web_metadata.objectStores = WebVector<WebIDBMetadata::ObjectStore>( |
| 56 idb_metadata.object_stores.size()); | 56 idb_metadata.object_stores.size()); |
| 57 | 57 |
| 58 for (size_t i = 0; i < idb_metadata.object_stores.size(); ++i) { | 58 for (size_t i = 0; i < idb_metadata.object_stores.size(); ++i) { |
| 59 const IndexedDBObjectStoreMetadata& idb_store_metadata = | 59 const IndexedDBObjectStoreMetadata& idb_store_metadata = |
| 60 idb_metadata.object_stores[i]; | 60 idb_metadata.object_stores[i]; |
| 61 WebIDBMetadata::ObjectStore& web_store_metadata = | 61 WebIDBMetadata::ObjectStore& web_store_metadata = |
| 62 web_metadata.objectStores[i]; | 62 web_metadata.objectStores[i]; |
| 63 | 63 |
| 64 web_store_metadata.name = idb_store_metadata.name; | 64 web_store_metadata.name = idb_store_metadata.name; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 if (!transaction_id) | 141 if (!transaction_id) |
| 142 return NULL; | 142 return NULL; |
| 143 return new RendererWebIDBTransactionImpl(transaction_id); | 143 return new RendererWebIDBTransactionImpl(transaction_id); |
| 144 } | 144 } |
| 145 | 145 |
| 146 void RendererWebIDBDatabaseImpl::close() { | 146 void RendererWebIDBDatabaseImpl::close() { |
| 147 IndexedDBDispatcher* dispatcher = | 147 IndexedDBDispatcher* dispatcher = |
| 148 IndexedDBDispatcher::ThreadSpecificInstance(); | 148 IndexedDBDispatcher::ThreadSpecificInstance(); |
| 149 dispatcher->RequestIDBDatabaseClose(idb_database_id_); | 149 dispatcher->RequestIDBDatabaseClose(idb_database_id_); |
| 150 } | 150 } |
| OLD | NEW |