Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Unified Diff: ui/app_list/search/dictionary_data_store.cc

Issue 1394993004: Make ValueDeserializer::Deserialize return scoped_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix and add ::From Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/app_list/search/dictionary_data_store.cc
diff --git a/ui/app_list/search/dictionary_data_store.cc b/ui/app_list/search/dictionary_data_store.cc
index 45f53ca6edb58101530b4cc03cf1e5416218c06c..e74f7a5fef5a86516be5dba4d6bb2333e7ccbab9 100644
--- a/ui/app_list/search/dictionary_data_store.cc
+++ b/ui/app_list/search/dictionary_data_store.cc
@@ -67,7 +67,8 @@ scoped_ptr<base::DictionaryValue> DictionaryDataStore::LoadOnBlockingPool() {
int error_code = JSONFileValueDeserializer::JSON_NO_ERROR;
std::string error_message;
JSONFileValueDeserializer deserializer(data_file_);
- base::Value* value = deserializer.Deserialize(&error_code, &error_message);
+ base::Value* value =
Lei Zhang 2015/10/14 16:55:35 We can use more scoped_ptrs here.
+ deserializer.Deserialize(&error_code, &error_message).release();
base::DictionaryValue* dict_value = NULL;
if (error_code != JSONFileValueDeserializer::JSON_NO_ERROR || !value ||
!value->GetAsDictionary(&dict_value) || !dict_value) {
« extensions/common/extension_l10n_util.cc ('K') | « rlz/chromeos/lib/rlz_value_store_chromeos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698