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

Unified Diff: content/common/font_list_win.cc

Issue 2809933003: Remove ListValue::Append(raw ptr) on Win (Closed)
Patch Set: Includes 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
« no previous file with comments | « content/browser/tracing/etw_tracing_agent_win.cc ('k') | remoting/host/pairing_registry_delegate_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/font_list_win.cc
diff --git a/content/common/font_list_win.cc b/content/common/font_list_win.cc
index 38402c528eae4cbfc5ec6600891ff98a3de35540..cd1b8aaedc9a55a298598fb57aac518558b30ad5 100644
--- a/content/common/font_list_win.cc
+++ b/content/common/font_list_win.cc
@@ -8,7 +8,9 @@
#include <string.h>
#include <set>
+#include <utility>
+#include "base/memory/ptr_util.h"
#include "base/strings/string16.h"
#include "base/values.h"
@@ -45,10 +47,10 @@ std::unique_ptr<base::ListValue> GetFontList_SlowBlocking() {
std::unique_ptr<base::ListValue> font_list(new base::ListValue);
std::set<base::string16>::iterator iter;
for (iter = font_names.begin(); iter != font_names.end(); ++iter) {
- base::ListValue* font_item = new base::ListValue();
- font_item->Append(new base::Value(*iter));
- font_item->Append(new base::Value(*iter));
- font_list->Append(font_item);
+ auto font_item = base::MakeUnique<base::ListValue>();
+ font_item->AppendString(*iter);
+ font_item->AppendString(*iter);
+ font_list->Append(std::move(font_item));
}
return font_list;
}
« no previous file with comments | « content/browser/tracing/etw_tracing_agent_win.cc ('k') | remoting/host/pairing_registry_delegate_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698