Index: base/values.h |
diff --git a/base/values.h b/base/values.h |
index 8756debdbdf76a0dc9658af0ec6c14159885f905..56be542d7477b8c02d725aa7690e1b82dacc70d3 100644 |
--- a/base/values.h |
+++ b/base/values.h |
@@ -209,6 +209,9 @@ class BASE_EXPORT BinaryValue: public Value { |
// are |std::string|s and should be UTF-8 encoded. |
class BASE_EXPORT DictionaryValue : public Value { |
public: |
+ // Returns |value| if it is a dictionary, nullptr otherwise. |
+ static scoped_ptr<DictionaryValue> From(scoped_ptr<Value> value); |
+ |
DictionaryValue(); |
~DictionaryValue() override; |
@@ -387,6 +390,9 @@ class BASE_EXPORT ListValue : public Value { |
typedef ValueVector::iterator iterator; |
typedef ValueVector::const_iterator const_iterator; |
+ // Returns |value| if it is a list, nullptr otherwise. |
+ static scoped_ptr<ListValue> From(scoped_ptr<Value> value); |
+ |
ListValue(); |
~ListValue() override; |