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

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

Issue 2884933002: Remove raw base::DictionaryValue::SetWithoutPathExpansion (Closed)
Patch Set: Include Created 3 years, 7 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
« no previous file with comments | « tools/json_schema_compiler/test/test_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « tools/json_schema_compiler/test/test_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698