Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Unified Diff: content/common/indexed_db/proxy_webidbdatabase_impl.cc

Issue 11791009: IPC implementation for create/delete ObjectStore/Index (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add HostTransactionId where appropriate Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/indexed_db/proxy_webidbdatabase_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/indexed_db/proxy_webidbdatabase_impl.cc
diff --git a/content/common/indexed_db/proxy_webidbdatabase_impl.cc b/content/common/indexed_db/proxy_webidbdatabase_impl.cc
index 2bf3999666754d312ee9c2c2a5cd3f7ec86adaea..46d6dc589cd4d3d9bccfbb46afbffb453bd8a30b 100644
--- a/content/common/indexed_db/proxy_webidbdatabase_impl.cc
+++ b/content/common/indexed_db/proxy_webidbdatabase_impl.cc
@@ -99,7 +99,7 @@ WebKit::WebIDBObjectStore* RendererWebIDBDatabaseImpl::createObjectStore(
bool auto_increment,
const WebKit::WebIDBTransaction& transaction,
WebExceptionCode& ec) {
- IndexedDBHostMsg_DatabaseCreateObjectStore_Params params;
+ IndexedDBHostMsg_DatabaseCreateObjectStoreOld_Params params;
params.id = id;
params.name = name;
params.key_path = IndexedDBKeyPath(key_path);
@@ -109,23 +109,51 @@ WebKit::WebIDBObjectStore* RendererWebIDBDatabaseImpl::createObjectStore(
int object_store;
IndexedDBDispatcher::Send(
- new IndexedDBHostMsg_DatabaseCreateObjectStore(
+ new IndexedDBHostMsg_DatabaseCreateObjectStoreOld(
params, &object_store, &ec));
if (!object_store)
return NULL;
return new RendererWebIDBObjectStoreImpl(object_store);
}
+void RendererWebIDBDatabaseImpl::createObjectStore(
+ long long transaction_id,
+ long long object_store_id,
+ const WebKit::WebString& name,
+ const WebKit::WebIDBKeyPath& key_path,
+ bool auto_increment) {
+ IndexedDBHostMsg_DatabaseCreateObjectStore_Params params;
+ params.ipc_database_id = ipc_database_id_;
+ params.transaction_id = transaction_id;
+ params.object_store_id = object_store_id;
+ params.name = name;
+ params.key_path = IndexedDBKeyPath(key_path);
+ params.auto_increment = auto_increment;
+
+ IndexedDBDispatcher::Send(
+ new IndexedDBHostMsg_DatabaseCreateObjectStore(params));
+}
+
void RendererWebIDBDatabaseImpl::deleteObjectStore(
long long object_store_id,
const WebIDBTransaction& transaction,
WebExceptionCode& ec) {
IndexedDBDispatcher::Send(
- new IndexedDBHostMsg_DatabaseDeleteObjectStore(
+ new IndexedDBHostMsg_DatabaseDeleteObjectStoreOld(
ipc_database_id_, object_store_id,
IndexedDBDispatcher::TransactionId(transaction), &ec));
}
+void RendererWebIDBDatabaseImpl::deleteObjectStore(
+ long long transaction_id,
+ long long object_store_id) {
+ IndexedDBDispatcher::Send(
+ new IndexedDBHostMsg_DatabaseDeleteObjectStore(
+ ipc_database_id_,
+ transaction_id,
+ object_store_id));
+}
+
WebKit::WebIDBTransaction* RendererWebIDBDatabaseImpl::createTransaction(
long long transaction_id,
const WebVector<long long>& object_store_ids,
@@ -273,4 +301,39 @@ void RendererWebIDBDatabaseImpl::clear(
ipc_database_id_,
transaction_id, object_store_id, callbacks);
}
+
+void RendererWebIDBDatabaseImpl::createIndex(
+ long long transaction_id,
+ long long object_store_id,
+ long long index_id,
+ const WebString& name,
+ const WebIDBKeyPath& key_path,
+ bool unique,
+ bool multi_entry)
+{
+ IndexedDBHostMsg_DatabaseCreateIndex_Params params;
+ params.ipc_database_id = ipc_database_id_;
+ params.transaction_id = transaction_id;
+ params.object_store_id = object_store_id;
+ params.index_id = index_id;
+ params.name = name;
+ params.key_path = IndexedDBKeyPath(key_path);
+ params.unique = unique;
+ params.multi_entry = multi_entry;
+
+ IndexedDBDispatcher::Send(
+ new IndexedDBHostMsg_DatabaseCreateIndex(params));
+}
+
+void RendererWebIDBDatabaseImpl::deleteIndex(
+ long long transaction_id,
+ long long object_store_id,
+ long long index_id)
+{
+ IndexedDBDispatcher::Send(
+ new IndexedDBHostMsg_DatabaseDeleteIndex(
+ ipc_database_id_,
+ transaction_id,
+ object_store_id, index_id));
+}
} // namespace content
« no previous file with comments | « content/common/indexed_db/proxy_webidbdatabase_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698