diff options
author | olli.raula <olli.raula@intel.com> | 2015-10-15 23:16:40 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-16 06:17:31 +0000 |
commit | ba04525cccccae530aa899882227d81b037eebff (patch) | |
tree | 311a935c17622cd982a5ee637005c3836c2ae84a /extensions/utility | |
parent | 1737f9e86e74990aad0e9693ebf247c8ffbb86f9 (diff) | |
download | chromium_src-ba04525cccccae530aa899882227d81b037eebff.zip chromium_src-ba04525cccccae530aa899882227d81b037eebff.tar.gz chromium_src-ba04525cccccae530aa899882227d81b037eebff.tar.bz2 |
Make ValueDeserializer::Deserialize return scoped_ptr
Make ValueDeserializer::Deserialize return scoped_ptr
as almost all consumers already use scoped_ptr and it
is also better way to do it.
TBR=jam@chromium.org
Review URL: https://codereview.chromium.org/1394993004
Cr-Commit-Position: refs/heads/master@{#354458}
Diffstat (limited to 'extensions/utility')
-rw-r--r-- | extensions/utility/unpacker.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/extensions/utility/unpacker.cc b/extensions/utility/unpacker.cc index 6e28a49b..f499808 100644 --- a/extensions/utility/unpacker.cc +++ b/extensions/utility/unpacker.cc @@ -121,7 +121,7 @@ scoped_ptr<base::DictionaryValue> Unpacker::ReadManifest() { JSONFileValueDeserializer deserializer(manifest_path); std::string error; - scoped_ptr<base::Value> root(deserializer.Deserialize(NULL, &error)); + scoped_ptr<base::Value> root = deserializer.Deserialize(NULL, &error); if (!root.get()) { SetError(error); return NULL; @@ -253,8 +253,8 @@ bool Unpacker::AddDecodedImage(const base::FilePath& path) { bool Unpacker::ReadMessageCatalog(const base::FilePath& message_path) { std::string error; JSONFileValueDeserializer deserializer(message_path); - scoped_ptr<base::DictionaryValue> root = base::DictionaryValue::From( - make_scoped_ptr(deserializer.Deserialize(NULL, &error))); + scoped_ptr<base::DictionaryValue> root = + base::DictionaryValue::From(deserializer.Deserialize(NULL, &error)); if (!root.get()) { base::string16 messages_file = message_path.LossyDisplayName(); if (error.empty()) { |