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

Unified Diff: content/common/indexed_db/proxy_webidbobjectstore_impl.cc

Issue 10759012: Chromium side of plumbing for passing renderer-generated keys through IPC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Include unit tests too Created 8 years, 5 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
« no previous file with comments | « content/common/indexed_db/proxy_webidbobjectstore_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/indexed_db/proxy_webidbobjectstore_impl.cc
diff --git a/content/common/indexed_db/proxy_webidbobjectstore_impl.cc b/content/common/indexed_db/proxy_webidbobjectstore_impl.cc
index 85a5838d2bc996d34ff9718d14f3547db535c014..4e34db519ec0cd4e66ecd8920c348cd97e92b6ca 100644
--- a/content/common/indexed_db/proxy_webidbobjectstore_impl.cc
+++ b/content/common/indexed_db/proxy_webidbobjectstore_impl.cc
@@ -18,7 +18,9 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSerializedScriptValue.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
+using content::IndexedDBKey;
using content::IndexedDBKeyPath;
+using content::IndexedDBKeyRange;
using content::SerializedScriptValue;
using WebKit::WebDOMStringList;
using WebKit::WebExceptionCode;
@@ -31,6 +33,7 @@ using WebKit::WebIDBKey;
using WebKit::WebIDBTransaction;
using WebKit::WebSerializedScriptValue;
using WebKit::WebString;
+using WebKit::WebVector;
RendererWebIDBObjectStoreImpl::RendererWebIDBObjectStoreImpl(
int32 idb_object_store_id)
@@ -54,7 +57,7 @@ void RendererWebIDBObjectStoreImpl::get(
IndexedDBDispatcher* dispatcher =
IndexedDBDispatcher::ThreadSpecificInstance();
dispatcher->RequestIDBObjectStoreGet(
- content::IndexedDBKeyRange(key_range), callbacks,
+ IndexedDBKeyRange(key_range), callbacks,
idb_object_store_id_, transaction, &ec);
}
@@ -67,9 +70,29 @@ void RendererWebIDBObjectStoreImpl::put(
WebExceptionCode& ec) {
IndexedDBDispatcher* dispatcher =
IndexedDBDispatcher::ThreadSpecificInstance();
+ WebVector<WebString> emptyIndexNames;
+ WebVector<WebVector<WebIDBKey> > emptyIndexKeys;
dispatcher->RequestIDBObjectStorePut(
- SerializedScriptValue(value), content::IndexedDBKey(key),
- put_mode, callbacks, idb_object_store_id_, transaction, &ec);
+ SerializedScriptValue(value), IndexedDBKey(key),
+ put_mode, callbacks, idb_object_store_id_, transaction,
+ emptyIndexNames, emptyIndexKeys, &ec);
+}
+
+void RendererWebIDBObjectStoreImpl::putWithIndexKeys(
+ const WebSerializedScriptValue& value,
+ const WebIDBKey& key,
+ PutMode put_mode,
+ WebIDBCallbacks* callbacks,
+ const WebIDBTransaction& transaction,
+ const WebVector<WebString>& indexNames,
+ const WebVector<WebVector<WebIDBKey> >& indexKeys,
+ WebExceptionCode& ec) {
+ IndexedDBDispatcher* dispatcher =
+ IndexedDBDispatcher::ThreadSpecificInstance();
+ dispatcher->RequestIDBObjectStorePut(
+ SerializedScriptValue(value), IndexedDBKey(key),
+ put_mode, callbacks, idb_object_store_id_, transaction,
+ indexNames, indexKeys, &ec);
}
void RendererWebIDBObjectStoreImpl::deleteFunction(
@@ -80,7 +103,7 @@ void RendererWebIDBObjectStoreImpl::deleteFunction(
IndexedDBDispatcher* dispatcher =
IndexedDBDispatcher::ThreadSpecificInstance();
dispatcher->RequestIDBObjectStoreDelete(
- content::IndexedDBKeyRange(key_range), callbacks, idb_object_store_id_,
+ IndexedDBKeyRange(key_range), callbacks, idb_object_store_id_,
transaction, &ec);
}
« no previous file with comments | « content/common/indexed_db/proxy_webidbobjectstore_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698