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 30 matching lines...) Expand all Loading... |
41 } | 41 } |
42 | 42 |
43 WebIDBMetadata RendererWebIDBDatabaseImpl::metadata() const { | 43 WebIDBMetadata RendererWebIDBDatabaseImpl::metadata() const { |
44 IndexedDBDatabaseMetadata idb_metadata; | 44 IndexedDBDatabaseMetadata idb_metadata; |
45 IndexedDBDispatcher::Send( | 45 IndexedDBDispatcher::Send( |
46 new IndexedDBHostMsg_DatabaseMetadata(idb_database_id_, &idb_metadata)); | 46 new IndexedDBHostMsg_DatabaseMetadata(idb_database_id_, &idb_metadata)); |
47 | 47 |
48 WebIDBMetadata web_metadata; | 48 WebIDBMetadata web_metadata; |
49 web_metadata.name = idb_metadata.name; | 49 web_metadata.name = idb_metadata.name; |
50 web_metadata.version = idb_metadata.version; | 50 web_metadata.version = idb_metadata.version; |
| 51 web_metadata.intVersion = idb_metadata.intVersion; |
51 web_metadata.objectStores = WebVector<WebIDBMetadata::ObjectStore>( | 52 web_metadata.objectStores = WebVector<WebIDBMetadata::ObjectStore>( |
52 idb_metadata.object_stores.size()); | 53 idb_metadata.object_stores.size()); |
53 | 54 |
54 for (size_t i = 0; i < idb_metadata.object_stores.size(); ++i) { | 55 for (size_t i = 0; i < idb_metadata.object_stores.size(); ++i) { |
55 const IndexedDBObjectStoreMetadata& idb_store_metadata = | 56 const IndexedDBObjectStoreMetadata& idb_store_metadata = |
56 idb_metadata.object_stores[i]; | 57 idb_metadata.object_stores[i]; |
57 WebIDBMetadata::ObjectStore& web_store_metadata = | 58 WebIDBMetadata::ObjectStore& web_store_metadata = |
58 web_metadata.objectStores[i]; | 59 web_metadata.objectStores[i]; |
59 | 60 |
60 web_store_metadata.name = idb_store_metadata.name; | 61 web_store_metadata.name = idb_store_metadata.name; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 IndexedDBDispatcher::ThreadSpecificInstance(); | 145 IndexedDBDispatcher::ThreadSpecificInstance(); |
145 dispatcher->RequestIDBDatabaseClose(idb_database_id_); | 146 dispatcher->RequestIDBDatabaseClose(idb_database_id_); |
146 } | 147 } |
147 | 148 |
148 void RendererWebIDBDatabaseImpl::open(WebIDBDatabaseCallbacks* callbacks) { | 149 void RendererWebIDBDatabaseImpl::open(WebIDBDatabaseCallbacks* callbacks) { |
149 IndexedDBDispatcher* dispatcher = | 150 IndexedDBDispatcher* dispatcher = |
150 IndexedDBDispatcher::ThreadSpecificInstance(); | 151 IndexedDBDispatcher::ThreadSpecificInstance(); |
151 DCHECK(dispatcher); | 152 DCHECK(dispatcher); |
152 dispatcher->RequestIDBDatabaseOpen(callbacks, idb_database_id_); | 153 dispatcher->RequestIDBDatabaseOpen(callbacks, idb_database_id_); |
153 } | 154 } |
OLD | NEW |