Chromium Code Reviews| Index: extensions/common/extension_l10n_util.cc |
| diff --git a/extensions/common/extension_l10n_util.cc b/extensions/common/extension_l10n_util.cc |
| index dd96b07d2e66ec911f4beb9ecb7f0bdf798044d5..86d8fb394411d07053fabf69ecfee23a36f8ca28 100644 |
| --- a/extensions/common/extension_l10n_util.cc |
| +++ b/extensions/common/extension_l10n_util.cc |
| @@ -39,7 +39,8 @@ base::DictionaryValue* LoadMessageFile(const base::FilePath& locale_path, |
| base::FilePath file = |
| locale_path.AppendASCII(locale).Append(extensions::kMessagesFilename); |
| JSONFileValueDeserializer messages_deserializer(file); |
| - base::Value* dictionary = messages_deserializer.Deserialize(NULL, error); |
| + scoped_ptr<base::Value> dictionary = |
|
Lei Zhang
2015/10/14 16:55:35
Let's use DictionaryValue::From() to help do the e
|
| + messages_deserializer.Deserialize(NULL, error); |
| if (!dictionary) { |
| if (error->empty()) { |
| // JSONFileValueSerializer just returns NULL if file cannot be found. It |
| @@ -54,7 +55,7 @@ base::DictionaryValue* LoadMessageFile(const base::FilePath& locale_path, |
| } |
| } |
| - return static_cast<base::DictionaryValue*>(dictionary); |
| + return static_cast<base::DictionaryValue*>(dictionary.release()); |
| } |
| // Localizes manifest value of string type for a given key. |