| Index: content/child/indexed_db/indexed_db_key_builders.cc
|
| diff --git a/content/child/indexed_db/indexed_db_key_builders.cc b/content/child/indexed_db/indexed_db_key_builders.cc
|
| index d0da139c1859b3dfaf669765617fa6a505b4532b..005a2f52cf111b2cd32d62a845624b80904fbcff 100644
|
| --- a/content/child/indexed_db/indexed_db_key_builders.cc
|
| +++ b/content/child/indexed_db/indexed_db_key_builders.cc
|
| @@ -11,6 +11,7 @@
|
| #include <vector>
|
|
|
| #include "base/logging.h"
|
| +#include "third_party/WebKit/public/platform/StringVectorCopier.h"
|
| #include "third_party/WebKit/public/platform/WebVector.h"
|
|
|
| using blink::WebIDBKey;
|
| @@ -40,11 +41,10 @@ static std::vector<base::string16> CopyArray(
|
| const WebVector<WebString>& array) {
|
| std::vector<base::string16> copy(array.size());
|
| for (size_t i = 0; i < array.size(); ++i)
|
| - copy[i] = array[i];
|
| + copy[i] = array[i].utf16();
|
| return copy;
|
| }
|
|
|
| -
|
| namespace content {
|
|
|
| IndexedDBKey IndexedDBKeyBuilder::Build(const blink::WebIDBKey& key) {
|
| @@ -55,7 +55,7 @@ IndexedDBKey IndexedDBKeyBuilder::Build(const blink::WebIDBKey& key) {
|
| return IndexedDBKey(
|
| std::string(key.binary().data(), key.binary().size()));
|
| case WebIDBKeyTypeString:
|
| - return IndexedDBKey(key.string());
|
| + return IndexedDBKey(key.string().utf16());
|
| case WebIDBKeyTypeDate:
|
| return IndexedDBKey(key.date(), WebIDBKeyTypeDate);
|
| case WebIDBKeyTypeNumber:
|
| @@ -83,7 +83,7 @@ WebIDBKey WebIDBKeyBuilder::Build(const IndexedDBKey& key) {
|
| case WebIDBKeyTypeBinary:
|
| return WebIDBKey::createBinary(key.binary());
|
| case WebIDBKeyTypeString:
|
| - return WebIDBKey::createString(key.string());
|
| + return WebIDBKey::createString(WebString::fromUTF16(key.string()));
|
| case WebIDBKeyTypeDate:
|
| return WebIDBKey::createDate(key.date());
|
| case WebIDBKeyTypeNumber:
|
| @@ -119,7 +119,7 @@ IndexedDBKeyPath IndexedDBKeyPathBuilder::Build(
|
| const blink::WebIDBKeyPath& key_path) {
|
| switch (key_path.keyPathType()) {
|
| case blink::WebIDBKeyPathTypeString:
|
| - return IndexedDBKeyPath(key_path.string());
|
| + return IndexedDBKeyPath(key_path.string().utf16());
|
| case blink::WebIDBKeyPathTypeArray:
|
| return IndexedDBKeyPath(CopyArray(key_path.array()));
|
| case blink::WebIDBKeyPathTypeNull:
|
| @@ -134,9 +134,11 @@ blink::WebIDBKeyPath WebIDBKeyPathBuilder::Build(
|
| const IndexedDBKeyPath& key_path) {
|
| switch (key_path.type()) {
|
| case blink::WebIDBKeyPathTypeString:
|
| - return blink::WebIDBKeyPath::create(WebString(key_path.string()));
|
| + return blink::WebIDBKeyPath::create(
|
| + WebString::fromUTF16(key_path.string()));
|
| case blink::WebIDBKeyPathTypeArray:
|
| - return blink::WebIDBKeyPath::create(CopyArray(key_path.array()));
|
| + return blink::WebIDBKeyPath::create(
|
| + blink::CopyStringVectorFromUTF16(key_path.array()));
|
| case blink::WebIDBKeyPathTypeNull:
|
| return blink::WebIDBKeyPath::createNull();
|
| default:
|
|
|