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

Unified Diff: content/common/indexed_db/indexed_db_messages.h

Issue 227693008: New IPC message parameters for IDB/Blob support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
Index: content/common/indexed_db/indexed_db_messages.h
diff --git a/content/common/indexed_db/indexed_db_messages.h b/content/common/indexed_db/indexed_db_messages.h
index 6c454b3f10e155fd85debe7b5211d1b5e47075f9..93141bb23640d1f9773c344e9e6283620dda2df0 100644
--- a/content/common/indexed_db/indexed_db_messages.h
+++ b/content/common/indexed_db/indexed_db_messages.h
@@ -15,6 +15,7 @@
#include "ipc/ipc_param_traits.h"
#include "third_party/WebKit/public/platform/WebIDBCursor.h"
#include "third_party/WebKit/public/platform/WebIDBDatabase.h"
+#include "url/gurl.h"
cmumford 2014/04/08 21:47:26 Is gurl.h needed?
ericu 2014/04/08 22:07:11 No, that's old. Removed.
#undef IPC_MESSAGE_EXPORT
#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
@@ -121,6 +122,16 @@ IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseGet_Params)
IPC_STRUCT_MEMBER(bool, key_only)
IPC_STRUCT_END()
+IPC_STRUCT_BEGIN(IndexedDBMsg_BlobOrFileInfo)
+IPC_STRUCT_MEMBER(bool, is_file)
+IPC_STRUCT_MEMBER(std::string, uuid)
+IPC_STRUCT_MEMBER(base::string16, mime_type)
+IPC_STRUCT_MEMBER(uint64, size)
+IPC_STRUCT_MEMBER(base::string16, file_path)
+IPC_STRUCT_MEMBER(base::string16, file_name)
+IPC_STRUCT_MEMBER(double, last_modified)
+IPC_STRUCT_END()
+
// Used to set a value in an object store.
IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabasePut_Params)
// The id any response should contain.
@@ -142,6 +153,8 @@ IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabasePut_Params)
IPC_STRUCT_MEMBER(blink::WebIDBDatabase::PutMode, put_mode)
// The index ids and the list of keys for each index.
IPC_STRUCT_MEMBER(std::vector<IndexKeys>, index_keys)
+ // Sideband data for any blob or file encoded in value.
+ IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_BlobOrFileInfo>, blob_or_file_info)
IPC_STRUCT_END()
// Used to open both cursors and object cursors in IndexedDB.
@@ -238,6 +251,8 @@ IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessIDBCursor_Params)
IPC_STRUCT_MEMBER(content::IndexedDBKey, key)
IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key)
IPC_STRUCT_MEMBER(std::string, value)
+ // Sideband data for any blob or file encoded in value.
+ IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_BlobOrFileInfo>, blob_or_file_info)
IPC_STRUCT_END()
IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorContinue_Params)
@@ -247,6 +262,8 @@ IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorContinue_Params)
IPC_STRUCT_MEMBER(content::IndexedDBKey, key)
IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key)
IPC_STRUCT_MEMBER(std::string, value)
+ // Sideband data for any blob or file encoded in value.
+ IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_BlobOrFileInfo>, blob_or_file_info)
IPC_STRUCT_END()
IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params)
@@ -256,6 +273,27 @@ IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params)
IPC_STRUCT_MEMBER(std::vector<content::IndexedDBKey>, keys)
IPC_STRUCT_MEMBER(std::vector<content::IndexedDBKey>, primary_keys)
IPC_STRUCT_MEMBER(std::vector<std::string>, values)
+ // Sideband data for any blob or file encoded in value.
+ IPC_STRUCT_MEMBER(std::vector<std::vector<IndexedDBMsg_BlobOrFileInfo> >,
+ blob_or_file_infos)
+IPC_STRUCT_END()
+
+IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessValue_Params)
+ IPC_STRUCT_MEMBER(int32, ipc_thread_id)
+ IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
+ IPC_STRUCT_MEMBER(std::string, value)
+ // Sideband data for any blob or file encoded in value.
+ IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_BlobOrFileInfo>, blob_or_file_info)
+IPC_STRUCT_END()
+
+IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessValueWithKey_Params)
+ IPC_STRUCT_MEMBER(int32, ipc_thread_id)
+ IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
+ IPC_STRUCT_MEMBER(std::string, value)
+ IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key)
cmumford 2014/04/08 21:47:26 The other messages only use primary_key when there
ericu 2014/04/08 22:07:11 I used primary_key as that was the name of the par
+ IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path)
+ // Sideband data for any blob or file encoded in value.
+ IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_BlobOrFileInfo>, blob_or_file_info)
IPC_STRUCT_END()
IPC_STRUCT_BEGIN(IndexedDBIndexMetadata)
@@ -324,16 +362,13 @@ IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessIndexedDBKey,
int32 /* ipc_thread_id */,
int32 /* ipc_callbacks_id */,
content::IndexedDBKey /* indexed_db_key */)
-IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessValue,
- int32 /* ipc_thread_id */,
- int32 /* ipc_callbacks_id */,
- std::string /* value */)
-IPC_MESSAGE_CONTROL5(IndexedDBMsg_CallbacksSuccessValueWithKey,
- int32 /* ipc_thread_id */,
- int32 /* ipc_callbacks_id */,
- std::string /* value */,
- content::IndexedDBKey /* indexed_db_key */,
- content::IndexedDBKeyPath /* indexed_db_keypath */)
+
+IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessValue,
+ IndexedDBMsg_CallbacksSuccessValue_Params)
+
+IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessValueWithKey,
+ IndexedDBMsg_CallbacksSuccessValueWithKey_Params)
+
IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessInteger,
int32 /* ipc_thread_id */,
int32 /* ipc_callbacks_id */,

Powered by Google App Engine
This is Rietveld 408576698