diff options
author | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-23 12:24:53 +0000 |
---|---|---|
committer | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-23 12:24:53 +0000 |
commit | 284e0d6e941b4a87f56cfd7cab70a69194e50cae (patch) | |
tree | c8df36841e4a2533c630b9ea2e0ad2bee6257e80 /chrome/renderer | |
parent | 341c086742954026993de725d0af8118e14d2862 (diff) | |
download | chromium_src-284e0d6e941b4a87f56cfd7cab70a69194e50cae.zip chromium_src-284e0d6e941b4a87f56cfd7cab70a69194e50cae.tar.gz chromium_src-284e0d6e941b4a87f56cfd7cab70a69194e50cae.tar.bz2 |
Revert 60275.
TEST=none
BUG=none
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60281 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/indexed_db_dispatcher.cc | 80 | ||||
-rw-r--r-- | chrome/renderer/indexed_db_dispatcher.h | 72 | ||||
-rw-r--r-- | chrome/renderer/renderer_webidbindex_impl.cc | 42 | ||||
-rw-r--r-- | chrome/renderer/renderer_webidbindex_impl.h | 12 | ||||
-rw-r--r-- | chrome/renderer/renderer_webidbobjectstore_impl.cc | 46 | ||||
-rw-r--r-- | chrome/renderer/renderer_webidbobjectstore_impl.h | 22 |
6 files changed, 92 insertions, 182 deletions
diff --git a/chrome/renderer/indexed_db_dispatcher.cc b/chrome/renderer/indexed_db_dispatcher.cc index 813a4fc..3ba6f08 100644 --- a/chrome/renderer/indexed_db_dispatcher.cc +++ b/chrome/renderer/indexed_db_dispatcher.cc @@ -150,11 +150,8 @@ void IndexedDBDispatcher::RequestIDBDatabaseSetVersion( } void IndexedDBDispatcher::RequestIDBIndexOpenObjectCursor( - const WebIDBKeyRange& idb_key_range, - unsigned short direction, - WebIDBCallbacks* callbacks_ptr, - int32 idb_index_id, - int transaction_id) { + const WebIDBKeyRange& idb_key_range, unsigned short direction, + WebIDBCallbacks* callbacks_ptr, int32 idb_index_id) { scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr); ViewHostMsg_IDBIndexOpenCursor_Params params; params.response_id_ = pending_callbacks_.Add(callbacks.release()); @@ -163,17 +160,13 @@ 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, - int transaction_id) { + const WebIDBKeyRange& idb_key_range, unsigned short direction, + WebIDBCallbacks* callbacks_ptr, int32 idb_index_id) { scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr); ViewHostMsg_IDBIndexOpenCursor_Params params; params.response_id_ = pending_callbacks_.Add(callbacks.release()); @@ -182,79 +175,62 @@ 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, - int transaction_id) { + const IndexedDBKey& key, WebKit::WebIDBCallbacks* callbacks_ptr, + int32 idb_index_id) { scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr); RenderThread::current()->Send( new ViewHostMsg_IDBIndexGetObject( - idb_index_id, pending_callbacks_.Add(callbacks.release()), key, - transaction_id)); + idb_index_id, pending_callbacks_.Add(callbacks.release()), key)); } void IndexedDBDispatcher::RequestIDBIndexGet( - const IndexedDBKey& key, - WebKit::WebIDBCallbacks* callbacks_ptr, - int32 idb_index_id, - int transaction_id) { + const IndexedDBKey& key, WebKit::WebIDBCallbacks* callbacks_ptr, + int32 idb_index_id) { scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr); RenderThread::current()->Send( new ViewHostMsg_IDBIndexGet( - idb_index_id, pending_callbacks_.Add(callbacks.release()), key, - transaction_id)); + idb_index_id, pending_callbacks_.Add(callbacks.release()), key)); } void IndexedDBDispatcher::RequestIDBObjectStoreGet( - const IndexedDBKey& key, - WebKit::WebIDBCallbacks* callbacks_ptr, - int32 idb_object_store_id, - int transaction_id) { + const IndexedDBKey& key, WebKit::WebIDBCallbacks* callbacks_ptr, + int32 idb_object_store_id) { scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr); RenderThread::current()->Send( new ViewHostMsg_IDBObjectStoreGet( idb_object_store_id, pending_callbacks_.Add(callbacks.release()), - key, transaction_id)); + key)); } void IndexedDBDispatcher::RequestIDBObjectStorePut( - const SerializedScriptValue& value, - const IndexedDBKey& key, - bool add_only, - WebKit::WebIDBCallbacks* callbacks_ptr, - int32 idb_object_store_id, - int transaction_id) { + const SerializedScriptValue& value, const IndexedDBKey& key, + bool add_only, WebKit::WebIDBCallbacks* callbacks_ptr, + int32 idb_object_store_id) { scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr); - 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)); + + RenderThread::current()->Send( + new ViewHostMsg_IDBObjectStorePut( + idb_object_store_id, pending_callbacks_.Add(callbacks.release()), + value, key, add_only)); } void IndexedDBDispatcher::RequestIDBObjectStoreRemove( - const IndexedDBKey& key, - WebKit::WebIDBCallbacks* callbacks_ptr, - int32 idb_object_store_id, - int transaction_id) { + const IndexedDBKey& key, WebKit::WebIDBCallbacks* callbacks_ptr, + int32 idb_object_store_id) { scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr); RenderThread::current()->Send( new ViewHostMsg_IDBObjectStoreRemove( idb_object_store_id, pending_callbacks_.Add(callbacks.release()), - key, transaction_id)); + key)); } void IndexedDBDispatcher::RequestIDBObjectStoreCreateIndex( @@ -284,11 +260,8 @@ void IndexedDBDispatcher::RequestIDBObjectStoreRemoveIndex( } void IndexedDBDispatcher::RequestIDBObjectStoreOpenCursor( - const WebIDBKeyRange& idb_key_range, - unsigned short direction, - WebIDBCallbacks* callbacks_ptr, - int32 idb_object_store_id, - int transaction_id) { + const WebIDBKeyRange& idb_key_range, unsigned short direction, + WebIDBCallbacks* callbacks_ptr, int32 idb_object_store_id) { scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr); ViewHostMsg_IDBObjectStoreOpenCursor_Params params; params.response_id_ = pending_callbacks_.Add(callbacks.release()); @@ -297,7 +270,6 @@ 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)); } diff --git a/chrome/renderer/indexed_db_dispatcher.h b/chrome/renderer/indexed_db_dispatcher.h index 2868358..edf11b2 100644 --- a/chrome/renderer/indexed_db_dispatcher.h +++ b/chrome/renderer/indexed_db_dispatcher.h @@ -65,44 +65,33 @@ class IndexedDBDispatcher { int32 idb_database_id); void RequestIDBIndexOpenObjectCursor( - const WebKit::WebIDBKeyRange& idb_key_range, - unsigned short direction, - WebKit::WebIDBCallbacks* callbacks, - int32 idb_index_id, - int transaction_id); - - void RequestIDBIndexOpenCursor(const WebKit::WebIDBKeyRange& idb_key_range, - unsigned short direction, - WebKit::WebIDBCallbacks* callbacks, - int32 idb_index_id, - int transaction_id); - - void RequestIDBIndexGetObject(const IndexedDBKey& key, - WebKit::WebIDBCallbacks* callbacks, - int32 idb_index_id, - int transaction_id); - - void RequestIDBIndexGet(const IndexedDBKey& key, - WebKit::WebIDBCallbacks* callbacks, - int32 idb_index_id, - int transaction_id); - - void RequestIDBObjectStoreGet(const IndexedDBKey& key, - WebKit::WebIDBCallbacks* callbacks, - int32 idb_object_store_id, - int transaction_id); - - void RequestIDBObjectStorePut(const SerializedScriptValue& value, - const IndexedDBKey& key, - bool add_only, - WebKit::WebIDBCallbacks* callbacks, - int32 idb_object_store_id, - int transaction_id); - - void RequestIDBObjectStoreRemove(const IndexedDBKey& key, - WebKit::WebIDBCallbacks* callbacks, - int32 idb_object_store_id, - int transaction_id); + const WebKit::WebIDBKeyRange& idb_key_range, unsigned short direction, + WebKit::WebIDBCallbacks* callbacks, int32 idb_index_id); + + void RequestIDBIndexOpenCursor( + const WebKit::WebIDBKeyRange& idb_key_range, unsigned short direction, + WebKit::WebIDBCallbacks* callbacks, int32 idb_index_id); + + void RequestIDBIndexGetObject( + const IndexedDBKey& key, WebKit::WebIDBCallbacks* callbacks, + int32 idb_index_id); + + void RequestIDBIndexGet( + const IndexedDBKey& key, WebKit::WebIDBCallbacks* callbacks, + int32 idb_index_id); + + void RequestIDBObjectStoreGet( + const IndexedDBKey& key, WebKit::WebIDBCallbacks* callbacks, + int32 idb_object_store_id); + + void RequestIDBObjectStorePut( + const SerializedScriptValue& value, const IndexedDBKey& key, + bool add_only, WebKit::WebIDBCallbacks* callbacks, + int32 idb_object_store_id); + + void RequestIDBObjectStoreRemove( + const IndexedDBKey& key, WebKit::WebIDBCallbacks* callbacks, + int32 idb_object_store_id); void RequestIDBObjectStoreCreateIndex( const string16& name, const NullableString16& key_path, bool unique, @@ -113,11 +102,8 @@ class IndexedDBDispatcher { int32 idb_object_store_id); void RequestIDBObjectStoreOpenCursor( - const WebKit::WebIDBKeyRange& idb_key_range, - unsigned short direction, - WebKit::WebIDBCallbacks* callbacks, - int32 idb_object_store_id, - int transaction_id); + const WebKit::WebIDBKeyRange& idb_key_range, unsigned short direction, + WebKit::WebIDBCallbacks* callbacks, int32 idb_object_store_id); void RequestIDBTransactionSetCallbacks( WebKit::WebIDBTransactionCallbacks* callbacks); diff --git a/chrome/renderer/renderer_webidbindex_impl.cc b/chrome/renderer/renderer_webidbindex_impl.cc index de3eda5..5fa4115 100644 --- a/chrome/renderer/renderer_webidbindex_impl.cc +++ b/chrome/renderer/renderer_webidbindex_impl.cc @@ -8,7 +8,6 @@ #include "chrome/common/render_messages.h" #include "chrome/renderer/render_thread.h" #include "chrome/renderer/indexed_db_dispatcher.h" -#include "chrome/renderer/renderer_webidbtransaction_impl.h" using WebKit::WebDOMStringList; using WebKit::WebString; @@ -56,49 +55,34 @@ bool RendererWebIDBIndexImpl::unique() const { void RendererWebIDBIndexImpl::openObjectCursor( const WebKit::WebIDBKeyRange& range, unsigned short direction, - WebKit::WebIDBCallbacks* callbacks, - const WebKit::WebIDBTransaction& transaction) { + WebKit::WebIDBCallbacks* callbacks) { IndexedDBDispatcher* dispatcher = RenderThread::current()->indexed_db_dispatcher(); - int transaction_id = - static_cast<const RendererWebIDBTransactionImpl*>(&transaction)->id(); - dispatcher->RequestIDBIndexOpenObjectCursor( - range, direction, callbacks, idb_index_id_, transaction_id); + dispatcher->RequestIDBIndexOpenObjectCursor(range, direction, + callbacks, idb_index_id_); } void RendererWebIDBIndexImpl::openCursor( const WebKit::WebIDBKeyRange& range, unsigned short direction, - WebKit::WebIDBCallbacks* callbacks, - const WebKit::WebIDBTransaction& transaction) { + WebKit::WebIDBCallbacks* callbacks) { IndexedDBDispatcher* dispatcher = RenderThread::current()->indexed_db_dispatcher(); - int transaction_id = - static_cast<const RendererWebIDBTransactionImpl*>(&transaction)->id(); - dispatcher->RequestIDBIndexOpenCursor( - range, direction, callbacks, idb_index_id_, transaction_id); + dispatcher->RequestIDBIndexOpenCursor(range, direction, + callbacks, idb_index_id_); } -void RendererWebIDBIndexImpl::getObject( - const WebKit::WebIDBKey& key, - WebKit::WebIDBCallbacks* callbacks, - const WebKit::WebIDBTransaction& transaction) { +void RendererWebIDBIndexImpl::getObject(const WebKit::WebIDBKey& key, + WebKit::WebIDBCallbacks* callbacks) { IndexedDBDispatcher* dispatcher = RenderThread::current()->indexed_db_dispatcher(); - int transaction_id = - static_cast<const RendererWebIDBTransactionImpl*>(&transaction)->id(); - dispatcher->RequestIDBIndexGetObject( - IndexedDBKey(key), callbacks, idb_index_id_, transaction_id); + dispatcher->RequestIDBIndexGetObject(IndexedDBKey(key), callbacks, + idb_index_id_); } -void RendererWebIDBIndexImpl::get( - const WebKit::WebIDBKey& key, - WebKit::WebIDBCallbacks* callbacks, - const WebKit::WebIDBTransaction& transaction) { +void RendererWebIDBIndexImpl::get(const WebKit::WebIDBKey& key, + WebKit::WebIDBCallbacks* callbacks) { IndexedDBDispatcher* dispatcher = RenderThread::current()->indexed_db_dispatcher(); - int transaction_id = - static_cast<const RendererWebIDBTransactionImpl*>(&transaction)->id(); - dispatcher->RequestIDBIndexGet( - IndexedDBKey(key), callbacks, idb_index_id_, transaction_id); + dispatcher->RequestIDBIndexGet(IndexedDBKey(key), callbacks, idb_index_id_); } diff --git a/chrome/renderer/renderer_webidbindex_impl.h b/chrome/renderer/renderer_webidbindex_impl.h index 1faab64..de77920 100644 --- a/chrome/renderer/renderer_webidbindex_impl.h +++ b/chrome/renderer/renderer_webidbindex_impl.h @@ -22,18 +22,14 @@ class RendererWebIDBIndexImpl : public WebKit::WebIDBIndex { virtual bool unique() const; virtual void openObjectCursor(const WebKit::WebIDBKeyRange& range, unsigned short direction, - WebKit::WebIDBCallbacks* callbacks, - const WebKit::WebIDBTransaction& transaction); + WebKit::WebIDBCallbacks* callbacks); virtual void openCursor(const WebKit::WebIDBKeyRange& range, unsigned short direction, - WebKit::WebIDBCallbacks* callbacks, - const WebKit::WebIDBTransaction& transaction); + WebKit::WebIDBCallbacks* callbacks); virtual void getObject(const WebKit::WebIDBKey& key, - WebKit::WebIDBCallbacks* callbacks, - const WebKit::WebIDBTransaction& transaction); + WebKit::WebIDBCallbacks* callbacks); virtual void get(const WebKit::WebIDBKey& key, - WebKit::WebIDBCallbacks* callbacks, - const WebKit::WebIDBTransaction& transaction); + WebKit::WebIDBCallbacks* callbacks); private: int32 idb_index_id_; diff --git a/chrome/renderer/renderer_webidbobjectstore_impl.cc b/chrome/renderer/renderer_webidbobjectstore_impl.cc index ead8e53..d29a326 100644 --- a/chrome/renderer/renderer_webidbobjectstore_impl.cc +++ b/chrome/renderer/renderer_webidbobjectstore_impl.cc @@ -10,7 +10,6 @@ #include "chrome/renderer/indexed_db_dispatcher.h" #include "chrome/renderer/render_thread.h" #include "chrome/renderer/renderer_webidbindex_impl.h" -#include "chrome/renderer/renderer_webidbtransaction_impl.h" #include "third_party/WebKit/WebKit/chromium/public/WebDOMStringList.h" #include "third_party/WebKit/WebKit/chromium/public/WebIDBKey.h" #include "third_party/WebKit/WebKit/chromium/public/WebIDBKeyRange.h" @@ -62,43 +61,30 @@ WebDOMStringList RendererWebIDBObjectStoreImpl::indexNames() const { return web_result; } -void RendererWebIDBObjectStoreImpl::get( - const WebIDBKey& key, - WebIDBCallbacks* callbacks, - const WebKit::WebIDBTransaction& transaction) { +void RendererWebIDBObjectStoreImpl::get(const WebIDBKey& key, + WebIDBCallbacks* callbacks) { IndexedDBDispatcher* dispatcher = RenderThread::current()->indexed_db_dispatcher(); - int transaction_id = - static_cast<const RendererWebIDBTransactionImpl*>(&transaction)->id(); - dispatcher->RequestIDBObjectStoreGet( - IndexedDBKey(key), callbacks, idb_object_store_id_, transaction_id); + dispatcher->RequestIDBObjectStoreGet(IndexedDBKey(key), + callbacks, idb_object_store_id_); } void RendererWebIDBObjectStoreImpl::put( - const WebSerializedScriptValue& value, - const WebIDBKey& key, - bool add_only, - WebIDBCallbacks* callbacks, - const WebKit::WebIDBTransaction& transaction) { + const WebSerializedScriptValue& value, const WebIDBKey& key, bool add_only, + WebIDBCallbacks* callbacks) { IndexedDBDispatcher* dispatcher = RenderThread::current()->indexed_db_dispatcher(); - int transaction_id = - static_cast<const RendererWebIDBTransactionImpl*>(&transaction)->id(); dispatcher->RequestIDBObjectStorePut( SerializedScriptValue(value), IndexedDBKey(key), add_only, callbacks, - idb_object_store_id_, transaction_id); + idb_object_store_id_); } -void RendererWebIDBObjectStoreImpl::remove( - const WebIDBKey& key, - WebIDBCallbacks* callbacks, - const WebKit::WebIDBTransaction& transaction) { +void RendererWebIDBObjectStoreImpl::remove(const WebIDBKey& key, + WebIDBCallbacks* callbacks) { IndexedDBDispatcher* dispatcher = RenderThread::current()->indexed_db_dispatcher(); - int transaction_id = - static_cast<const RendererWebIDBTransactionImpl*>(&transaction)->id(); - dispatcher->RequestIDBObjectStoreRemove( - IndexedDBKey(key), callbacks, idb_object_store_id_, transaction_id); + dispatcher->RequestIDBObjectStoreRemove(IndexedDBKey(key), callbacks, + idb_object_store_id_); } void RendererWebIDBObjectStoreImpl::createIndex( @@ -132,13 +118,9 @@ void RendererWebIDBObjectStoreImpl::removeIndex(const WebString& name, void RendererWebIDBObjectStoreImpl::openCursor( const WebIDBKeyRange& idb_key_range, - unsigned short direction, WebIDBCallbacks* callbacks, - const WebKit::WebIDBTransaction& transaction) { + unsigned short direction, WebIDBCallbacks* callbacks) { IndexedDBDispatcher* dispatcher = RenderThread::current()->indexed_db_dispatcher(); - int transaction_id = - static_cast<const RendererWebIDBTransactionImpl*>(&transaction)->id(); - dispatcher->RequestIDBObjectStoreOpenCursor( - idb_key_range, direction, callbacks, idb_object_store_id_, - transaction_id); + dispatcher->RequestIDBObjectStoreOpenCursor(idb_key_range, direction, + callbacks, idb_object_store_id_); } diff --git a/chrome/renderer/renderer_webidbobjectstore_impl.h b/chrome/renderer/renderer_webidbobjectstore_impl.h index 1cca553..88e5ad4 100644 --- a/chrome/renderer/renderer_webidbobjectstore_impl.h +++ b/chrome/renderer/renderer_webidbobjectstore_impl.h @@ -29,31 +29,21 @@ class RendererWebIDBObjectStoreImpl : public WebKit::WebIDBObjectStore { WebKit::WebString keyPath() const; WebKit::WebDOMStringList indexNames() const; - void get(const WebKit::WebIDBKey& key, - WebKit::WebIDBCallbacks* callbacks, - const WebKit::WebIDBTransaction& transaction); + void get(const WebKit::WebIDBKey& key, WebKit::WebIDBCallbacks* callbacks); void put(const WebKit::WebSerializedScriptValue& value, - const WebKit::WebIDBKey& key, - bool add_only, - WebKit::WebIDBCallbacks* callbacks, - const WebKit::WebIDBTransaction& transaction); - void remove(const WebKit::WebIDBKey& key, - WebKit::WebIDBCallbacks* callbacks, - const WebKit::WebIDBTransaction& transaction); + const WebKit::WebIDBKey& key, bool add_only, + WebKit::WebIDBCallbacks* callbacks); + void remove(const WebKit::WebIDBKey& key, WebKit::WebIDBCallbacks* callbacks); void createIndex(const WebKit::WebString& name, - const WebKit::WebString& key_path, - bool unique, + const WebKit::WebString& key_path, bool unique, WebKit::WebIDBCallbacks* callbacks); // Transfers ownership of the WebIDBIndex to the caller. WebKit::WebIDBIndex* index(const WebKit::WebString& name); void removeIndex(const WebKit::WebString& name, WebKit::WebIDBCallbacks* callbacks); - void openCursor(const WebKit::WebIDBKeyRange& idb_key_range, - unsigned short direction, - WebKit::WebIDBCallbacks* callbacks, - const WebKit::WebIDBTransaction& transaction); + unsigned short direction, WebKit::WebIDBCallbacks* callbacks); private: int32 idb_object_store_id_; }; |