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

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

Issue 18023022: Blob support for IDB [Chromium] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Handle the rest of Josh's feedback. Created 7 years 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/proxy_webidbdatabase_impl.cc
diff --git a/content/child/indexed_db/proxy_webidbdatabase_impl.cc b/content/child/indexed_db/proxy_webidbdatabase_impl.cc
index 022093b9c6713904af546dac21434762e2581565..ef513f9f4428135b0f188890a31cb6e1d56268c1 100644
--- a/content/child/indexed_db/proxy_webidbdatabase_impl.cc
+++ b/content/child/indexed_db/proxy_webidbdatabase_impl.cc
@@ -10,12 +10,14 @@
#include "content/child/indexed_db/indexed_db_dispatcher.h"
#include "content/child/indexed_db/indexed_db_key_builders.h"
#include "content/common/indexed_db/indexed_db_messages.h"
+#include "third_party/WebKit/public/platform/WebBlobInfo.h"
#include "third_party/WebKit/public/platform/WebIDBKeyPath.h"
#include "third_party/WebKit/public/platform/WebIDBMetadata.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebVector.h"
#include "webkit/child/worker_task_runner.h"
+using blink::WebBlobInfo;
using blink::WebIDBCallbacks;
using blink::WebIDBDatabaseCallbacks;
using blink::WebIDBMetadata;
@@ -117,6 +119,7 @@ void RendererWebIDBDatabaseImpl::put(
long long transaction_id,
long long object_store_id,
const blink::WebData& value,
+ const blink::WebVector<WebBlobInfo>& webBlobInfo,
const WebIDBKey& key,
PutMode put_mode,
WebIDBCallbacks* callbacks,
@@ -128,6 +131,7 @@ void RendererWebIDBDatabaseImpl::put(
transaction_id,
object_store_id,
value,
+ webBlobInfo,
IndexedDBKeyBuilder::Build(key),
put_mode,
callbacks,
@@ -280,4 +284,14 @@ void RendererWebIDBDatabaseImpl::commit(long long transaction_id) {
ipc_database_id_, transaction_id));
}
+void RendererWebIDBDatabaseImpl::ackReceivedBlobs(
+ const WebVector<WebString>& uuids) {
+ DCHECK(uuids.size());
+ std::vector<std::string> param(uuids.size());
+ for (size_t i = 0; i < uuids.size(); ++i) {
jsbell 2013/12/20 00:44:20 Nit: Don't need braces.
ericu 2014/02/20 00:50:29 Done.
+ param[i] = uuids[i].latin1().data();
+ }
+ thread_safe_sender_->Send(new IndexedDBHostMsg_AckReceivedBlobs(param));
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698