| Index: base/values.cc
|
| diff --git a/base/values.cc b/base/values.cc
|
| index ad534696b389b537dc4333876c78f9a84247583a..cc2ebf625a1fafefa6701aec8b404e8894db28b6 100644
|
| --- a/base/values.cc
|
| +++ b/base/values.cc
|
| @@ -133,6 +133,14 @@ bool Value::GetAsList(const ListValue** out_value) const {
|
| return false;
|
| }
|
|
|
| +bool Value::GetAsDictionary(DictionaryValue** out_value) {
|
| + return false;
|
| +}
|
| +
|
| +bool Value::GetAsDictionary(const DictionaryValue** out_value) const {
|
| + return false;
|
| +}
|
| +
|
| Value* Value::DeepCopy() const {
|
| // This method should only be getting called for null Values--all subclasses
|
| // need to provide their own implementation;.
|
| @@ -642,6 +650,19 @@ bool DictionaryValue::RemoveWithoutPathExpansion(const std::string& key,
|
| return true;
|
| }
|
|
|
| +bool DictionaryValue::GetAsDictionary(DictionaryValue** out_value) {
|
| + if (out_value)
|
| + *out_value = this;
|
| + return true;
|
| +}
|
| +
|
| +bool DictionaryValue::GetAsDictionary(
|
| + const DictionaryValue** out_value) const {
|
| + if (out_value)
|
| + *out_value = this;
|
| + return true;
|
| +}
|
| +
|
| DictionaryValue* DictionaryValue::DeepCopyWithoutEmptyChildren() {
|
| Value* copy = CopyWithoutEmptyChildren(this);
|
| return copy ? static_cast<DictionaryValue*>(copy) : new DictionaryValue;
|
|
|