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

Unified Diff: chrome/browser/ui/webui/options/options_ui.cc

Issue 2058233002: Rewrite simple uses of base::ListValue::Append() taking a raw pointer var. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: less comments more ownership Created 4 years, 6 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/webui/options/options_ui.cc
diff --git a/chrome/browser/ui/webui/options/options_ui.cc b/chrome/browser/ui/webui/options/options_ui.cc
index 05076b72427e34edc4782157341ca763dc0b9d55..ac1f5d9e148511cbd596d8603c739eaf6a3c2f77 100644
--- a/chrome/browser/ui/webui/options/options_ui.cc
+++ b/chrome/browser/ui/webui/options/options_ui.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/webui/options/options_ui.h"
#include <algorithm>
+#include <utility>
#include <vector>
#include "base/callback.h"
@@ -414,11 +415,11 @@ void OptionsUI::ProcessAutocompleteSuggestions(
type != AutocompleteMatchType::NAVSUGGEST_PERSONALIZED) {
continue;
}
- base::DictionaryValue* entry = new base::DictionaryValue();
+ std::unique_ptr<base::DictionaryValue> entry(new base::DictionaryValue());
entry->SetString("title", match.description);
entry->SetString("displayURL", match.contents);
entry->SetString("url", match.destination_url.spec());
- suggestions->Append(entry);
+ suggestions->Append(std::move(entry));
}
}

Powered by Google App Engine
This is Rietveld 408576698