| Index: base/values.cc
|
| diff --git a/base/values.cc b/base/values.cc
|
| index 799e100ea87b2f4015d9e5eb51dea14c2f04f327..b61e86892e1251285ca8132b3eabe7f722f475b4 100644
|
| --- a/base/values.cc
|
| +++ b/base/values.cc
|
| @@ -100,6 +100,10 @@ StringValue* Value::CreateStringValue(const string16& in_value) {
|
| return new StringValue(in_value);
|
| }
|
|
|
| +ListValue* Value::AsList() {
|
| + return NULL;
|
| +}
|
| +
|
| bool Value::GetAsBoolean(bool* out_value) const {
|
| return false;
|
| }
|
| @@ -519,7 +523,7 @@ bool DictionaryValue::GetList(const std::string& path,
|
| ListValue** out_value) const {
|
| Value* value;
|
| bool result = Get(path, &value);
|
| - if (!result || !value->IsType(TYPE_LIST))
|
| + if (!result || !value->AsList())
|
| return false;
|
|
|
| if (out_value)
|
| @@ -597,7 +601,7 @@ bool DictionaryValue::GetListWithoutPathExpansion(const std::string& key,
|
| ListValue** out_value) const {
|
| Value* value;
|
| bool result = GetWithoutPathExpansion(key, &value);
|
| - if (!result || !value->IsType(TYPE_LIST))
|
| + if (!result || !value->AsList())
|
| return false;
|
|
|
| if (out_value)
|
| @@ -810,7 +814,7 @@ bool ListValue::GetDictionary(size_t index, DictionaryValue** out_value) const {
|
| bool ListValue::GetList(size_t index, ListValue** out_value) const {
|
| Value* value;
|
| bool result = Get(index, &value);
|
| - if (!result || !value->IsType(TYPE_LIST))
|
| + if (!result || !value->AsList())
|
| return false;
|
|
|
| if (out_value)
|
| @@ -873,6 +877,10 @@ bool ListValue::Insert(size_t index, Value* in_value) {
|
| return true;
|
| }
|
|
|
| +ListValue* ListValue::AsList() {
|
| + return this;
|
| +}
|
| +
|
| bool ListValue::GetAsList(ListValue** out_value) {
|
| if (out_value)
|
| *out_value = this;
|
|
|