| Index: base/values.cc
|
| diff --git a/base/values.cc b/base/values.cc
|
| index b0160e176210e6ce24a627f9e658240fd49c5f4c..dd8062b8388f8fac31e580fa1bbd42e2f78532fe 100644
|
| --- a/base/values.cc
|
| +++ b/base/values.cc
|
| @@ -3,7 +3,6 @@
|
| // found in the LICENSE file.
|
|
|
| #include "base/logging.h"
|
| -#include "base/string_util.h"
|
| #include "base/values.h"
|
|
|
| ///////////////////// Value ////////////////////
|
| @@ -32,13 +31,8 @@ Value* Value::CreateRealValue(double in_value) {
|
| }
|
|
|
| // static
|
| -Value* Value::CreateStringValue(const std::string& in_value) {
|
| - return new StringValue(in_value);
|
| -}
|
| -
|
| -// static
|
| Value* Value::CreateStringValue(const std::wstring& in_value) {
|
| - return new StringValue(WideToUTF8(in_value));
|
| + return new StringValue(in_value);
|
| }
|
|
|
| // static
|
| @@ -58,10 +52,6 @@ bool Value::GetAsReal(double* in_value) const {
|
| return false;
|
| }
|
|
|
| -bool Value::GetAsString(std::string* in_value) const {
|
| - return false;
|
| -}
|
| -
|
| bool Value::GetAsString(std::wstring* in_value) const {
|
| return false;
|
| }
|
| @@ -145,24 +135,12 @@ bool FundamentalValue::Equals(const Value* other) const {
|
|
|
| ///////////////////// StringValue ////////////////////
|
|
|
| -StringValue::StringValue(const std::string& in_value)
|
| - : Value(TYPE_STRING),
|
| - value_(in_value) {
|
| - DCHECK(IsStringUTF8(in_value));
|
| -}
|
| -
|
| StringValue::~StringValue() {
|
| }
|
|
|
| -bool StringValue::GetAsString(std::string* out_value) const {
|
| - if (out_value)
|
| - *out_value = value_;
|
| - return true;
|
| -}
|
| -
|
| bool StringValue::GetAsString(std::wstring* out_value) const {
|
| if (out_value)
|
| - *out_value = UTF8ToWide(value_);
|
| + *out_value = value_;
|
| return true;
|
| }
|
|
|
| @@ -173,7 +151,7 @@ Value* StringValue::DeepCopy() const {
|
| bool StringValue::Equals(const Value* other) const {
|
| if (other->GetType() != GetType())
|
| return false;
|
| - std::string lhs, rhs;
|
| + std::wstring lhs, rhs;
|
| return GetAsString(&lhs) && other->GetAsString(&rhs) && lhs == rhs;
|
| }
|
|
|
| @@ -298,11 +276,6 @@ bool DictionaryValue::SetReal(const std::wstring& path, double in_value) {
|
| }
|
|
|
| bool DictionaryValue::SetString(const std::wstring& path,
|
| - const std::string& in_value) {
|
| - return Set(path, CreateStringValue(in_value));
|
| -}
|
| -
|
| -bool DictionaryValue::SetString(const std::wstring& path,
|
| const std::wstring& in_value) {
|
| return Set(path, CreateStringValue(in_value));
|
| }
|
| @@ -362,15 +335,6 @@ bool DictionaryValue::GetReal(const std::wstring& path,
|
| }
|
|
|
| bool DictionaryValue::GetString(const std::wstring& path,
|
| - std::string* out_value) const {
|
| - Value* value;
|
| - if (!Get(path, &value))
|
| - return false;
|
| -
|
| - return value->GetAsString(out_value);
|
| -}
|
| -
|
| -bool DictionaryValue::GetString(const std::wstring& path,
|
| std::wstring* out_value) const {
|
| Value* value;
|
| if (!Get(path, &value))
|
|
|