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

Unified Diff: chrome/browser/ui/app_list/app_list_syncable_service.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
Index: chrome/browser/ui/app_list/app_list_syncable_service.cc
diff --git a/chrome/browser/ui/app_list/app_list_syncable_service.cc b/chrome/browser/ui/app_list/app_list_syncable_service.cc
index f25150242595992a2d816758fc21ee9b056b48a9..ed808caa4dbaa909cdd0ee9f90744e4ba69b8969 100644
--- a/chrome/browser/ui/app_list/app_list_syncable_service.cc
+++ b/chrome/browser/ui/app_list/app_list_syncable_service.cc
@@ -185,8 +185,10 @@ void UpdateSyncItemInLocalStorage(
base::DictionaryValue* dict_item = nullptr;
if (!pref_update->GetDictionaryWithoutPathExpansion(sync_item->item_id,
&dict_item)) {
- dict_item = new base::DictionaryValue();
- pref_update->SetWithoutPathExpansion(sync_item->item_id, dict_item);
+ pref_update->SetWithoutPathExpansion(
+ sync_item->item_id, base::MakeUnique<base::DictionaryValue>());
+ pref_update->GetDictionaryWithoutPathExpansion(sync_item->item_id,
+ &dict_item);
}
dict_item->SetString(kNameKey, sync_item->item_name);

Powered by Google App Engine
This is Rietveld 408576698