summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/indexed_db_dispatcher.cc
diff options
context:
space:
mode:
authorjorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-23 13:34:02 +0000
committerjorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-23 13:34:02 +0000
commitd5fbd539696b1b88a14060ec1e28da9b942ac0c5 (patch)
tree261eda13e6d840f4c48a8d76af2888129e91e8aa /chrome/renderer/indexed_db_dispatcher.cc
parent378eba1a0a9b667759e27abbb1adfb38e55ffe9f (diff)
downloadchromium_src-d5fbd539696b1b88a14060ec1e28da9b942ac0c5.zip
chromium_src-d5fbd539696b1b88a14060ec1e28da9b942ac0c5.tar.gz
chromium_src-d5fbd539696b1b88a14060ec1e28da9b942ac0c5.tar.bz2
Revert my revert of 60275 + don't do static casting + disable the tests for now.
TEST=none BUG=none Review URL: http://codereview.chromium.org/3435022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60283 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/indexed_db_dispatcher.cc')
-rw-r--r--chrome/renderer/indexed_db_dispatcher.cc80
1 files changed, 54 insertions, 26 deletions
diff --git a/chrome/renderer/indexed_db_dispatcher.cc b/chrome/renderer/indexed_db_dispatcher.cc
index 3ba6f08..813a4fc 100644
--- a/chrome/renderer/indexed_db_dispatcher.cc
+++ b/chrome/renderer/indexed_db_dispatcher.cc
@@ -150,8 +150,11 @@ void IndexedDBDispatcher::RequestIDBDatabaseSetVersion(
}
void IndexedDBDispatcher::RequestIDBIndexOpenObjectCursor(
- const WebIDBKeyRange& idb_key_range, unsigned short direction,
- WebIDBCallbacks* callbacks_ptr, int32 idb_index_id) {
+ const WebIDBKeyRange& idb_key_range,
+ unsigned short direction,
+ WebIDBCallbacks* callbacks_ptr,
+ int32 idb_index_id,
+ int transaction_id) {
scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
ViewHostMsg_IDBIndexOpenCursor_Params params;
params.response_id_ = pending_callbacks_.Add(callbacks.release());
@@ -160,13 +163,17 @@ void IndexedDBDispatcher::RequestIDBIndexOpenObjectCursor(
params.key_flags_ = idb_key_range.flags();
params.direction_ = direction;
params.idb_index_id_ = idb_index_id;
+ params.transaction_id_ = transaction_id;
RenderThread::current()->Send(
new ViewHostMsg_IDBIndexOpenObjectCursor(params));
}
void IndexedDBDispatcher::RequestIDBIndexOpenCursor(
- const WebIDBKeyRange& idb_key_range, unsigned short direction,
- WebIDBCallbacks* callbacks_ptr, int32 idb_index_id) {
+ const WebIDBKeyRange& idb_key_range,
+ unsigned short direction,
+ WebIDBCallbacks* callbacks_ptr,
+ int32 idb_index_id,
+ int transaction_id) {
scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
ViewHostMsg_IDBIndexOpenCursor_Params params;
params.response_id_ = pending_callbacks_.Add(callbacks.release());
@@ -175,62 +182,79 @@ void IndexedDBDispatcher::RequestIDBIndexOpenCursor(
params.key_flags_ = idb_key_range.flags();
params.direction_ = direction;
params.idb_index_id_ = idb_index_id;
+ params.transaction_id_ = transaction_id;
RenderThread::current()->Send(
new ViewHostMsg_IDBIndexOpenCursor(params));
}
void IndexedDBDispatcher::RequestIDBIndexGetObject(
- const IndexedDBKey& key, WebKit::WebIDBCallbacks* callbacks_ptr,
- int32 idb_index_id) {
+ const IndexedDBKey& key,
+ WebKit::WebIDBCallbacks* callbacks_ptr,
+ int32 idb_index_id,
+ int transaction_id) {
scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
RenderThread::current()->Send(
new ViewHostMsg_IDBIndexGetObject(
- idb_index_id, pending_callbacks_.Add(callbacks.release()), key));
+ idb_index_id, pending_callbacks_.Add(callbacks.release()), key,
+ transaction_id));
}
void IndexedDBDispatcher::RequestIDBIndexGet(
- const IndexedDBKey& key, WebKit::WebIDBCallbacks* callbacks_ptr,
- int32 idb_index_id) {
+ const IndexedDBKey& key,
+ WebKit::WebIDBCallbacks* callbacks_ptr,
+ int32 idb_index_id,
+ int transaction_id) {
scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
RenderThread::current()->Send(
new ViewHostMsg_IDBIndexGet(
- idb_index_id, pending_callbacks_.Add(callbacks.release()), key));
+ idb_index_id, pending_callbacks_.Add(callbacks.release()), key,
+ transaction_id));
}
void IndexedDBDispatcher::RequestIDBObjectStoreGet(
- const IndexedDBKey& key, WebKit::WebIDBCallbacks* callbacks_ptr,
- int32 idb_object_store_id) {
+ const IndexedDBKey& key,
+ WebKit::WebIDBCallbacks* callbacks_ptr,
+ int32 idb_object_store_id,
+ int transaction_id) {
scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
RenderThread::current()->Send(
new ViewHostMsg_IDBObjectStoreGet(
idb_object_store_id, pending_callbacks_.Add(callbacks.release()),
- key));
+ key, transaction_id));
}
void IndexedDBDispatcher::RequestIDBObjectStorePut(
- const SerializedScriptValue& value, const IndexedDBKey& key,
- bool add_only, WebKit::WebIDBCallbacks* callbacks_ptr,
- int32 idb_object_store_id) {
+ const SerializedScriptValue& value,
+ const IndexedDBKey& key,
+ bool add_only,
+ WebKit::WebIDBCallbacks* callbacks_ptr,
+ int32 idb_object_store_id,
+ int transaction_id) {
scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
-
- RenderThread::current()->Send(
- new ViewHostMsg_IDBObjectStorePut(
- idb_object_store_id, pending_callbacks_.Add(callbacks.release()),
- value, key, add_only));
+ ViewHostMsg_IDBObjectStorePut_Params params;
+ params.idb_object_store_id_ = idb_object_store_id;
+ params.response_id_ = pending_callbacks_.Add(callbacks.release());
+ params.serialized_value_ = value;
+ params.key_ = key;
+ params.add_only_ = add_only;
+ params.transaction_id_ = transaction_id;
+ RenderThread::current()->Send(new ViewHostMsg_IDBObjectStorePut(params));
}
void IndexedDBDispatcher::RequestIDBObjectStoreRemove(
- const IndexedDBKey& key, WebKit::WebIDBCallbacks* callbacks_ptr,
- int32 idb_object_store_id) {
+ const IndexedDBKey& key,
+ WebKit::WebIDBCallbacks* callbacks_ptr,
+ int32 idb_object_store_id,
+ int transaction_id) {
scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
RenderThread::current()->Send(
new ViewHostMsg_IDBObjectStoreRemove(
idb_object_store_id, pending_callbacks_.Add(callbacks.release()),
- key));
+ key, transaction_id));
}
void IndexedDBDispatcher::RequestIDBObjectStoreCreateIndex(
@@ -260,8 +284,11 @@ void IndexedDBDispatcher::RequestIDBObjectStoreRemoveIndex(
}
void IndexedDBDispatcher::RequestIDBObjectStoreOpenCursor(
- const WebIDBKeyRange& idb_key_range, unsigned short direction,
- WebIDBCallbacks* callbacks_ptr, int32 idb_object_store_id) {
+ const WebIDBKeyRange& idb_key_range,
+ unsigned short direction,
+ WebIDBCallbacks* callbacks_ptr,
+ int32 idb_object_store_id,
+ int transaction_id) {
scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
ViewHostMsg_IDBObjectStoreOpenCursor_Params params;
params.response_id_ = pending_callbacks_.Add(callbacks.release());
@@ -270,6 +297,7 @@ void IndexedDBDispatcher::RequestIDBObjectStoreOpenCursor(
params.flags_ = idb_key_range.flags();
params.direction_ = direction;
params.idb_object_store_id_ = idb_object_store_id;
+ params.transaction_id_ = transaction_id;
RenderThread::current()->Send(
new ViewHostMsg_IDBObjectStoreOpenCursor(params));
}