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

Unified Diff: content/common/font_list_pango.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
« no previous file with comments | « content/browser/service_worker/service_worker_internals_ui.cc ('k') | dbus/values_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/font_list_pango.cc
diff --git a/content/common/font_list_pango.cc b/content/common/font_list_pango.cc
index 938d0597c5c5bc28d633cb1f4f61de49046b0ca6..f7d82fc5a2232acb45cc1e7c3b9666abb1556708 100644
--- a/content/common/font_list_pango.cc
+++ b/content/common/font_list_pango.cc
@@ -9,6 +9,7 @@
#include <set>
#include <string>
+#include <utility>
#include "base/values.h"
@@ -30,11 +31,11 @@ std::unique_ptr<base::ListValue> GetFontList_SlowBlocking() {
for (std::set<std::string>::const_iterator iter = sorted_families.begin();
iter != sorted_families.end(); ++iter) {
- base::ListValue* font_item = new base::ListValue();
+ std::unique_ptr<base::ListValue> font_item(new base::ListValue());
font_item->AppendString(*iter);
font_item->AppendString(*iter); // localized name.
// TODO(yusukes): Support localized family names.
- font_list->Append(font_item);
+ font_list->Append(std::move(font_item));
}
return font_list;
« no previous file with comments | « content/browser/service_worker/service_worker_internals_ui.cc ('k') | dbus/values_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698