| Index: ui/app_list/search/history_data_store.cc
|
| diff --git a/ui/app_list/search/history_data_store.cc b/ui/app_list/search/history_data_store.cc
|
| index d080fa6a96381ff65c83298d6cc7209ca3d76d0f..95d351f9b8b4151f1d34c9ef51dffc3b4b80040c 100644
|
| --- a/ui/app_list/search/history_data_store.cc
|
| +++ b/ui/app_list/search/history_data_store.cc
|
| @@ -165,7 +165,7 @@ void HistoryDataStore::SetSecondary(
|
| results_list->AppendString(results[i]);
|
|
|
| base::DictionaryValue* entry_dict = GetEntryDict(query);
|
| - entry_dict->SetWithoutPathExpansion(kKeySecondary, results_list.release());
|
| + entry_dict->SetWithoutPathExpansion(kKeySecondary, std::move(results_list));
|
| if (data_store_.get())
|
| data_store_->ScheduleWrite();
|
| }
|
| @@ -204,9 +204,9 @@ base::DictionaryValue* HistoryDataStore::GetEntryDict(
|
|
|
| base::DictionaryValue* entry_dict = nullptr;
|
| if (!assoc_dict->GetDictionaryWithoutPathExpansion(query, &entry_dict)) {
|
| - // Creates one if none exists. Ownership is taken in the set call after.
|
| - entry_dict = new base::DictionaryValue;
|
| - assoc_dict->SetWithoutPathExpansion(query, base::WrapUnique(entry_dict));
|
| + // Creates one if none exists.
|
| + entry_dict = assoc_dict->SetDictionaryWithoutPathExpansion(
|
| + query, base::MakeUnique<base::DictionaryValue>());
|
| }
|
|
|
| return entry_dict;
|
|
|