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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc

Issue 2336863003: Change more base::ListValue methods to use std::unique_ptr. (Closed)
Patch Set: . Created 4 years, 3 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/ash/launcher/chrome_launcher_controller_impl_unittest.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
index 03bcef8310b046038be651ffc4a32342857442ee..4b3190b56537d63c21428e70c9ed0f590793525a 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
@@ -553,9 +553,9 @@ class ChromeLauncherControllerImplTest : public BrowserWithTestWindowTest {
void InsertPrefValue(base::ListValue* pref_value,
int index,
const std::string& extension_id) {
- base::DictionaryValue* entry = new base::DictionaryValue();
+ auto entry = base::MakeUnique<base::DictionaryValue>();
entry->SetString(ash::launcher::kPinnedAppsPrefAppIDPath, extension_id);
- pref_value->Insert(index, entry);
+ pref_value->Insert(index, std::move(entry));
}
void InsertRemoveAllPinsChange(syncer::SyncChangeList* list) {

Powered by Google App Engine
This is Rietveld 408576698