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

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

Issue 10830228: Chromium glue for Preemptive cursors and passing keys from renderer to browser (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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_dispatcher.cc
diff --git a/content/common/indexed_db/indexed_db_dispatcher.cc b/content/common/indexed_db/indexed_db_dispatcher.cc
index 30e54fae6a715026e7c2900518b403a148bf4f35..9aa8637f2e687f240d8c6a4476c6ea57a0021e46 100644
--- a/content/common/indexed_db/indexed_db_dispatcher.cc
+++ b/content/common/indexed_db/indexed_db_dispatcher.cc
@@ -448,6 +448,49 @@ void IndexedDBDispatcher::RequestIDBObjectStorePut(
pending_callbacks_.Remove(params.response_id);
}
+void IndexedDBDispatcher::RequestIDBObjectStoreSetIndexKeys(
+ int32 idb_object_store_id,
+ const IndexedDBKey& primary_key,
+ const WebKit::WebVector<WebKit::WebString>& web_index_names,
+ const WebKit::WebVector<WebKit::WebVector<WebKit::WebIDBKey> >&
+ web_index_keys,
+ const WebKit::WebIDBTransaction& transaction) {
+
+ std::vector<string16> index_names(web_index_names.size());
dgrogan 2012/08/08 23:02:50 It looks like you could move this code to the call
alecflett 2012/08/09 20:54:18 Done.
+ for (size_t i = 0; i < web_index_names.size(); ++i) {
+ index_names[i] = web_index_names[i];
+ }
+
+ std::vector<std::vector<content::IndexedDBKey> >
+ index_keys(web_index_keys.size());
+ for (size_t i = 0; i < web_index_keys.size(); ++i) {
+ index_keys[i].resize(web_index_keys[i].size());
+ for (size_t j = 0; j < web_index_keys[i].size(); ++j) {
+ index_keys[i][j] = content::IndexedDBKey(web_index_keys[i][j]);
+ }
+ }
+ Send(new IndexedDBHostMsg_ObjectStoreSetIndexKeys(
+ idb_object_store_id,
+ primary_key,
+ index_names,
+ index_keys,
+ TransactionId(transaction)));
+}
+
+void IndexedDBDispatcher::RequestIDBObjectStoreSetIndexesReady(
+ int32 idb_object_store_id,
+ const WebKit::WebVector<WebKit::WebString>& index_names,
+ const WebKit::WebIDBTransaction& transaction) {
+ std::vector<string16> index_name_list(index_names.size());
+ for (size_t i = 0; i < index_names.size(); ++i) {
+ index_name_list[i] = index_names[i];
+ }
+
+ Send(new IndexedDBHostMsg_ObjectStoreSetIndexesReady(
+ idb_object_store_id,
+ index_name_list, TransactionId(transaction)));
+}
+
void IndexedDBDispatcher::RequestIDBObjectStoreDelete(
const IndexedDBKeyRange& key_range,
WebIDBCallbacks* callbacks_ptr,
@@ -483,9 +526,10 @@ void IndexedDBDispatcher::RequestIDBObjectStoreClear(
void IndexedDBDispatcher::RequestIDBObjectStoreOpenCursor(
const WebIDBKeyRange& idb_key_range,
- unsigned short direction,
+ WebKit::WebIDBCursor::Direction direction,
WebIDBCallbacks* callbacks_ptr,
int32 idb_object_store_id,
+ WebKit::WebIDBTransaction::TaskType task_type,
const WebIDBTransaction& transaction,
WebExceptionCode* ec) {
ResetCursorPrefetchCaches();
@@ -496,6 +540,7 @@ void IndexedDBDispatcher::RequestIDBObjectStoreOpenCursor(
params.key_range = IndexedDBKeyRange(idb_key_range);
params.direction = direction;
params.idb_object_store_id = idb_object_store_id;
+ params.task_type = task_type;
params.transaction_id = TransactionId(transaction);
Send(new IndexedDBHostMsg_ObjectStoreOpenCursor(params, ec));
if (*ec)

Powered by Google App Engine
This is Rietveld 408576698