Index: content/common/indexed_db/indexed_db_key_path.cc |
diff --git a/content/common/indexed_db/indexed_db_key_path.cc b/content/common/indexed_db/indexed_db_key_path.cc |
index 4249f53bf25603d1ba8c1a273e184915c8416357..be6adfd31ff98be162fca79479da6b0bb64ec736 100644 |
--- a/content/common/indexed_db/indexed_db_key_path.cc |
+++ b/content/common/indexed_db/indexed_db_key_path.cc |
@@ -5,26 +5,12 @@ |
#include "content/common/indexed_db/indexed_db_key_path.h" |
#include "base/logging.h" |
-#include "third_party/WebKit/public/platform/WebString.h" |
-#include "third_party/WebKit/public/platform/WebVector.h" |
namespace content { |
-using WebKit::WebIDBKeyPath; |
using WebKit::WebIDBKeyPathTypeArray; |
using WebKit::WebIDBKeyPathTypeNull; |
using WebKit::WebIDBKeyPathTypeString; |
-using WebKit::WebString; |
-using WebKit::WebVector; |
- |
-namespace { |
-static std::vector<string16> CopyArray(const WebVector<WebString>& array) { |
- std::vector<string16> copy(array.size()); |
- for (size_t i = 0; i < array.size(); ++i) |
- copy[i] = array[i]; |
- return copy; |
-} |
-} // namespace |
IndexedDBKeyPath::IndexedDBKeyPath() : type_(WebIDBKeyPathTypeNull) {} |
@@ -34,20 +20,8 @@ IndexedDBKeyPath::IndexedDBKeyPath(const string16& string) |
IndexedDBKeyPath::IndexedDBKeyPath(const std::vector<string16>& array) |
: type_(WebIDBKeyPathTypeArray), array_(array) {} |
-IndexedDBKeyPath::IndexedDBKeyPath(const WebIDBKeyPath& other) |
- : type_(other.keyPathType()), |
- string_(type_ == WebIDBKeyPathTypeString |
- ? static_cast<string16>(other.string()) : string16()), |
- array_(type_ == WebIDBKeyPathTypeArray |
- ? CopyArray(other.array()) : std::vector<string16>()) {} |
- |
IndexedDBKeyPath::~IndexedDBKeyPath() {} |
-bool IndexedDBKeyPath::IsValid() const { |
- WebIDBKeyPath key_path = *this; |
- return key_path.isValid(); |
-} |
- |
const std::vector<string16>& IndexedDBKeyPath::array() const { |
DCHECK(type_ == WebKit::WebIDBKeyPathTypeArray); |
return array_; |
@@ -74,17 +48,4 @@ bool IndexedDBKeyPath::operator==(const IndexedDBKeyPath& other) const { |
return false; |
} |
-IndexedDBKeyPath::operator WebIDBKeyPath() const { |
- switch (type_) { |
- case WebIDBKeyPathTypeArray: |
- return WebIDBKeyPath::create(array_); |
- case WebIDBKeyPathTypeString: |
- return WebIDBKeyPath::create(WebString(string_)); |
- case WebIDBKeyPathTypeNull: |
- return WebIDBKeyPath::createNull(); |
- } |
- NOTREACHED(); |
- return WebIDBKeyPath::createNull(); |
-} |
- |
} // namespace content |