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

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

Issue 2843813002: Remove SetWithoutPathExpansion (Closed)
Patch Set: Fix CrOS Error Created 3 years, 8 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..27d66707f5061ed654ea6ed91090716da38a3b40 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();
}
@@ -205,8 +205,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));
+ assoc_dict->SetWithoutPathExpansion(
+ query, base::MakeUnique<base::DictionaryValue>());
+ assoc_dict->GetDictionaryWithoutPathExpansion(query, &entry_dict);
}
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