summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsbell@chromium.org <jsbell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-30 20:18:27 +0000
committerjsbell@chromium.org <jsbell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-30 20:18:27 +0000
commit67a85dba124f3a447d69f9144ff45f3f465e1599 (patch)
tree7b5af8c3e25a567d9f85911219f3ed82e422d6bd
parent5d606079f2f32139bf5116a21e78338314c2b918 (diff)
downloadchromium_src-67a85dba124f3a447d69f9144ff45f3f465e1599.zip
chromium_src-67a85dba124f3a447d69f9144ff45f3f465e1599.tar.gz
chromium_src-67a85dba124f3a447d69f9144ff45f3f465e1599.tar.bz2
Use WebIDBKeyPath type in WebKit API, implement IndexedDBKeyPath type.
IndexedDB allows key paths to be strings or arrays of strings (or null, for object stores). Implement the new WebKit API that uses a dedicated type instead of strings, and implement appropriate IPC plumbing. This change is dependent on: https://webkit.org/b/84631 R=darin@chromium.org,tkent@chromium.org,dgrogan@chromium.org,michaeln@chromium.org BUG=112308 Review URL: http://codereview.chromium.org/10204003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134581 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/browser/in_process_webkit/browser_webkitplatformsupport_impl.cc12
-rw-r--r--content/browser/in_process_webkit/browser_webkitplatformsupport_impl.h4
-rw-r--r--content/browser/in_process_webkit/indexed_db_dispatcher_host.cc21
-rw-r--r--content/browser/in_process_webkit/indexed_db_dispatcher_host.h7
-rw-r--r--content/browser/in_process_webkit/indexed_db_key_utility_client.cc24
-rw-r--r--content/browser/in_process_webkit/indexed_db_key_utility_client.h8
-rw-r--r--content/browser/indexed_db/idbbindingutilities_browsertest.cc68
-rw-r--r--content/common/indexed_db/indexed_db_key_path.cc78
-rw-r--r--content/common/indexed_db/indexed_db_key_path.h45
-rw-r--r--content/common/indexed_db/indexed_db_messages.h9
-rw-r--r--content/common/indexed_db/indexed_db_param_traits.cc65
-rw-r--r--content/common/indexed_db/indexed_db_param_traits.h9
-rw-r--r--content/common/indexed_db/proxy_webidbdatabase_impl.cc6
-rw-r--r--content/common/indexed_db/proxy_webidbdatabase_impl.h2
-rw-r--r--content/common/indexed_db/proxy_webidbindex_impl.cc6
-rw-r--r--content/common/indexed_db/proxy_webidbindex_impl.h2
-rw-r--r--content/common/indexed_db/proxy_webidbobjectstore_impl.cc10
-rw-r--r--content/common/indexed_db/proxy_webidbobjectstore_impl.h4
-rw-r--r--content/common/utility_messages.h10
-rw-r--r--content/content_common.gypi2
-rw-r--r--content/ppapi_plugin/ppapi_webkitplatformsupport_impl.cc4
-rw-r--r--content/ppapi_plugin/ppapi_webkitplatformsupport_impl.h6
-rw-r--r--content/renderer/renderer_webkitplatformsupport_impl.cc8
-rw-r--r--content/renderer/renderer_webkitplatformsupport_impl.h4
-rw-r--r--content/utility/utility_thread_impl.cc11
-rw-r--r--content/utility/utility_thread_impl.h8
-rw-r--r--webkit/glue/idb_bindings.cc26
-rw-r--r--webkit/glue/idb_bindings.h10
-rw-r--r--webkit/support/test_webkit_platform_support.cc8
-rw-r--r--webkit/support/test_webkit_platform_support.h4
-rw-r--r--webkit/tools/test_shell/test_shell_webkit_init.cc8
-rw-r--r--webkit/tools/test_shell/test_shell_webkit_init.h4
32 files changed, 344 insertions, 149 deletions
diff --git a/content/browser/in_process_webkit/browser_webkitplatformsupport_impl.cc b/content/browser/in_process_webkit/browser_webkitplatformsupport_impl.cc
index fb50ee3..e62f3d6 100644
--- a/content/browser/in_process_webkit/browser_webkitplatformsupport_impl.cc
+++ b/content/browser/in_process_webkit/browser_webkitplatformsupport_impl.cc
@@ -9,6 +9,7 @@
#include "content/browser/gpu/browser_gpu_channel_host_factory.h"
#include "content/browser/in_process_webkit/indexed_db_key_utility_client.h"
#include "content/common/indexed_db/indexed_db_key.h"
+#include "content/common/indexed_db/indexed_db_key_path.h"
#include "content/public/common/serialized_script_value.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSerializedScriptValue.h"
@@ -130,7 +131,7 @@ int BrowserWebKitPlatformSupportImpl::databaseDeleteFile(
void
BrowserWebKitPlatformSupportImpl::createIDBKeysFromSerializedValuesAndKeyPath(
const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values,
- const WebKit::WebString& keyPath,
+ const WebKit::WebIDBKeyPath& keyPath,
WebKit::WebVector<WebKit::WebIDBKey>& keys) {
std::vector<content::SerializedScriptValue> std_values;
@@ -141,8 +142,8 @@ BrowserWebKitPlatformSupportImpl::createIDBKeysFromSerializedValuesAndKeyPath(
std::vector<IndexedDBKey> std_keys;
IndexedDBKeyUtilityClient::
- CreateIDBKeysFromSerializedValuesAndKeyPath(std_values, keyPath,
- &std_keys);
+ CreateIDBKeysFromSerializedValuesAndKeyPath(
+ std_values, content::IndexedDBKeyPath(keyPath), &std_keys);
keys = std_keys;
}
@@ -150,9 +151,10 @@ BrowserWebKitPlatformSupportImpl::createIDBKeysFromSerializedValuesAndKeyPath(
WebKit::WebSerializedScriptValue
BrowserWebKitPlatformSupportImpl::injectIDBKeyIntoSerializedValue(
const WebKit::WebIDBKey& key, const WebKit::WebSerializedScriptValue& value,
- const WebKit::WebString& keyPath) {
+ const WebKit::WebIDBKeyPath& keyPath) {
return IndexedDBKeyUtilityClient::InjectIDBKeyIntoSerializedValue(
- IndexedDBKey(key), content::SerializedScriptValue(value), keyPath);
+ IndexedDBKey(key), content::SerializedScriptValue(value),
+ content::IndexedDBKeyPath(keyPath));
}
GpuChannelHostFactory*
diff --git a/content/browser/in_process_webkit/browser_webkitplatformsupport_impl.h b/content/browser/in_process_webkit/browser_webkitplatformsupport_impl.h
index 6ae32a5..3509341 100644
--- a/content/browser/in_process_webkit/browser_webkitplatformsupport_impl.h
+++ b/content/browser/in_process_webkit/browser_webkitplatformsupport_impl.h
@@ -43,12 +43,12 @@ class BrowserWebKitPlatformSupportImpl :
bool sync_dir);
virtual void createIDBKeysFromSerializedValuesAndKeyPath(
const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values,
- const WebKit::WebString& keyPath,
+ const WebKit::WebIDBKeyPath& keyPath,
WebKit::WebVector<WebKit::WebIDBKey>& keys);
virtual WebKit::WebSerializedScriptValue injectIDBKeyIntoSerializedValue(
const WebKit::WebIDBKey& key,
const WebKit::WebSerializedScriptValue& value,
- const WebKit::WebString& keyPath);
+ const WebKit::WebIDBKeyPath& keyPath);
protected:
virtual GpuChannelHostFactory* GetGpuChannelHostFactory() OVERRIDE;
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 e3d2234..5577ca5 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(
diff --git a/content/browser/in_process_webkit/indexed_db_dispatcher_host.h b/content/browser/in_process_webkit/indexed_db_dispatcher_host.h
index c22ac1c..80da390 100644
--- a/content/browser/in_process_webkit/indexed_db_dispatcher_host.h
+++ b/content/browser/in_process_webkit/indexed_db_dispatcher_host.h
@@ -17,7 +17,6 @@ class GURL;
class IndexedDBContextImpl;
class IndexedDBKey;
class IndexedDBKeyRange;
-class NullableString16;
struct IndexedDBHostMsg_DatabaseCreateObjectStore_Params;
struct IndexedDBHostMsg_FactoryDeleteDatabase_Params;
struct IndexedDBHostMsg_FactoryGetDatabaseNames_Params;
@@ -39,6 +38,7 @@ class WebIDBTransaction;
}
namespace content {
+class IndexedDBKeyPath;
class SerializedScriptValue;
}
@@ -156,7 +156,7 @@ class IndexedDBDispatcherHost : public content::BrowserMessageFilter {
void OnName(int32 idb_index_id, string16* name);
void OnStoreName(int32 idb_index_id, string16* store_name);
- void OnKeyPath(int32 idb_index_id, NullableString16* key_path);
+ void OnKeyPath(int32 idb_index_id, content::IndexedDBKeyPath* key_path);
void OnUnique(int32 idb_index_id, bool* unique);
void OnMultiEntry(int32 idb_index_id, bool* multi_entry);
void OnOpenObjectCursor(
@@ -193,7 +193,8 @@ class IndexedDBDispatcherHost : public content::BrowserMessageFilter {
void Send(IPC::Message* message);
void OnName(int32 idb_object_store_id, string16* name);
- void OnKeyPath(int32 idb_object_store_id, NullableString16* keyPath);
+ void OnKeyPath(int32 idb_object_store_id,
+ content::IndexedDBKeyPath* keyPath);
void OnIndexNames(int32 idb_object_store_id,
std::vector<string16>* index_names);
void OnGet(int idb_object_store_id,
diff --git a/content/browser/in_process_webkit/indexed_db_key_utility_client.cc b/content/browser/in_process_webkit/indexed_db_key_utility_client.cc
index 5ab88ee..c1c88e6 100644
--- a/content/browser/in_process_webkit/indexed_db_key_utility_client.cc
+++ b/content/browser/in_process_webkit/indexed_db_key_utility_client.cc
@@ -9,12 +9,14 @@
#include "base/synchronization/waitable_event.h"
#include "content/browser/utility_process_host_impl.h"
#include "content/common/indexed_db/indexed_db_key.h"
+#include "content/common/indexed_db/indexed_db_key_path.h"
#include "content/common/indexed_db/indexed_db_messages.h"
#include "content/common/utility_messages.h"
#include "content/public/browser/utility_process_host_client.h"
#include "content/public/common/serialized_script_value.h"
using content::BrowserThread;
+using content::IndexedDBKeyPath;
using content::UtilityProcessHostClient;
// This class is used to obtain IndexedDBKeys from SerializedScriptValues
@@ -36,7 +38,7 @@ class KeyUtilityClientImpl
// Synchronously obtain the |keys| from |values| for the given |key_path|.
void CreateIDBKeysFromSerializedValuesAndKeyPath(
const std::vector<content::SerializedScriptValue>& values,
- const string16& key_path,
+ const IndexedDBKeyPath& key_path,
std::vector<IndexedDBKey>* keys);
// Synchronously inject |key| into |value| using the given |key_path|,
@@ -44,7 +46,7 @@ class KeyUtilityClientImpl
content::SerializedScriptValue InjectIDBKeyIntoSerializedValue(
const IndexedDBKey& key,
const content::SerializedScriptValue& value,
- const string16& key_path);
+ const IndexedDBKeyPath& key_path);
private:
class Client : public UtilityProcessHostClient {
@@ -77,11 +79,11 @@ class KeyUtilityClientImpl
void EndUtilityProcessInternal();
void CallStartIDBKeyFromValueAndKeyPathFromIOThread(
const std::vector<content::SerializedScriptValue>& values,
- const string16& key_path);
+ const IndexedDBKeyPath& key_path);
void CallStartInjectIDBKeyFromIOThread(
const IndexedDBKey& key,
const content::SerializedScriptValue& value,
- const string16& key_path);
+ const IndexedDBKeyPath& key_path);
void SetKeys(const std::vector<IndexedDBKey>& keys);
void FinishCreatingKeys();
@@ -138,7 +140,7 @@ void IndexedDBKeyUtilityClient::Shutdown() {
// static
void IndexedDBKeyUtilityClient::CreateIDBKeysFromSerializedValuesAndKeyPath(
const std::vector<content::SerializedScriptValue>& values,
- const string16& key_path,
+ const IndexedDBKeyPath& key_path,
std::vector<IndexedDBKey>* keys) {
IndexedDBKeyUtilityClient* instance = client_instance.Pointer();
@@ -160,7 +162,7 @@ void IndexedDBKeyUtilityClient::CreateIDBKeysFromSerializedValuesAndKeyPath(
content::SerializedScriptValue
IndexedDBKeyUtilityClient::InjectIDBKeyIntoSerializedValue(
const IndexedDBKey& key, const content::SerializedScriptValue& value,
- const string16& key_path) {
+ const IndexedDBKeyPath& key_path) {
IndexedDBKeyUtilityClient* instance = client_instance.Pointer();
if (instance->is_shutdown_)
@@ -212,7 +214,7 @@ void KeyUtilityClientImpl::StartUtilityProcess() {
void KeyUtilityClientImpl::CreateIDBKeysFromSerializedValuesAndKeyPath(
const std::vector<content::SerializedScriptValue>& values,
- const string16& key_path,
+ const IndexedDBKeyPath& key_path,
std::vector<IndexedDBKey>* keys) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED));
if (state_ == STATE_SHUTDOWN) {
@@ -234,7 +236,7 @@ content::SerializedScriptValue
KeyUtilityClientImpl::InjectIDBKeyIntoSerializedValue(
const IndexedDBKey& key,
const content::SerializedScriptValue& value,
- const string16& key_path) {
+ const IndexedDBKeyPath& key_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED));
if (state_ == STATE_SHUTDOWN)
return content::SerializedScriptValue();
@@ -306,7 +308,7 @@ void KeyUtilityClientImpl::EndUtilityProcessInternal() {
void KeyUtilityClientImpl::CallStartIDBKeyFromValueAndKeyPathFromIOThread(
const std::vector<content::SerializedScriptValue>& values,
- const string16& key_path) {
+ const IndexedDBKeyPath& key_path) {
if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
@@ -326,7 +328,7 @@ void KeyUtilityClientImpl::CallStartIDBKeyFromValueAndKeyPathFromIOThread(
void KeyUtilityClientImpl::CallStartInjectIDBKeyFromIOThread(
const IndexedDBKey& key,
const content::SerializedScriptValue& value,
- const string16& key_path) {
+ const IndexedDBKeyPath& key_path) {
if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
@@ -380,8 +382,6 @@ bool KeyUtilityClientImpl::Client::OnMessageReceived(
IPC_BEGIN_MESSAGE_MAP(KeyUtilityClientImpl::Client, message)
IPC_MESSAGE_HANDLER(UtilityHostMsg_IDBKeysFromValuesAndKeyPath_Succeeded,
OnIDBKeysFromValuesAndKeyPathSucceeded)
- IPC_MESSAGE_HANDLER(UtilityHostMsg_IDBKeysFromValuesAndKeyPath_Failed,
- OnIDBKeysFromValuesAndKeyPathFailed)
IPC_MESSAGE_HANDLER(UtilityHostMsg_InjectIDBKey_Finished,
OnInjectIDBKeyFinished)
IPC_MESSAGE_UNHANDLED(handled = false)
diff --git a/content/browser/in_process_webkit/indexed_db_key_utility_client.h b/content/browser/in_process_webkit/indexed_db_key_utility_client.h
index ad927e4..af7147a 100644
--- a/content/browser/in_process_webkit/indexed_db_key_utility_client.h
+++ b/content/browser/in_process_webkit/indexed_db_key_utility_client.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -9,7 +9,6 @@
#include <vector>
#include "base/memory/ref_counted.h"
-#include "base/string16.h"
#include "content/common/content_export.h"
class IndexedDBKey;
@@ -21,6 +20,7 @@ struct DefaultLazyInstanceTraits;
} // namespace base
namespace content {
+class IndexedDBKeyPath;
class SerializedScriptValue;
}
@@ -32,7 +32,7 @@ class IndexedDBKeyUtilityClient {
// Synchronously obtain the |keys| from |values| for the given |key_path|.
static void CreateIDBKeysFromSerializedValuesAndKeyPath(
const std::vector<content::SerializedScriptValue>& values,
- const string16& key_path,
+ const content::IndexedDBKeyPath& key_path,
std::vector<IndexedDBKey>* keys);
// Synchronously inject |key| into |value| using |key_path|. Returns the new
@@ -40,7 +40,7 @@ class IndexedDBKeyUtilityClient {
static content::SerializedScriptValue InjectIDBKeyIntoSerializedValue(
const IndexedDBKey& key,
const content::SerializedScriptValue& value,
- const string16& key_path);
+ const content::IndexedDBKeyPath& key_path);
// Shut down the underlying implementation. Must be called on the IO thread.
static void Shutdown();
diff --git a/content/browser/indexed_db/idbbindingutilities_browsertest.cc b/content/browser/indexed_db/idbbindingutilities_browsertest.cc
index aeecf84..b83df41 100644
--- a/content/browser/indexed_db/idbbindingutilities_browsertest.cc
+++ b/content/browser/indexed_db/idbbindingutilities_browsertest.cc
@@ -9,6 +9,7 @@
#include "content/browser/utility_process_host_impl.h"
#include "content/public/browser/utility_process_host_client.h"
#include "content/common/indexed_db/indexed_db_key.h"
+#include "content/common/indexed_db/indexed_db_key_path.h"
#include "content/common/utility_messages.h"
#include "content/common/webkitplatformsupport_impl.h"
#include "content/public/common/serialized_script_value.h"
@@ -23,6 +24,7 @@ using content::BrowserThread;
using content::UtilityProcessHost;
using content::UtilityProcessHostClient;
using WebKit::WebSerializedScriptValue;
+using WebKit::WebIDBKeyPath;
// Enables calling WebKit::shutdown no matter where a "return" happens.
class ScopedShutdownWebKit {
@@ -66,11 +68,10 @@ TEST(IDBKeyPathWithoutSandbox, Value) {
WebSerializedScriptValue::fromString(string16()));
std::vector<WebKit::WebIDBKey> values;
- string16 key_path;
- bool error;
+ content::IndexedDBKeyPath key_path;
- key_path = UTF8ToUTF16("foo");
- error = webkit_glue::IDBKeysFromValuesAndKeyPath(
+ key_path.SetString(UTF8ToUTF16("foo"));
+ webkit_glue::IDBKeysFromValuesAndKeyPath(
serialized_values, key_path, &values);
ASSERT_EQ(size_t(4), values.size());
@@ -79,11 +80,10 @@ TEST(IDBKeyPathWithoutSandbox, Value) {
ASSERT_EQ(WebKit::WebIDBKey::InvalidType, values[1].type());
ASSERT_EQ(WebKit::WebIDBKey::NullType, values[2].type());
ASSERT_EQ(WebKit::WebIDBKey::NullType, values[3].type());
- ASSERT_FALSE(error);
values.clear();
- key_path = UTF8ToUTF16("PropertyNotAvailable");
- error = webkit_glue::IDBKeysFromValuesAndKeyPath(
+ key_path.SetString(UTF8ToUTF16("PropertyNotAvailable"));
+ webkit_glue::IDBKeysFromValuesAndKeyPath(
serialized_values, key_path, &values);
ASSERT_EQ(size_t(4), values.size());
@@ -91,19 +91,10 @@ TEST(IDBKeyPathWithoutSandbox, Value) {
ASSERT_EQ(WebKit::WebIDBKey::NullType, values[1].type());
ASSERT_EQ(WebKit::WebIDBKey::NullType, values[2].type());
ASSERT_EQ(WebKit::WebIDBKey::NullType, values[3].type());
- ASSERT_FALSE(error);
values.clear();
- key_path = UTF8ToUTF16("!+Invalid[KeyPath[[[");
- error = webkit_glue::IDBKeysFromValuesAndKeyPath(
- serialized_values, key_path, &values);
-
- ASSERT_TRUE(error);
- ASSERT_EQ(size_t(4), values.size());
- ASSERT_EQ(WebKit::WebIDBKey::NullType, values[0].type());
- ASSERT_EQ(WebKit::WebIDBKey::NullType, values[1].type());
- ASSERT_EQ(WebKit::WebIDBKey::NullType, values[2].type());
- ASSERT_EQ(WebKit::WebIDBKey::NullType, values[3].type());
+ key_path.SetString(UTF8ToUTF16("!+Invalid[KeyPath[[["));
+ ASSERT_FALSE(key_path.IsValid());
}
class IDBKeyPathHelper : public UtilityProcessHostClient {
@@ -158,7 +149,7 @@ class IDBKeyPathHelper : public UtilityProcessHostClient {
void CheckValuesForKeyPath(
int id,
const std::vector<content::SerializedScriptValue>& serialized_values,
- const string16& key_path) {
+ const content::IndexedDBKeyPath& key_path) {
if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
@@ -175,7 +166,7 @@ class IDBKeyPathHelper : public UtilityProcessHostClient {
void CheckInjectValue(const IndexedDBKey& key,
const content::SerializedScriptValue& value,
- const string16& key_path) {
+ const content::IndexedDBKeyPath& key_path) {
if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
@@ -196,8 +187,6 @@ class IDBKeyPathHelper : public UtilityProcessHostClient {
IPC_BEGIN_MESSAGE_MAP_EX(IDBKeyPathHelper, message, msg_is_ok)
IPC_MESSAGE_HANDLER(UtilityHostMsg_IDBKeysFromValuesAndKeyPath_Succeeded,
OnIDBKeysFromValuesAndKeyPathSucceeded)
- IPC_MESSAGE_HANDLER(UtilityHostMsg_IDBKeysFromValuesAndKeyPath_Failed,
- OnIDBKeysFromValuesAndKeyPathFailed)
IPC_MESSAGE_HANDLER(UtilityHostMsg_InjectIDBKey_Finished,
OnInjectIDBKeyFinished)
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -278,7 +267,7 @@ class ScopedIDBKeyPathHelper {
int id,
const std::vector<content::SerializedScriptValue>&
serialized_script_values,
- const string16& key_path) {
+ const content::IndexedDBKeyPath& key_path) {
key_path_helper_->CheckValuesForKeyPath(id, serialized_script_values,
key_path);
ui_test_utils::RunMessageLoop();
@@ -286,7 +275,7 @@ class ScopedIDBKeyPathHelper {
void CheckInjectValue(const IndexedDBKey& key,
const content::SerializedScriptValue& value,
- const string16& key_path) {
+ const content::IndexedDBKeyPath& key_path) {
key_path_helper_->CheckInjectValue(key, value, key_path);
ui_test_utils::RunMessageLoop();
}
@@ -333,8 +322,11 @@ IN_PROC_BROWSER_TEST_F(InProcessBrowserTest, IDBKeyPathExtract) {
expected_keys.push_back(null_key);
scoped_helper.SetExpectedKeys(kId, expected_keys, false);
+
+ content::IndexedDBKeyPath key_path;
+ key_path.SetString(UTF8ToUTF16("foo"));
scoped_helper.CheckValuesForKeyPath(
- kId, serialized_values, UTF8ToUTF16("foo"));
+ kId, serialized_values, key_path);
}
IN_PROC_BROWSER_TEST_F(InProcessBrowserTest, IDBKeyPathPropertyNotAvailable) {
@@ -359,8 +351,9 @@ IN_PROC_BROWSER_TEST_F(InProcessBrowserTest, IDBKeyPathPropertyNotAvailable) {
serialized_values.push_back(
content::SerializedScriptValue(true, false, string16()));
- scoped_helper.CheckValuesForKeyPath(kId, serialized_values,
- UTF8ToUTF16("PropertyNotAvailable"));
+ content::IndexedDBKeyPath key_path;
+ key_path.SetString(UTF8ToUTF16("PropertyNotAvailable"));
+ scoped_helper.CheckValuesForKeyPath(kId, serialized_values, key_path);
}
IN_PROC_BROWSER_TEST_F(InProcessBrowserTest, IDBKeyPathMultipleCalls) {
@@ -372,7 +365,7 @@ IN_PROC_BROWSER_TEST_F(InProcessBrowserTest, IDBKeyPathMultipleCalls) {
null_value.SetNull();
expected_keys.push_back(null_value);
expected_keys.push_back(null_value);
- scoped_helper.SetExpectedKeys(kId, expected_keys, true);
+ scoped_helper.SetExpectedKeys(kId, expected_keys, false);
std::vector<content::SerializedScriptValue> serialized_values;
@@ -386,8 +379,9 @@ IN_PROC_BROWSER_TEST_F(InProcessBrowserTest, IDBKeyPathMultipleCalls) {
serialized_values.push_back(
content::SerializedScriptValue(true, false, string16()));
- scoped_helper.CheckValuesForKeyPath(kId, serialized_values,
- UTF8ToUTF16("!+Invalid[KeyPath[[["));
+ content::IndexedDBKeyPath key_path;
+ key_path.SetString(UTF8ToUTF16("PropertyNotAvailable"));
+ scoped_helper.CheckValuesForKeyPath(kId, serialized_values, key_path);
// Call again with the Utility process in batch mode and with valid keys.
expected_keys.clear();
@@ -396,8 +390,8 @@ IN_PROC_BROWSER_TEST_F(InProcessBrowserTest, IDBKeyPathMultipleCalls) {
expected_keys.push_back(value);
expected_keys.push_back(null_value);
scoped_helper.SetExpectedKeys(kId + 1, expected_keys, false);
- scoped_helper.CheckValuesForKeyPath(kId + 1, serialized_values,
- UTF8ToUTF16("foo"));
+ key_path.SetString(UTF8ToUTF16("foo"));
+ scoped_helper.CheckValuesForKeyPath(kId + 1, serialized_values, key_path);
}
IN_PROC_BROWSER_TEST_F(InProcessBrowserTest, InjectIDBKey) {
@@ -418,12 +412,15 @@ IN_PROC_BROWSER_TEST_F(InProcessBrowserTest, InjectIDBKey) {
content::SerializedScriptValue expected_value(
false, false, string16(expected_data, arraysize(expected_data)));
scoped_helper.SetExpectedValue(expected_value);
- scoped_helper.CheckInjectValue(key, value, UTF8ToUTF16("bar"));
+ content::IndexedDBKeyPath key_path;
+ key_path.SetString(UTF8ToUTF16("bar"));
+ scoped_helper.CheckInjectValue(key, value, key_path);
// Should fail - can't apply properties to string value of key foo
const content::SerializedScriptValue failure_value;
scoped_helper.SetExpectedValue(failure_value);
- scoped_helper.CheckInjectValue(key, value, UTF8ToUTF16("foo.bad.path"));
+ key_path.SetString(UTF8ToUTF16("foo.bad.path"));
+ scoped_helper.CheckInjectValue(key, value, key_path);
// {foo: 'zoo', bar: {baz: 'myNewKey'}}
const char16 expected_data2[] = {0x01ff, 0x003f, 0x3f6f, 0x5301, 0x6603,
@@ -435,5 +432,6 @@ IN_PROC_BROWSER_TEST_F(InProcessBrowserTest, InjectIDBKey) {
content::SerializedScriptValue expected_value2(
false, false, string16(expected_data2, arraysize(expected_data2)));
scoped_helper.SetExpectedValue(expected_value2);
- scoped_helper.CheckInjectValue(key, value, UTF8ToUTF16("bar.baz"));
+ key_path.SetString(UTF8ToUTF16("bar.baz"));
+ scoped_helper.CheckInjectValue(key, value, key_path);
}
diff --git a/content/common/indexed_db/indexed_db_key_path.cc b/content/common/indexed_db/indexed_db_key_path.cc
new file mode 100644
index 0000000..f042d01
--- /dev/null
+++ b/content/common/indexed_db/indexed_db_key_path.cc
@@ -0,0 +1,78 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/common/indexed_db/indexed_db_key_path.h"
+
+#include "base/logging.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
+
+namespace content {
+
+using WebKit::WebIDBKeyPath;
+using WebKit::WebString;
+using WebKit::WebVector;
+
+IndexedDBKeyPath::IndexedDBKeyPath()
+ : type_(WebIDBKeyPath::NullType) {
+}
+
+IndexedDBKeyPath::IndexedDBKeyPath(const WebIDBKeyPath& key) {
+ Set(key);
+}
+
+IndexedDBKeyPath::~IndexedDBKeyPath() {
+}
+
+void IndexedDBKeyPath::SetNull() {
+ type_ = WebIDBKeyPath::NullType;
+}
+
+void IndexedDBKeyPath::SetArray(const std::vector<string16>& array) {
+ type_ = WebIDBKeyPath::ArrayType;
+ array_ = array;
+}
+
+void IndexedDBKeyPath::SetString(const string16& string) {
+ type_ = WebIDBKeyPath::StringType;
+ string_ = string;
+}
+
+void IndexedDBKeyPath::Set(const WebIDBKeyPath& keyPath) {
+ type_ = keyPath.type();
+ array_.clear();
+ string_.clear();
+ switch (type_) {
+ case WebIDBKeyPath::ArrayType: {
+ WebVector<WebString> array = keyPath.array();
+ for (size_t i = 0; i < array.size(); ++i)
+ array_.push_back(static_cast<string16>(array[i]));
+ break;
+ }
+ case WebIDBKeyPath::NullType:
+ break;
+ case WebIDBKeyPath::StringType:
+ string_ = static_cast<string16>(keyPath.string());
+ }
+}
+
+bool IndexedDBKeyPath::IsValid() const {
+ WebIDBKeyPath key_path = *this;
+ return key_path.isValid();
+}
+
+IndexedDBKeyPath::operator WebIDBKeyPath() const {
+ switch (type_) {
+ case WebIDBKeyPath::ArrayType:
+ return WebIDBKeyPath::create(array_);
+ case WebIDBKeyPath::StringType:
+ return WebIDBKeyPath::create(WebString(string_));
+ case WebIDBKeyPath::NullType:
+ return WebIDBKeyPath::createNull();
+ }
+ NOTREACHED();
+ return WebIDBKeyPath::createNull();
+}
+
+} // namespace content
diff --git a/content/common/indexed_db/indexed_db_key_path.h b/content/common/indexed_db/indexed_db_key_path.h
new file mode 100644
index 0000000..5c09d56
--- /dev/null
+++ b/content/common/indexed_db/indexed_db_key_path.h
@@ -0,0 +1,45 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_PATH_H_
+#define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_PATH_H_
+#pragma once
+
+#include <vector>
+
+#include "base/basictypes.h"
+#include "base/string16.h"
+#include "content/common/content_export.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyPath.h"
+
+namespace content {
+
+class CONTENT_EXPORT IndexedDBKeyPath {
+ public:
+ IndexedDBKeyPath(); // Defaults to WebKit::WebIDBKeyPath::NullType.
+ explicit IndexedDBKeyPath(const WebKit::WebIDBKeyPath& keyPath);
+ ~IndexedDBKeyPath();
+
+ void SetNull();
+ void SetArray(const std::vector<string16>& array);
+ void SetString(const string16& string);
+ void Set(const WebKit::WebIDBKeyPath& key);
+
+ bool IsValid() const;
+
+ WebKit::WebIDBKeyPath::Type type() const { return type_; }
+ const std::vector<string16>& array() const { return array_; }
+ const string16& string() const { return string_; }
+
+ operator WebKit::WebIDBKeyPath() const;
+
+ private:
+ WebKit::WebIDBKeyPath::Type type_;
+ std::vector<string16> array_;
+ string16 string_;
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_PATH_H_
diff --git a/content/common/indexed_db/indexed_db_messages.h b/content/common/indexed_db/indexed_db_messages.h
index 3f0ec5c..7f6ea28 100644
--- a/content/common/indexed_db/indexed_db_messages.h
+++ b/content/common/indexed_db/indexed_db_messages.h
@@ -7,6 +7,7 @@
#include <vector>
#include "content/common/indexed_db/indexed_db_key.h"
+#include "content/common/indexed_db/indexed_db_key_path.h"
#include "content/common/indexed_db/indexed_db_key_range.h"
#include "content/common/indexed_db/indexed_db_param_traits.h"
#include "content/public/common/serialized_script_value.h"
@@ -57,7 +58,7 @@ IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateObjectStore_Params)
// The name of the object store.
IPC_STRUCT_MEMBER(string16, name)
// The keyPath of the object store.
- IPC_STRUCT_MEMBER(NullableString16, key_path)
+ IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path)
// Whether the object store created should have a key generator.
IPC_STRUCT_MEMBER(bool, auto_increment)
// The transaction this is associated with.
@@ -116,7 +117,7 @@ IPC_STRUCT_BEGIN(IndexedDBHostMsg_ObjectStoreCreateIndex_Params)
// The name of the index.
IPC_STRUCT_MEMBER(string16, name)
// The keyPath of the index.
- IPC_STRUCT_MEMBER(NullableString16, key_path)
+ IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path)
// Whether the index created has unique keys.
IPC_STRUCT_MEMBER(bool, unique)
// Whether the index created produces keys for each array entry.
@@ -384,7 +385,7 @@ IPC_SYNC_MESSAGE_CONTROL1_1(IndexedDBHostMsg_IndexStoreName,
// WebIDBIndex::keyPath() message.
IPC_SYNC_MESSAGE_CONTROL1_1(IndexedDBHostMsg_IndexKeyPath,
int32, /* idb_index_id */
- NullableString16 /* key_path */)
+ content::IndexedDBKeyPath /* key_path */)
// WebIDBIndex::unique() message.
IPC_SYNC_MESSAGE_CONTROL1_1(IndexedDBHostMsg_IndexUnique,
@@ -441,7 +442,7 @@ IPC_SYNC_MESSAGE_CONTROL1_1(IndexedDBHostMsg_ObjectStoreName,
// WebIDBObjectStore::keyPath() message.
IPC_SYNC_MESSAGE_CONTROL1_1(IndexedDBHostMsg_ObjectStoreKeyPath,
int32, /* idb_object_store_id */
- NullableString16 /* keyPath */)
+ content::IndexedDBKeyPath /* keyPath */)
// WebIDBObjectStore::indexNames() message.
IPC_SYNC_MESSAGE_CONTROL1_1(IndexedDBHostMsg_ObjectStoreIndexNames,
diff --git a/content/common/indexed_db/indexed_db_param_traits.cc b/content/common/indexed_db/indexed_db_param_traits.cc
index 57fca9a..101cd82 100644
--- a/content/common/indexed_db/indexed_db_param_traits.cc
+++ b/content/common/indexed_db/indexed_db_param_traits.cc
@@ -5,6 +5,7 @@
#include "content/common/indexed_db/indexed_db_param_traits.h"
#include "content/common/indexed_db/indexed_db_key.h"
+#include "content/common/indexed_db/indexed_db_key_path.h"
#include "content/common/indexed_db/indexed_db_key_range.h"
#include "content/public/common/serialized_script_value.h"
#include "ipc/ipc_message_utils.h"
@@ -141,6 +142,70 @@ void ParamTraits<IndexedDBKey>::Log(const param_type& p, std::string* l) {
l->append(")");
}
+void ParamTraits<content::IndexedDBKeyPath>::Write(Message* m,
+ const param_type& p) {
+ WriteParam(m, int(p.type()));
+ switch (p.type()) {
+ case WebKit::WebIDBKeyPath::ArrayType:
+ WriteParam(m, p.array());
+ return;
+ case WebKit::WebIDBKeyPath::StringType:
+ WriteParam(m, p.string());
+ return;
+ case WebKit::WebIDBKeyPath::NullType:
+ return;
+ }
+ NOTREACHED();
+}
+
+bool ParamTraits<content::IndexedDBKeyPath>::Read(const Message* m,
+ PickleIterator* iter,
+ param_type* r) {
+ int type;
+ if (!ReadParam(m, iter, &type))
+ return false;
+
+ switch (type) {
+ case WebKit::WebIDBKeyPath::ArrayType: {
+ std::vector<string16> array;
+ if (!ReadParam(m, iter, &array))
+ return false;
+ r->SetArray(array);
+ return true;
+ }
+ case WebKit::WebIDBKeyPath::StringType: {
+ string16 string;
+ if (!ReadParam(m, iter, &string))
+ return false;
+ r->SetString(string);
+ return true;
+ }
+ case WebKit::WebIDBKeyPath::NullType:
+ r->SetNull();
+ return true;
+ }
+ NOTREACHED();
+ return false;
+}
+
+void ParamTraits<content::IndexedDBKeyPath>::Log(const param_type& p,
+ std::string* l) {
+ l->append("<IndexedDBKeyPath>(");
+ LogParam(int(p.type()), l);
+ l->append(", ");
+ LogParam(p.string(), l);
+ l->append(", ");
+ l->append("[");
+ std::vector<string16>::const_iterator it = p.array().begin();
+ while (it != p.array().end()) {
+ LogParam(*it, l);
+ ++it;
+ if (it != p.array().end())
+ l->append(", ");
+ }
+ l->append("])");
+}
+
void ParamTraits<IndexedDBKeyRange>::Write(Message* m, const param_type& p) {
WriteParam(m, p.lower());
WriteParam(m, p.upper());
diff --git a/content/common/indexed_db/indexed_db_param_traits.h b/content/common/indexed_db/indexed_db_param_traits.h
index 3dfd5b8..274e653 100644
--- a/content/common/indexed_db/indexed_db_param_traits.h
+++ b/content/common/indexed_db/indexed_db_param_traits.h
@@ -13,6 +13,7 @@ class IndexedDBKey;
class IndexedDBKeyRange;
namespace content {
+class IndexedDBKeyPath;
class SerializedScriptValue;
}
@@ -40,6 +41,14 @@ struct ParamTraits<IndexedDBKey> {
};
template <>
+struct ParamTraits<content::IndexedDBKeyPath> {
+ typedef content::IndexedDBKeyPath param_type;
+ static void Write(Message* m, const param_type& p);
+ static bool Read(const Message* m, PickleIterator* iter, param_type* r);
+ static void Log(const param_type& p, std::string* l);
+};
+
+template <>
struct ParamTraits<IndexedDBKeyRange> {
typedef IndexedDBKeyRange param_type;
static void Write(Message* m, const param_type& p);
diff --git a/content/common/indexed_db/proxy_webidbdatabase_impl.cc b/content/common/indexed_db/proxy_webidbdatabase_impl.cc
index c1e4078..5e53f7b 100644
--- a/content/common/indexed_db/proxy_webidbdatabase_impl.cc
+++ b/content/common/indexed_db/proxy_webidbdatabase_impl.cc
@@ -9,6 +9,7 @@
#include "content/common/indexed_db/indexed_db_dispatcher.h"
#include "content/common/indexed_db/proxy_webidbobjectstore_impl.h"
#include "content/common/indexed_db/proxy_webidbtransaction_impl.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyPath.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
#include "webkit/glue/worker_task_runner.h"
@@ -18,6 +19,7 @@ using WebKit::WebExceptionCode;
using WebKit::WebFrame;
using WebKit::WebIDBCallbacks;
using WebKit::WebIDBDatabaseCallbacks;
+using WebKit::WebIDBKeyPath;
using WebKit::WebIDBTransaction;
using WebKit::WebString;
using WebKit::WebVector;
@@ -64,13 +66,13 @@ WebDOMStringList RendererWebIDBDatabaseImpl::objectStoreNames() const {
WebKit::WebIDBObjectStore* RendererWebIDBDatabaseImpl::createObjectStore(
const WebKit::WebString& name,
- const WebKit::WebString& key_path,
+ const WebKit::WebIDBKeyPath& key_path,
bool auto_increment,
const WebKit::WebIDBTransaction& transaction,
WebExceptionCode& ec) {
IndexedDBHostMsg_DatabaseCreateObjectStore_Params params;
params.name = name;
- params.key_path = key_path;
+ params.key_path = content::IndexedDBKeyPath(key_path);
params.auto_increment = auto_increment;
params.transaction_id = IndexedDBDispatcher::TransactionId(transaction);
params.idb_database_id = idb_database_id_;
diff --git a/content/common/indexed_db/proxy_webidbdatabase_impl.h b/content/common/indexed_db/proxy_webidbdatabase_impl.h
index 77b064f..a6e7154 100644
--- a/content/common/indexed_db/proxy_webidbdatabase_impl.h
+++ b/content/common/indexed_db/proxy_webidbdatabase_impl.h
@@ -27,7 +27,7 @@ class RendererWebIDBDatabaseImpl : public WebKit::WebIDBDatabase {
virtual WebKit::WebDOMStringList objectStoreNames() const;
virtual WebKit::WebIDBObjectStore* createObjectStore(
const WebKit::WebString& name,
- const WebKit::WebString& key_path,
+ const WebKit::WebIDBKeyPath& key_path,
bool auto_increment,
const WebKit::WebIDBTransaction& transaction,
WebKit::WebExceptionCode& ec);
diff --git a/content/common/indexed_db/proxy_webidbindex_impl.cc b/content/common/indexed_db/proxy_webidbindex_impl.cc
index 4a58327..9535d6a1 100644
--- a/content/common/indexed_db/proxy_webidbindex_impl.cc
+++ b/content/common/indexed_db/proxy_webidbindex_impl.cc
@@ -8,11 +8,13 @@
#include "content/common/indexed_db/indexed_db_messages.h"
#include "content/common/indexed_db/proxy_webidbtransaction_impl.h"
#include "content/common/child_thread.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyPath.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
using WebKit::WebExceptionCode;
using WebKit::WebDOMStringList;
+using WebKit::WebIDBKeyPath;
using WebKit::WebString;
using WebKit::WebVector;
@@ -43,8 +45,8 @@ WebString RendererWebIDBIndexImpl::storeName() const {
return result;
}
-WebString RendererWebIDBIndexImpl::keyPathString() const {
- NullableString16 result;
+WebIDBKeyPath RendererWebIDBIndexImpl::keyPath() const {
+ content::IndexedDBKeyPath result;
IndexedDBDispatcher::Send(
new IndexedDBHostMsg_IndexKeyPath(idb_index_id_, &result));
return result;
diff --git a/content/common/indexed_db/proxy_webidbindex_impl.h b/content/common/indexed_db/proxy_webidbindex_impl.h
index 0b806f0..e0384c3 100644
--- a/content/common/indexed_db/proxy_webidbindex_impl.h
+++ b/content/common/indexed_db/proxy_webidbindex_impl.h
@@ -18,7 +18,7 @@ class RendererWebIDBIndexImpl : public WebKit::WebIDBIndex {
// WebKit::WebIDBIndex
virtual WebKit::WebString name() const;
virtual WebKit::WebString storeName() const;
- virtual WebKit::WebString keyPathString() const;
+ virtual WebKit::WebIDBKeyPath keyPath() const;
virtual bool unique() const;
virtual bool multiEntry() const;
diff --git a/content/common/indexed_db/proxy_webidbobjectstore_impl.cc b/content/common/indexed_db/proxy_webidbobjectstore_impl.cc
index 70e687e..2e0eec4 100644
--- a/content/common/indexed_db/proxy_webidbobjectstore_impl.cc
+++ b/content/common/indexed_db/proxy_webidbobjectstore_impl.cc
@@ -12,6 +12,7 @@
#include "content/common/child_thread.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMStringList.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.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/WebIDBTransaction.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSerializedScriptValue.h"
@@ -21,6 +22,7 @@ using WebKit::WebDOMStringList;
using WebKit::WebExceptionCode;
using WebKit::WebFrame;
using WebKit::WebIDBCallbacks;
+using WebKit::WebIDBKeyPath;
using WebKit::WebIDBKeyRange;
using WebKit::WebIDBIndex;
using WebKit::WebIDBKey;
@@ -49,8 +51,8 @@ WebString RendererWebIDBObjectStoreImpl::name() const {
return result;
}
-WebString RendererWebIDBObjectStoreImpl::keyPathString() const {
- NullableString16 result;
+WebIDBKeyPath RendererWebIDBObjectStoreImpl::keyPath() const {
+ content::IndexedDBKeyPath result;
IndexedDBDispatcher::Send(
new IndexedDBHostMsg_ObjectStoreKeyPath(idb_object_store_id_, &result));
return result;
@@ -130,14 +132,14 @@ void RendererWebIDBObjectStoreImpl::clear(
WebIDBIndex* RendererWebIDBObjectStoreImpl::createIndex(
const WebString& name,
- const WebString& key_path,
+ const WebIDBKeyPath& key_path,
bool unique,
bool multi_entry,
const WebIDBTransaction& transaction,
WebExceptionCode& ec) {
IndexedDBHostMsg_ObjectStoreCreateIndex_Params params;
params.name = name;
- params.key_path = key_path;
+ params.key_path = content::IndexedDBKeyPath(key_path);
params.unique = unique;
params.multi_entry = multi_entry;
params.transaction_id = IndexedDBDispatcher::TransactionId(transaction);
diff --git a/content/common/indexed_db/proxy_webidbobjectstore_impl.h b/content/common/indexed_db/proxy_webidbobjectstore_impl.h
index 80ca003..7c73d76 100644
--- a/content/common/indexed_db/proxy_webidbobjectstore_impl.h
+++ b/content/common/indexed_db/proxy_webidbobjectstore_impl.h
@@ -25,7 +25,7 @@ class RendererWebIDBObjectStoreImpl : public WebKit::WebIDBObjectStore {
// WebKit::WebIDBObjectStore
virtual WebKit::WebString name() const;
- virtual WebKit::WebString keyPathString() const;
+ virtual WebKit::WebIDBKeyPath keyPath() const;
virtual WebKit::WebDOMStringList indexNames() const;
virtual void get(const WebKit::WebIDBKeyRange& key_range,
@@ -52,7 +52,7 @@ class RendererWebIDBObjectStoreImpl : public WebKit::WebIDBObjectStore {
virtual WebKit::WebIDBIndex* createIndex(
const WebKit::WebString& name,
- const WebKit::WebString& key_path,
+ const WebKit::WebIDBKeyPath& key_path,
bool unique,
bool multi_entry,
const WebKit::WebIDBTransaction& transaction,
diff --git a/content/common/utility_messages.h b/content/common/utility_messages.h
index c336352..578938a 100644
--- a/content/common/utility_messages.h
+++ b/content/common/utility_messages.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "content/common/content_export.h"
#include "content/common/indexed_db/indexed_db_key.h"
+#include "content/common/indexed_db/indexed_db_key_path.h"
#include "content/common/indexed_db/indexed_db_param_traits.h"
#include "content/public/common/common_param_traits.h"
#include "content/public/common/serialized_script_value.h"
@@ -29,12 +30,12 @@
IPC_MESSAGE_CONTROL3(UtilityMsg_IDBKeysFromValuesAndKeyPath,
int, // id
std::vector<content::SerializedScriptValue>,
- string16) // IDBKeyPath
+ content::IndexedDBKeyPath)
IPC_MESSAGE_CONTROL3(UtilityMsg_InjectIDBKey,
IndexedDBKey /* key */,
content::SerializedScriptValue /* value */,
- string16 /* key path*/)
+ content::IndexedDBKeyPath)
// Tells the utility process that it's running in batch mode.
IPC_MESSAGE_CONTROL0(UtilityMsg_BatchMode_Started)
@@ -59,11 +60,6 @@ IPC_MESSAGE_CONTROL2(UtilityHostMsg_IDBKeysFromValuesAndKeyPath_Succeeded,
int /* id */,
std::vector<IndexedDBKey> /* value */)
-// Reply when the utility process has failed in obtaining the value for
-// IDBKeyPath.
-IPC_MESSAGE_CONTROL1(UtilityHostMsg_IDBKeysFromValuesAndKeyPath_Failed,
- int /* id */)
-
// Reply when the utility process has finished injecting an IDBKey into
// a SerializedScriptValue.
IPC_MESSAGE_CONTROL1(UtilityHostMsg_InjectIDBKey_Finished,
diff --git a/content/content_common.gypi b/content/content_common.gypi
index debf28a..9045229 100644
--- a/content/content_common.gypi
+++ b/content/content_common.gypi
@@ -203,6 +203,8 @@
'common/hi_res_timer_manager.h',
'common/indexed_db/indexed_db_key.cc',
'common/indexed_db/indexed_db_key.h',
+ 'common/indexed_db/indexed_db_key_path.cc',
+ 'common/indexed_db/indexed_db_key_path.h',
'common/indexed_db/indexed_db_key_range.cc',
'common/indexed_db/indexed_db_key_range.h',
'common/indexed_db/indexed_db_messages.h',
diff --git a/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.cc b/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.cc
index 6aec56c..56ee6a5 100644
--- a/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.cc
+++ b/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.cc
@@ -241,7 +241,7 @@ int PpapiWebKitPlatformSupportImpl::databaseDeleteFile(
void PpapiWebKitPlatformSupportImpl::createIDBKeysFromSerializedValuesAndKeyPath(
const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values,
- const WebKit::WebString& keyPath,
+ const WebKit::WebIDBKeyPath& keyPath,
WebKit::WebVector<WebKit::WebIDBKey>& keys) {
NOTREACHED();
}
@@ -250,7 +250,7 @@ WebKit::WebSerializedScriptValue
PpapiWebKitPlatformSupportImpl::injectIDBKeyIntoSerializedValue(
const WebKit::WebIDBKey& key,
const WebKit::WebSerializedScriptValue& value,
- const WebKit::WebString& keyPath) {
+ const WebKit::WebIDBKeyPath& keyPath) {
NOTREACHED();
return WebKit::WebSerializedScriptValue();
}
diff --git a/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.h b/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.h
index 93a349d..c40217a 100644
--- a/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.h
+++ b/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -50,12 +50,12 @@ class PpapiWebKitPlatformSupportImpl :
bool sync_dir);
virtual void createIDBKeysFromSerializedValuesAndKeyPath(
const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values,
- const WebKit::WebString& keyPath,
+ const WebKit::WebIDBKeyPath& keyPath,
WebKit::WebVector<WebKit::WebIDBKey>& keys);
virtual WebKit::WebSerializedScriptValue injectIDBKeyIntoSerializedValue(
const WebKit::WebIDBKey& key,
const WebKit::WebSerializedScriptValue& value,
- const WebKit::WebString& keyPath);
+ const WebKit::WebIDBKeyPath& keyPath);
private:
class SandboxSupport;
diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc
index 03b7444..19db1db 100644
--- a/content/renderer/renderer_webkitplatformsupport_impl.cc
+++ b/content/renderer/renderer_webkitplatformsupport_impl.cc
@@ -328,13 +328,13 @@ WebIDBFactory* RendererWebKitPlatformSupportImpl::idbFactory() {
void RendererWebKitPlatformSupportImpl::createIDBKeysFromSerializedValuesAndKeyPath(
const WebVector<WebSerializedScriptValue>& values,
- const WebString& keyPath,
+ const WebIDBKeyPath& keyPath,
WebVector<WebIDBKey>& keys_out) {
DCHECK(CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess));
WebVector<WebIDBKey> keys(values.size());
for (size_t i = 0; i < values.size(); ++i) {
keys[i] = WebIDBKey::createFromValueAndKeyPath(
- values[i], WebIDBKeyPath::create(keyPath));
+ values[i], keyPath);
}
keys_out.swap(keys);
}
@@ -343,10 +343,10 @@ WebSerializedScriptValue
RendererWebKitPlatformSupportImpl::injectIDBKeyIntoSerializedValue(
const WebIDBKey& key,
const WebSerializedScriptValue& value,
- const WebString& keyPath) {
+ const WebIDBKeyPath& keyPath) {
DCHECK(CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess));
return WebIDBKey::injectIDBKeyIntoSerializedValue(
- key, value, WebIDBKeyPath::create(keyPath));
+ key, value, keyPath);
}
//------------------------------------------------------------------------------
diff --git a/content/renderer/renderer_webkitplatformsupport_impl.h b/content/renderer/renderer_webkitplatformsupport_impl.h
index 82be51f..9d78889 100644
--- a/content/renderer/renderer_webkitplatformsupport_impl.h
+++ b/content/renderer/renderer_webkitplatformsupport_impl.h
@@ -70,12 +70,12 @@ class CONTENT_EXPORT RendererWebKitPlatformSupportImpl
virtual WebKit::WebIDBFactory* idbFactory() OVERRIDE;
virtual void createIDBKeysFromSerializedValuesAndKeyPath(
const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values,
- const WebKit::WebString& keyPath,
+ const WebKit::WebIDBKeyPath& keyPath,
WebKit::WebVector<WebKit::WebIDBKey>& keys) OVERRIDE;
virtual WebKit::WebSerializedScriptValue injectIDBKeyIntoSerializedValue(
const WebKit::WebIDBKey& key,
const WebKit::WebSerializedScriptValue& value,
- const WebKit::WebString& keyPath) OVERRIDE;
+ const WebKit::WebIDBKeyPath& keyPath) OVERRIDE;
virtual WebKit::WebFileSystem* fileSystem() OVERRIDE;
virtual WebKit::WebSharedWorkerRepository* sharedWorkerRepository() OVERRIDE;
virtual bool canAccelerate2dCanvas();
diff --git a/content/utility/utility_thread_impl.cc b/content/utility/utility_thread_impl.cc
index b93eb54..a4b5ed1 100644
--- a/content/utility/utility_thread_impl.cc
+++ b/content/utility/utility_thread_impl.cc
@@ -12,6 +12,7 @@
#include "content/common/child_process.h"
#include "content/common/child_process_messages.h"
#include "content/common/indexed_db/indexed_db_key.h"
+#include "content/common/indexed_db/indexed_db_key_path.h"
#include "content/common/utility_messages.h"
#include "content/common/webkitplatformsupport_impl.h"
#include "content/public/utility/content_utility_client.h"
@@ -94,16 +95,12 @@ bool UtilityThreadImpl::OnControlMessageReceived(const IPC::Message& msg) {
void UtilityThreadImpl::OnIDBKeysFromValuesAndKeyPath(
int id,
const std::vector<content::SerializedScriptValue>& serialized_script_values,
- const string16& idb_key_path) {
+ const content::IndexedDBKeyPath& idb_key_path) {
std::vector<WebKit::WebSerializedScriptValue> web_values;
ConvertVector(serialized_script_values, &web_values);
std::vector<WebKit::WebIDBKey> web_keys;
- bool error = webkit_glue::IDBKeysFromValuesAndKeyPath(
+ webkit_glue::IDBKeysFromValuesAndKeyPath(
web_values, idb_key_path, &web_keys);
- if (error) {
- Send(new UtilityHostMsg_IDBKeysFromValuesAndKeyPath_Failed(id));
- return;
- }
std::vector<IndexedDBKey> keys;
ConvertVector(web_keys, &keys);
Send(new UtilityHostMsg_IDBKeysFromValuesAndKeyPath_Succeeded(id, keys));
@@ -113,7 +110,7 @@ void UtilityThreadImpl::OnIDBKeysFromValuesAndKeyPath(
void UtilityThreadImpl::OnInjectIDBKey(
const IndexedDBKey& key,
const content::SerializedScriptValue& value,
- const string16& key_path) {
+ const content::IndexedDBKeyPath& key_path) {
content::SerializedScriptValue new_value(
webkit_glue::InjectIDBKey(key, value, key_path));
Send(new UtilityHostMsg_InjectIDBKey_Finished(new_value));
diff --git a/content/utility/utility_thread_impl.h b/content/utility/utility_thread_impl.h
index b0c20a2..eba5add 100644
--- a/content/utility/utility_thread_impl.h
+++ b/content/utility/utility_thread_impl.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,7 +11,6 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "base/string16.h"
#include "content/common/child_thread.h"
#include "content/common/content_export.h"
#include "content/public/utility/utility_thread.h"
@@ -20,6 +19,7 @@ class FilePath;
class IndexedDBKey;
namespace content {
+class IndexedDBKeyPath;
class SerializedScriptValue;
class WebKitPlatformSupportImpl;
}
@@ -47,10 +47,10 @@ class UtilityThreadImpl : public content::UtilityThread,
int id,
const std::vector<content::SerializedScriptValue>&
serialized_script_values,
- const string16& idb_key_path);
+ const content::IndexedDBKeyPath& idb_key_path);
void OnInjectIDBKey(const IndexedDBKey& key,
const content::SerializedScriptValue& value,
- const string16& key_path);
+ const content::IndexedDBKeyPath& key_path);
void OnBatchModeStarted();
void OnBatchModeFinished();
diff --git a/webkit/glue/idb_bindings.cc b/webkit/glue/idb_bindings.cc
index b3d0541..57b8eb4 100644
--- a/webkit/glue/idb_bindings.cc
+++ b/webkit/glue/idb_bindings.cc
@@ -6,7 +6,6 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
-#include "base/string16.h"
#include "base/utf_string_conversions.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyPath.h"
@@ -20,37 +19,24 @@ using WebKit::WebIDBKeyPath;
using WebKit::WebSerializedScriptValue;
using WebKit::WebString;
-bool IDBKeysFromValuesAndKeyPath(
+void IDBKeysFromValuesAndKeyPath(
const std::vector<WebSerializedScriptValue>& serialized_script_values,
- const string16& idb_key_path,
+ const WebIDBKeyPath& idb_key_path,
std::vector<WebIDBKey>* values) {
- // TODO(jsbell): Remove the explicit coercion to WebString.
- // http://crbug.com/112308
- WebIDBKeyPath web_idb_key_path =
- WebIDBKeyPath::create(WebString(idb_key_path));
- bool error = web_idb_key_path.parseError() != 0;
- // When a parse error is encountered, no value is returned (null)
for (std::vector<WebSerializedScriptValue>::const_iterator i =
serialized_script_values.begin();
i != serialized_script_values.end(); ++i) {
- if (error) {
- values->push_back(WebIDBKey::createNull());
- } else {
- values->push_back(
- WebIDBKey::createFromValueAndKeyPath(*i, web_idb_key_path));
- }
+ values->push_back(
+ WebIDBKey::createFromValueAndKeyPath(*i, idb_key_path));
}
- return error;
}
WebSerializedScriptValue InjectIDBKey(
const WebIDBKey& key,
const WebSerializedScriptValue& value,
- const string16& idb_key_path) {
- // TODO(jsbell): Remove the explicit coercion to WebString.
- // http://crbug.com/112308
+ const WebIDBKeyPath& idb_key_path) {
return WebIDBKey::injectIDBKeyIntoSerializedValue(
- key, value, WebIDBKeyPath::create(WebString(idb_key_path)));
+ key, value, idb_key_path);
}
} // namespace webkit_glue
diff --git a/webkit/glue/idb_bindings.h b/webkit/glue/idb_bindings.h
index 4ad4b98..5b98757 100644
--- a/webkit/glue/idb_bindings.h
+++ b/webkit/glue/idb_bindings.h
@@ -1,15 +1,15 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <vector>
#include "base/basictypes.h"
-#include "base/string16.h"
#include "webkit/glue/webkit_glue_export.h"
namespace WebKit {
class WebIDBKey;
+class WebIDBKeyPath;
class WebSerializedScriptValue;
}
@@ -17,15 +17,15 @@ namespace webkit_glue {
// Warning: this method holds a V8 lock, it should only be called within a
// sandbox.
-WEBKIT_GLUE_EXPORT bool IDBKeysFromValuesAndKeyPath(
+WEBKIT_GLUE_EXPORT void IDBKeysFromValuesAndKeyPath(
const std::vector<WebKit::WebSerializedScriptValue>&
serialized_script_values,
- const string16& idb_key_path,
+ const WebKit::WebIDBKeyPath& idb_key_path,
std::vector<WebKit::WebIDBKey>* values);
WEBKIT_GLUE_EXPORT WebKit::WebSerializedScriptValue InjectIDBKey(
const WebKit::WebIDBKey& key,
const WebKit::WebSerializedScriptValue& value,
- const string16& idb_key_path);
+ const WebKit::WebIDBKeyPath& idb_key_path);
} // namespace webkit_glue
diff --git a/webkit/support/test_webkit_platform_support.cc b/webkit/support/test_webkit_platform_support.cc
index 6bcc225..505c13b 100644
--- a/webkit/support/test_webkit_platform_support.cc
+++ b/webkit/support/test_webkit_platform_support.cc
@@ -330,12 +330,12 @@ WebKit::WebIDBFactory* TestWebKitPlatformSupport::idbFactory() {
void TestWebKitPlatformSupport::createIDBKeysFromSerializedValuesAndKeyPath(
const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values,
- const WebKit::WebString& keyPath,
+ const WebKit::WebIDBKeyPath& keyPath,
WebKit::WebVector<WebKit::WebIDBKey>& keys_out) {
WebKit::WebVector<WebKit::WebIDBKey> keys(values.size());
for (size_t i = 0; i < values.size(); ++i) {
keys[i] = WebKit::WebIDBKey::createFromValueAndKeyPath(
- values[i], WebKit::WebIDBKeyPath::create(keyPath));
+ values[i], keyPath);
}
keys_out.swap(keys);
}
@@ -344,9 +344,9 @@ WebKit::WebSerializedScriptValue
TestWebKitPlatformSupport::injectIDBKeyIntoSerializedValue(
const WebKit::WebIDBKey& key,
const WebKit::WebSerializedScriptValue& value,
- const WebKit::WebString& keyPath) {
+ const WebKit::WebIDBKeyPath& keyPath) {
return WebKit::WebIDBKey::injectIDBKeyIntoSerializedValue(
- key, value, WebKit::WebIDBKeyPath::create(keyPath));
+ key, value, keyPath);
}
#if defined(OS_WIN) || defined(OS_MACOSX)
diff --git a/webkit/support/test_webkit_platform_support.h b/webkit/support/test_webkit_platform_support.h
index a606460..a74e6b5f 100644
--- a/webkit/support/test_webkit_platform_support.h
+++ b/webkit/support/test_webkit_platform_support.h
@@ -74,12 +74,12 @@ class TestWebKitPlatformSupport :
virtual WebKit::WebIDBFactory* idbFactory() OVERRIDE;
virtual void createIDBKeysFromSerializedValuesAndKeyPath(
const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values,
- const WebKit::WebString& keyPath,
+ const WebKit::WebIDBKeyPath& keyPath,
WebKit::WebVector<WebKit::WebIDBKey>& keys_out) OVERRIDE;
virtual WebKit::WebSerializedScriptValue injectIDBKeyIntoSerializedValue(
const WebKit::WebIDBKey& key,
const WebKit::WebSerializedScriptValue& value,
- const WebKit::WebString& keyPath) OVERRIDE;
+ const WebKit::WebIDBKeyPath& keyPath) OVERRIDE;
#if defined(OS_WIN) || defined(OS_MACOSX)
void SetThemeEngine(WebKit::WebThemeEngine* engine);
diff --git a/webkit/tools/test_shell/test_shell_webkit_init.cc b/webkit/tools/test_shell/test_shell_webkit_init.cc
index 8d1e9ef..fb494ca 100644
--- a/webkit/tools/test_shell/test_shell_webkit_init.cc
+++ b/webkit/tools/test_shell/test_shell_webkit_init.cc
@@ -266,12 +266,12 @@ WebKit::WebIDBFactory* TestShellWebKitInit::idbFactory() {
void TestShellWebKitInit::createIDBKeysFromSerializedValuesAndKeyPath(
const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values,
- const WebKit::WebString& keyPath,
+ const WebKit::WebIDBKeyPath& keyPath,
WebKit::WebVector<WebKit::WebIDBKey>& keys_out) {
WebKit::WebVector<WebKit::WebIDBKey> keys(values.size());
for (size_t i = 0; i < values.size(); ++i) {
keys[i] = WebKit::WebIDBKey::createFromValueAndKeyPath(
- values[i], WebKit::WebIDBKeyPath::create(keyPath));
+ values[i], keyPath);
}
keys_out.swap(keys);
}
@@ -279,9 +279,9 @@ void TestShellWebKitInit::createIDBKeysFromSerializedValuesAndKeyPath(
WebKit::WebSerializedScriptValue
TestShellWebKitInit::injectIDBKeyIntoSerializedValue(
const WebKit::WebIDBKey& key, const WebKit::WebSerializedScriptValue& value,
- const WebKit::WebString& keyPath) {
+ const WebKit::WebIDBKeyPath& keyPath) {
return WebKit::WebIDBKey::injectIDBKeyIntoSerializedValue(
- key, value, WebKit::WebIDBKeyPath::create(keyPath));
+ key, value, keyPath);
}
WebKit::WebSharedWorkerRepository*
diff --git a/webkit/tools/test_shell/test_shell_webkit_init.h b/webkit/tools/test_shell/test_shell_webkit_init.h
index dfd27aa..b8c89b6 100644
--- a/webkit/tools/test_shell/test_shell_webkit_init.h
+++ b/webkit/tools/test_shell/test_shell_webkit_init.h
@@ -80,13 +80,13 @@ class TestShellWebKitInit : public webkit_glue::WebKitPlatformSupportImpl {
virtual void createIDBKeysFromSerializedValuesAndKeyPath(
const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values,
- const WebKit::WebString& keyPath,
+ const WebKit::WebIDBKeyPath& keyPath,
WebKit::WebVector<WebKit::WebIDBKey>& keys_out) OVERRIDE;
virtual WebKit::WebSerializedScriptValue injectIDBKeyIntoSerializedValue(
const WebKit::WebIDBKey& key,
const WebKit::WebSerializedScriptValue& value,
- const WebKit::WebString& keyPath) OVERRIDE;
+ const WebKit::WebIDBKeyPath& keyPath) OVERRIDE;
#if defined(OS_WIN)