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

Unified Diff: tools/gn/xml_element_writer.cc

Issue 1869503004: Convert //tools to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, change iwyu fixes for converted directories to include <memory> Created 4 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 | « tools/gn/xml_element_writer.h ('k') | tools/imagediff/image_diff.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/xml_element_writer.cc
diff --git a/tools/gn/xml_element_writer.cc b/tools/gn/xml_element_writer.cc
index a608ee305eec4ad32dc77903bbc2b9c6efffd818..fcf34b283cce6ad473f29f6a745be78ff4062e38 100644
--- a/tools/gn/xml_element_writer.cc
+++ b/tools/gn/xml_element_writer.cc
@@ -4,6 +4,8 @@
#include "tools/gn/xml_element_writer.h"
+#include "base/memory/ptr_util.h"
+
XmlAttributes::XmlAttributes() {}
XmlAttributes::XmlAttributes(const base::StringPiece& attr_key,
@@ -53,16 +55,16 @@ void XmlElementWriter::Text(const base::StringPiece& content) {
out_ << content;
}
-scoped_ptr<XmlElementWriter> XmlElementWriter::SubElement(
+std::unique_ptr<XmlElementWriter> XmlElementWriter::SubElement(
const std::string& tag) {
return SubElement(tag, XmlAttributes());
}
-scoped_ptr<XmlElementWriter> XmlElementWriter::SubElement(
+std::unique_ptr<XmlElementWriter> XmlElementWriter::SubElement(
const std::string& tag,
const XmlAttributes& attributes) {
StartContent(true);
- return make_scoped_ptr(
+ return base::WrapUnique(
new XmlElementWriter(out_, tag, attributes, indent_ + 2));
}
« no previous file with comments | « tools/gn/xml_element_writer.h ('k') | tools/imagediff/image_diff.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698