DescriptionAdd scoped_ptr-safe base::Value to Dictionary/List conversion functions.
This change adds two static From() functions to the DictionaryValue and
ListValue classes which take a scoped_ptr to a Value and either convert
it to a scoped_ptr to a DictionaryValue or ListValue, or return nullptr.
These are intended to replace the existing pattern,
make_scoped_ptr(static_cast<base::DictionaryValue*>(value.release()))
with the shorter and safer alternative,
base::DictionaryValue::From(value.Pass())
Instances of this pattern in //extensions have been converted as
examples.
Committed: https://crrev.com/259c0a3f44bdd8130c5d835e9f596624a079fbd1
Cr-Commit-Position: refs/heads/master@{#348294}
Patch Set 1 #Patch Set 2 : Made conversions static members. #Messages
Total messages: 15 (3 generated)
|