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

Unified Diff: content/browser/in_process_webkit/indexed_db_dispatcher_host.cc

Issue 10204003: Use WebIDBKeyPath type in WebKit API, implement IndexedDBKeyPath type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move IndexedDBKeyPath to content namespace, formatting nits. Created 8 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/browser/in_process_webkit/indexed_db_dispatcher_host.cc
diff --git a/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc b/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc
index e3d223432a4a904cc0bda1eaa9c6c8f56967c401..5577ca55bbc7fc631eb6f2ac92d2a75f5452bc39 100644
--- a/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc
+++ b/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc
@@ -24,6 +24,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabaseError.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBIndex.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyPath.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyRange.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBObjectStore.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBTransaction.h"
@@ -44,6 +45,7 @@ using WebKit::WebIDBDatabase;
using WebKit::WebIDBDatabaseError;
using WebKit::WebIDBIndex;
using WebKit::WebIDBKey;
+using WebKit::WebIDBKeyPath;
using WebKit::WebIDBKeyRange;
using WebKit::WebIDBObjectStore;
using WebKit::WebIDBTransaction;
@@ -530,9 +532,12 @@ void IndexedDBDispatcherHost::IndexDispatcherHost::OnStoreName(
}
void IndexedDBDispatcherHost::IndexDispatcherHost::OnKeyPath(
- int32 object_id, NullableString16* key_path) {
- parent_->SyncGetter<NullableString16>(
- &map_, object_id, key_path, &WebIDBIndex::keyPathString);
+ int32 object_id, content::IndexedDBKeyPath* key_path) {
+ WebIDBIndex* idb_index = parent_->GetOrTerminateProcess(&map_, object_id);
+ if (!idb_index)
+ return;
+
+ *key_path = content::IndexedDBKeyPath(idb_index->keyPath());
}
void IndexedDBDispatcherHost::IndexDispatcherHost::OnUnique(
@@ -704,9 +709,13 @@ void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnName(
}
void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnKeyPath(
- int32 object_id, NullableString16* keyPath) {
- parent_->SyncGetter<NullableString16>(
- &map_, object_id, keyPath, &WebIDBObjectStore::keyPathString);
+ int32 object_id, content::IndexedDBKeyPath* key_path) {
+ WebIDBObjectStore* idb_object_store = parent_->GetOrTerminateProcess(
+ &map_,object_id);
+ if (!idb_object_store)
+ return;
+
+ *key_path = content::IndexedDBKeyPath(idb_object_store->keyPath());
}
void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnIndexNames(

Powered by Google App Engine
This is Rietveld 408576698