diff options
author | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-23 10:47:00 +0000 |
---|---|---|
committer | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-23 10:47:00 +0000 |
commit | 2e21b5e7458998a0d01bc6f3797c0e3e64e8294e (patch) | |
tree | ce45a96cbc53cfc6a30fc58df00959874386c39b /chrome/common/render_messages_params.h | |
parent | cb40fd2e6057b3d6b1fa4329b4fdffb9c271cc93 (diff) | |
download | chromium_src-2e21b5e7458998a0d01bc6f3797c0e3e64e8294e.zip chromium_src-2e21b5e7458998a0d01bc6f3797c0e3e64e8294e.tar.gz chromium_src-2e21b5e7458998a0d01bc6f3797c0e3e64e8294e.tar.bz2 |
Add the transaction id plumbing to IndexedDB.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/3478003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60275 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/render_messages_params.h')
-rw-r--r-- | chrome/common/render_messages_params.h | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/chrome/common/render_messages_params.h b/chrome/common/render_messages_params.h index 70f9825..05c2d7e 100644 --- a/chrome/common/render_messages_params.h +++ b/chrome/common/render_messages_params.h @@ -25,6 +25,7 @@ #include "chrome/common/navigation_types.h" #include "chrome/common/page_transition_types.h" #include "chrome/common/renderer_preferences.h" +#include "chrome/common/serialized_script_value.h" #include "chrome/common/window_container_type.h" #include "googleurl/src/gurl.h" #include "ipc/ipc_param_traits.h" @@ -671,13 +672,34 @@ struct ViewHostMsg_IDBIndexOpenCursor_Params { // The index the index belongs to. int32 idb_index_id_; + + // The transaction this request belongs to. + int transaction_id_; +}; + +// Used to set a value in an object store. +struct ViewHostMsg_IDBObjectStorePut_Params { + // The object store's id. + int32 idb_object_store_id_; + + // The id any response should contain. + int32 response_id_; + + // The value to set. + SerializedScriptValue serialized_value_; + + // The key to set it on (may not be "valid"/set in some cases). + IndexedDBKey key_; + + // If it already exists, don't update (just return an error). + bool add_only_; + + // The transaciton it's associated with. + int transaction_id_; }; // Used to create an index. struct ViewHostMsg_IDBObjectStoreCreateIndex_Params { - ViewHostMsg_IDBObjectStoreCreateIndex_Params(); - ~ViewHostMsg_IDBObjectStoreCreateIndex_Params(); - // The response should have this id. int32 response_id_; @@ -716,6 +738,9 @@ struct ViewHostMsg_IDBObjectStoreOpenCursor_Params { // The object store the cursor belongs to. int32 idb_object_store_id_; + + // The transaction this request belongs to. + int transaction_id_; }; // Allows an extension to execute code in a tab. @@ -1141,6 +1166,14 @@ struct ParamTraits<ViewHostMsg_IDBIndexOpenCursor_Params> { }; template <> +struct ParamTraits<ViewHostMsg_IDBObjectStorePut_Params> { + typedef ViewHostMsg_IDBObjectStorePut_Params param_type; + static void Write(Message* m, const param_type& p); + static bool Read(const Message* m, void** iter, param_type* p); + static void Log(const param_type& p, std::string* l); +}; + +template <> struct ParamTraits<ViewHostMsg_IDBObjectStoreCreateIndex_Params> { typedef ViewHostMsg_IDBObjectStoreCreateIndex_Params param_type; static void Write(Message* m, const param_type& p); |