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

Unified Diff: content/child/indexed_db/indexed_db_dispatcher.cc

Issue 229483003: WebBlobInfo plumbing for WebIDBDatabaseImpl::put. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rolled in Josh's feedback. 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/child/indexed_db/indexed_db_dispatcher.cc
diff --git a/content/child/indexed_db/indexed_db_dispatcher.cc b/content/child/indexed_db/indexed_db_dispatcher.cc
index 4c131fc801a3e0262e6b326ff921e4661ea83100..a4b7666835ccd124f747b7a46fa5819db390e6a4 100644
--- a/content/child/indexed_db/indexed_db_dispatcher.cc
+++ b/content/child/indexed_db/indexed_db_dispatcher.cc
@@ -21,6 +21,7 @@
#include "third_party/WebKit/public/platform/WebIDBDatabaseError.h"
#include "third_party/WebKit/public/platform/WebIDBDatabaseException.h"
+using blink::WebBlobInfo;
using blink::WebData;
using blink::WebIDBCallbacks;
using blink::WebIDBCursor;
@@ -324,6 +325,7 @@ void IndexedDBDispatcher::RequestIDBDatabasePut(
int64 transaction_id,
int64 object_store_id,
const WebData& value,
+ const blink::WebVector<WebBlobInfo>& web_blob_info,
const IndexedDBKey& key,
WebIDBDatabase::PutMode put_mode,
WebIDBCallbacks* callbacks,
@@ -363,6 +365,23 @@ void IndexedDBDispatcher::RequestIDBDatabasePut(
}
}
+ params.blob_or_file_info.resize(web_blob_info.size());
+ for (size_t i = 0; i < web_blob_info.size(); ++i) {
+ const WebBlobInfo& info = web_blob_info[i];
+ IndexedDBMsg_BlobOrFileInfo& blob_or_file_info =
+ params.blob_or_file_info[i];
+ blob_or_file_info.is_file = info.isFile();
+ if (info.isFile()) {
+ blob_or_file_info.file_path = info.filePath();
+ blob_or_file_info.file_name = info.fileName();
+ } else {
+ blob_or_file_info.size = info.size();
+ }
+ blob_or_file_info.uuid = info.uuid().latin1();
+ DCHECK(blob_or_file_info.uuid.size());
+ blob_or_file_info.mime_type = info.type();
+ }
+
Send(new IndexedDBHostMsg_DatabasePut(params));
}
« no previous file with comments | « content/child/indexed_db/indexed_db_dispatcher.h ('k') | content/child/indexed_db/indexed_db_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698