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

Unified Diff: chrome/browser/ui/webui/system_info_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/system_info_ui.cc
diff --git a/chrome/browser/ui/webui/system_info_ui.cc b/chrome/browser/ui/webui/system_info_ui.cc
index 11631235af9b81e29c735dca1d50890b0a5e56b0..510826340f90a9b0ccff409c2d11a695554e16de 100644
--- a/chrome/browser/ui/webui/system_info_ui.cc
+++ b/chrome/browser/ui/webui/system_info_ui.cc
@@ -160,10 +160,10 @@ void SystemInfoUIHTMLSource::RequestComplete() {
for (SystemLogsResponse::const_iterator it = response_->begin();
it != response_->end();
++it) {
- base::DictionaryValue* val = new base::DictionaryValue;
+ std::unique_ptr<base::DictionaryValue> val(new base::DictionaryValue);
val->SetString("statName", it->first);
val->SetString("statValue", it->second);
- details->Append(val);
+ details->Append(std::move(val));
}
}
static const base::StringPiece systeminfo_html(

Powered by Google App Engine
This is Rietveld 408576698