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

Unified Diff: tools/gn/eclipse_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/command_format.cc ('k') | tools/gn/exec_process.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/eclipse_writer.cc
diff --git a/tools/gn/eclipse_writer.cc b/tools/gn/eclipse_writer.cc
index e38e24711daca5498eef1e943185c3996bfad2bd..ee91f61dfb031aefc0daa1c4b821d760199f26c8 100644
--- a/tools/gn/eclipse_writer.cc
+++ b/tools/gn/eclipse_writer.cc
@@ -5,9 +5,9 @@
#include "tools/gn/eclipse_writer.h"
#include <fstream>
+#include <memory>
#include "base/files/file_path.h"
-#include "base/memory/scoped_ptr.h"
#include "tools/gn/builder.h"
#include "tools/gn/config_values_extractors.h"
#include "tools/gn/filesystem_utils.h"
@@ -127,7 +127,7 @@ void EclipseWriter::WriteCDTSettings() {
{
const char* kIncludesSectionName =
"org.eclipse.cdt.internal.ui.wizards.settingswizards.IncludePaths";
- scoped_ptr<XmlElementWriter> section_element =
+ std::unique_ptr<XmlElementWriter> section_element =
cdt_properties_element.SubElement(
"section", XmlAttributes("name", kIncludesSectionName));
@@ -135,7 +135,7 @@ void EclipseWriter::WriteCDTSettings() {
"language", XmlAttributes("name", "holder for library settings"));
for (const std::string& language : languages_) {
- scoped_ptr<XmlElementWriter> language_element =
+ std::unique_ptr<XmlElementWriter> language_element =
section_element->SubElement("language",
XmlAttributes("name", language));
for (const std::string& include_dir : include_dirs_) {
@@ -150,7 +150,7 @@ void EclipseWriter::WriteCDTSettings() {
{
const char* kMacrosSectionName =
"org.eclipse.cdt.internal.ui.wizards.settingswizards.Macros";
- scoped_ptr<XmlElementWriter> section_element =
+ std::unique_ptr<XmlElementWriter> section_element =
cdt_properties_element.SubElement(
"section", XmlAttributes("name", kMacrosSectionName));
@@ -158,11 +158,11 @@ void EclipseWriter::WriteCDTSettings() {
"language", XmlAttributes("name", "holder for library settings"));
for (const std::string& language : languages_) {
- scoped_ptr<XmlElementWriter> language_element =
+ std::unique_ptr<XmlElementWriter> language_element =
section_element->SubElement("language",
XmlAttributes("name", language));
for (const auto& key_val : defines_) {
- scoped_ptr<XmlElementWriter> macro_element =
+ std::unique_ptr<XmlElementWriter> macro_element =
language_element->SubElement("macro");
macro_element->SubElement("name")->Text(EscapeForXML(key_val.first));
macro_element->SubElement("value")->Text(EscapeForXML(key_val.second));
« no previous file with comments | « tools/gn/command_format.cc ('k') | tools/gn/exec_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698