C++ modernization improvements.

Replace DISALLOW_* calls with the corresponding "= delete" statements.

Remove ignore_result, replace with [[maybe_unused]] variables.

Replace WARN_UNUSED_RESULT with [[nodiscard]]

Clang-format all changed files.

Change-Id: Idbb7c14c2c9d5e065571240b79e41f07af3b4a7a
Reviewed-on: https://gn-review.googlesource.com/c/gn/+/12081
Commit-Queue: Brett Wilson <brettw@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
diff --git a/src/base/command_line.cc b/src/base/command_line.cc
index ba9a6b0..68bc587 100644
--- a/src/base/command_line.cc
+++ b/src/base/command_line.cc
@@ -11,7 +11,6 @@
 
 #include "base/files/file_path.h"
 #include "base/logging.h"
-#include "base/macros.h"
 #include "base/stl_util.h"
 #include "base/strings/string_split.h"
 #include "base/strings/string_tokenizer.h"
@@ -107,7 +106,8 @@
 }
 
 #if defined(OS_WIN)
-// Quote a string as necessary for CommandLineToArgvW compatibility *on Windows*.
+// Quote a string as necessary for CommandLineToArgvW compatibility *on
+// Windows*.
 std::u16string QuoteForCommandLineToArgvW(const std::u16string& arg,
                                           bool quote_placeholders) {
   // We follow the quoting rules of CommandLineToArgvW.
diff --git a/src/base/compiler_specific.h b/src/base/compiler_specific.h
index 75f21e8..b788a8c 100644
--- a/src/base/compiler_specific.h
+++ b/src/base/compiler_specific.h
@@ -26,17 +26,6 @@
 #define ALWAYS_INLINE inline
 #endif
 
-// Annotate a function indicating the caller must examine the return value.
-// Use like:
-//   int foo() WARN_UNUSED_RESULT;
-// To explicitly ignore a result, see |ignore_result()| in base/macros.h.
-#undef WARN_UNUSED_RESULT
-#if defined(COMPILER_GCC) || defined(__clang__)
-#define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
-#else
-#define WARN_UNUSED_RESULT
-#endif
-
 // Tell the compiler a function is using a printf-style format string.
 // |format_param| is the one-based index of the format string parameter;
 // |dots_param| is the one-based index of the "..." parameter.
diff --git a/src/base/containers/circular_deque.h b/src/base/containers/circular_deque.h
index 2048336..525dabd 100644
--- a/src/base/containers/circular_deque.h
+++ b/src/base/containers/circular_deque.h
@@ -13,7 +13,6 @@
 
 #include "base/containers/vector_buffer.h"
 #include "base/logging.h"
-#include "base/macros.h"
 #include "base/template_util.h"
 
 // base::circular_deque is similar to std::deque. Unlike std::deque, the
diff --git a/src/base/containers/vector_buffer.h b/src/base/containers/vector_buffer.h
index 7447126..e4c22d5 100644
--- a/src/base/containers/vector_buffer.h
+++ b/src/base/containers/vector_buffer.h
@@ -12,7 +12,6 @@
 #include <utility>
 
 #include "base/logging.h"
-#include "base/macros.h"
 
 namespace base {
 namespace internal {
@@ -154,7 +153,8 @@
   T* buffer_ = nullptr;
   size_t capacity_ = 0;
 
-  DISALLOW_COPY_AND_ASSIGN(VectorBuffer);
+  VectorBuffer(const VectorBuffer&) = delete;
+  VectorBuffer& operator=(const VectorBuffer&) = delete;
 };
 
 }  // namespace internal
diff --git a/src/base/files/file.h b/src/base/files/file.h
index f579ef5..2c94eb4 100644
--- a/src/base/files/file.h
+++ b/src/base/files/file.h
@@ -12,7 +12,6 @@
 #include "base/files/file_path.h"
 #include "base/files/platform_file.h"
 #include "base/files/scoped_file.h"
-#include "base/macros.h"
 #include "util/build_config.h"
 #include "util/ticks.h"
 
@@ -23,7 +22,7 @@
 namespace base {
 
 #if defined(OS_BSD) || defined(OS_MACOSX) || defined(OS_NACL) || \
-    defined(OS_HAIKU) || defined(OS_MSYS) || defined(OS_ZOS) || \
+    defined(OS_HAIKU) || defined(OS_MSYS) || defined(OS_ZOS) ||  \
     defined(OS_ANDROID) && __ANDROID_API__ < 21
 typedef struct stat stat_wrapper_t;
 #elif defined(OS_POSIX) || defined(OS_FUCHSIA)
@@ -45,8 +44,8 @@
   // of the five (possibly combining with other flags) when opening or creating
   // a file.
   enum Flags {
-    FLAG_OPEN = 1 << 0,            // Opens a file, only if it exists.
-    FLAG_CREATE_ALWAYS = 1 << 3,   // May overwrite an old file.
+    FLAG_OPEN = 1 << 0,           // Opens a file, only if it exists.
+    FLAG_CREATE_ALWAYS = 1 << 3,  // May overwrite an old file.
     FLAG_READ = 1 << 4,
     FLAG_WRITE = 1 << 5,
   };
@@ -276,7 +275,8 @@
 
   Error error_details_ = FILE_ERROR_FAILED;
 
-  DISALLOW_COPY_AND_ASSIGN(File);
+  File(const File&) = delete;
+  File& operator=(const File&) = delete;
 };
 
 }  // namespace base
diff --git a/src/base/files/file_enumerator.h b/src/base/files/file_enumerator.h
index 3a2a823..5bb560d 100644
--- a/src/base/files/file_enumerator.h
+++ b/src/base/files/file_enumerator.h
@@ -12,7 +12,6 @@
 
 #include "base/containers/stack.h"
 #include "base/files/file_path.h"
-#include "base/macros.h"
 #include "util/build_config.h"
 #include "util/ticks.h"
 
@@ -163,7 +162,8 @@
   // enumerate in the breadth-first search.
   base::stack<FilePath> pending_paths_;
 
-  DISALLOW_COPY_AND_ASSIGN(FileEnumerator);
+  FileEnumerator(const FileEnumerator&) = delete;
+  FileEnumerator& operator=(const FileEnumerator&) = delete;
 };
 
 }  // namespace base
diff --git a/src/base/files/file_path.cc b/src/base/files/file_path.cc
index d59b8ea..1959133 100644
--- a/src/base/files/file_path.cc
+++ b/src/base/files/file_path.cc
@@ -11,7 +11,6 @@
 #include <string_view>
 
 #include "base/logging.h"
-#include "base/macros.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "util/build_config.h"
diff --git a/src/base/files/file_path.h b/src/base/files/file_path.h
index 2359bb6..26bf011 100644
--- a/src/base/files/file_path.h
+++ b/src/base/files/file_path.h
@@ -110,7 +110,6 @@
 #include <vector>
 
 #include "base/compiler_specific.h"
-#include "base/macros.h"
 #include "util/build_config.h"
 
 // Windows-style drive letter support and pathname separator characters can be
@@ -238,13 +237,13 @@
   // kCurrentDirectory.  If this object already refers to the root directory,
   // returns a FilePath identifying the root directory. Please note that this
   // doesn't resolve directory navigation, e.g. the result for "../a" is "..".
-  FilePath DirName() const WARN_UNUSED_RESULT;
+  [[nodiscard]] FilePath DirName() const;
 
   // Returns a FilePath corresponding to the last path component of this
   // object, either a file or a directory.  If this object already refers to
   // the root directory, returns a FilePath identifying the root directory;
   // this is the only situation in which BaseName will return an absolute path.
-  FilePath BaseName() const WARN_UNUSED_RESULT;
+  [[nodiscard]] FilePath BaseName() const;
 
   // Returns ".jpg" for path "C:\pics\jojo.jpg", or an empty string if
   // the file has no extension.  If non-empty, Extension() will always start
@@ -256,7 +255,7 @@
   // ASSERT(new_path == path.value());
   // NOTE: this is different from the original file_util implementation which
   // returned the extension without a leading "." ("jpg" instead of ".jpg")
-  StringType Extension() const WARN_UNUSED_RESULT;
+  [[nodiscard]] StringType Extension() const;
 
   // Returns the path's file extension, as in Extension(), but will
   // never return a double extension.
@@ -265,16 +264,16 @@
   // we can rename this to Extension() and the other to something like
   // LongExtension(), defaulting to short extensions and leaving the
   // long "extensions" to logic like base::GetUniquePathNumber().
-  StringType FinalExtension() const WARN_UNUSED_RESULT;
+  [[nodiscard]] StringType FinalExtension() const;
 
   // Returns "C:\pics\jojo" for path "C:\pics\jojo.jpg"
   // NOTE: this is slightly different from the similar file_util implementation
   // which returned simply 'jojo'.
-  FilePath RemoveExtension() const WARN_UNUSED_RESULT;
+  [[nodiscard]] FilePath RemoveExtension() const;
 
   // Removes the path's file extension, as in RemoveExtension(), but
   // ignores double extensions.
-  FilePath RemoveFinalExtension() const WARN_UNUSED_RESULT;
+  [[nodiscard]] FilePath RemoveFinalExtension() const;
 
   // Inserts |suffix| after the file name portion of |path| but before the
   // extension.  Returns "" if BaseName() == "." or "..".
@@ -283,20 +282,19 @@
   // path == "jojo.jpg"         suffix == " (1)", returns "jojo (1).jpg"
   // path == "C:\pics\jojo"     suffix == " (1)", returns "C:\pics\jojo (1)"
   // path == "C:\pics.old\jojo" suffix == " (1)", returns "C:\pics.old\jojo (1)"
-  FilePath InsertBeforeExtension(StringViewType suffix) const
-      WARN_UNUSED_RESULT;
-  FilePath InsertBeforeExtensionASCII(std::string_view suffix) const
-      WARN_UNUSED_RESULT;
+  [[nodiscard]] FilePath InsertBeforeExtension(StringViewType suffix) const;
+  [[nodiscard]] FilePath InsertBeforeExtensionASCII(
+      std::string_view suffix) const;
 
   // Adds |extension| to |file_name|. Returns the current FilePath if
   // |extension| is empty. Returns "" if BaseName() == "." or "..".
-  FilePath AddExtension(StringViewType extension) const WARN_UNUSED_RESULT;
+  [[nodiscard]] FilePath AddExtension(StringViewType extension) const;
 
   // Replaces the extension of |file_name| with |extension|.  If |file_name|
   // does not have an extension, then |extension| is added.  If |extension| is
   // empty, then the extension is removed from |file_name|.
   // Returns "" if BaseName() == "." or "..".
-  FilePath ReplaceExtension(StringViewType extension) const WARN_UNUSED_RESULT;
+  [[nodiscard]] FilePath ReplaceExtension(StringViewType extension) const;
 
   // Returns a FilePath by appending a separator and the supplied path
   // component to this object's path.  Append takes care to avoid adding
@@ -304,8 +302,8 @@
   // If this object's path is kCurrentDirectory, a new FilePath corresponding
   // only to |component| is returned.  |component| must be a relative path;
   // it is an error to pass an absolute path.
-  FilePath Append(StringViewType component) const WARN_UNUSED_RESULT;
-  FilePath Append(const FilePath& component) const WARN_UNUSED_RESULT;
+  [[nodiscard]] FilePath Append(StringViewType component) const;
+  [[nodiscard]] FilePath Append(const FilePath& component) const;
 
   // Although Windows StringType is std::u16string, since the encoding it uses
   // for paths is well defined, it can handle ASCII path components as well. Mac
@@ -313,7 +311,7 @@
   // Linux, although it can use any 8-bit encoding for paths, we assume that
   // ASCII is a valid subset, regardless of the encoding, since many operating
   // system paths will always be ASCII.
-  FilePath AppendASCII(std::string_view component) const WARN_UNUSED_RESULT;
+  [[nodiscard]] FilePath AppendASCII(std::string_view component) const;
 
   // Returns true if this FilePath contains an absolute path.  On Windows, an
   // absolute path begins with either a drive letter specification followed by
@@ -322,15 +320,15 @@
   bool IsAbsolute() const;
 
   // Returns true if the patch ends with a path separator character.
-  bool EndsWithSeparator() const WARN_UNUSED_RESULT;
+  [[nodiscard]] bool EndsWithSeparator() const;
 
   // Returns a copy of this FilePath that ends with a trailing separator. If
   // the input path is empty, an empty FilePath will be returned.
-  FilePath AsEndingWithSeparator() const WARN_UNUSED_RESULT;
+  [[nodiscard]] FilePath AsEndingWithSeparator() const;
 
   // Returns a copy of this FilePath that does not end with a trailing
   // separator.
-  FilePath StripTrailingSeparators() const WARN_UNUSED_RESULT;
+  [[nodiscard]] FilePath StripTrailingSeparators() const;
 
   // Returns true if this FilePath contains an attempt to reference a parent
   // directory (e.g. has a path component that is "..").
diff --git a/src/base/files/file_path_constants.cc b/src/base/files/file_path_constants.cc
index 9ae0388..d09ef45 100644
--- a/src/base/files/file_path_constants.cc
+++ b/src/base/files/file_path_constants.cc
@@ -7,7 +7,6 @@
 #include <iterator>
 
 #include "base/files/file_path.h"
-#include "base/macros.h"
 
 namespace base {
 
diff --git a/src/base/files/file_util_posix.cc b/src/base/files/file_util_posix.cc
index d7ea938..ac281c4 100644
--- a/src/base/files/file_util_posix.cc
+++ b/src/base/files/file_util_posix.cc
@@ -29,7 +29,6 @@
 #include "base/files/file_path.h"
 #include "base/files/scoped_file.h"
 #include "base/logging.h"
-#include "base/macros.h"
 #include "base/posix/eintr_wrapper.h"
 #include "base/stl_util.h"
 #include "base/strings/string_split.h"
@@ -61,7 +60,7 @@
 namespace {
 
 #if defined(OS_BSD) || defined(OS_MACOSX) || defined(OS_NACL) || \
-    defined(OS_HAIKU) || defined(OS_MSYS) || defined(OS_ZOS) || \
+    defined(OS_HAIKU) || defined(OS_MSYS) || defined(OS_ZOS) ||  \
     defined(OS_ANDROID) && __ANDROID_API__ < 21
 int CallStat(const char* path, stat_wrapper_t* sb) {
   return stat(path, sb);
diff --git a/src/base/files/file_util_win.cc b/src/base/files/file_util_win.cc
index a18715e..9f4bf5b 100644
--- a/src/base/files/file_util_win.cc
+++ b/src/base/files/file_util_win.cc
@@ -4,10 +4,12 @@
 
 #include "base/files/file_util.h"
 
-// windows.h includes winsock.h which isn't compatible with winsock2.h. To use winsock2.h
-// you have to include it first.
+// windows.h includes winsock.h which isn't compatible with winsock2.h. To use
+// winsock2.h you have to include it first.
+// clang-format off
 #include <winsock2.h>
 #include <windows.h>
+// clang-format on
 
 #include <io.h>
 #include <psapi.h>
@@ -27,7 +29,6 @@
 #include "base/files/file_enumerator.h"
 #include "base/files/file_path.h"
 #include "base/logging.h"
-#include "base/macros.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
 #include "base/strings/stringprintf.h"
diff --git a/src/base/files/scoped_temp_dir.h b/src/base/files/scoped_temp_dir.h
index 4ddb690..bd473e0 100644
--- a/src/base/files/scoped_temp_dir.h
+++ b/src/base/files/scoped_temp_dir.h
@@ -18,7 +18,6 @@
 // intervening calls to Delete or Take, or the calls will fail.
 
 #include "base/files/file_path.h"
-#include "base/macros.h"
 
 namespace base {
 
@@ -32,17 +31,17 @@
 
   // Creates a unique directory in TempPath, and takes ownership of it.
   // See file_util::CreateNewTemporaryDirectory.
-  bool CreateUniqueTempDir() WARN_UNUSED_RESULT;
+  [[nodiscard]] bool CreateUniqueTempDir();
 
   // Creates a unique directory under a given path, and takes ownership of it.
-  bool CreateUniqueTempDirUnderPath(const FilePath& path) WARN_UNUSED_RESULT;
+  [[nodiscard]] bool CreateUniqueTempDirUnderPath(const FilePath& path);
 
   // Takes ownership of directory at |path|, creating it if necessary.
   // Don't call multiple times unless Take() has been called first.
-  bool Set(const FilePath& path) WARN_UNUSED_RESULT;
+  [[nodiscard]] bool Set(const FilePath& path);
 
   // Deletes the temporary directory wrapped by this object.
-  bool Delete() WARN_UNUSED_RESULT;
+  [[nodiscard]] bool Delete();
 
   // Caller takes ownership of the temporary directory so it won't be destroyed
   // when this object goes out of scope.
@@ -62,7 +61,8 @@
  private:
   FilePath path_;
 
-  DISALLOW_COPY_AND_ASSIGN(ScopedTempDir);
+  ScopedTempDir(const ScopedTempDir&) = delete;
+  ScopedTempDir& operator=(const ScopedTempDir&) = delete;
 };
 
 }  // namespace base
diff --git a/src/base/json/json_parser.cc b/src/base/json/json_parser.cc
index df02829..5a245ec 100644
--- a/src/base/json/json_parser.cc
+++ b/src/base/json/json_parser.cc
@@ -10,7 +10,6 @@
 #include <vector>
 
 #include "base/logging.h"
-#include "base/macros.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
@@ -43,7 +42,8 @@
   const int max_depth_;
   int* const depth_;
 
-  DISALLOW_COPY_AND_ASSIGN(StackMarker);
+  StackMarker(const StackMarker&) = delete;
+  StackMarker& operator=(const StackMarker&) = delete;
 };
 
 constexpr uint32_t kUnicodeReplacementPoint = 0xFFFD;
diff --git a/src/base/json/json_parser.h b/src/base/json/json_parser.h
index 1001080..7562c35 100644
--- a/src/base/json/json_parser.h
+++ b/src/base/json/json_parser.h
@@ -16,7 +16,6 @@
 #include "base/compiler_specific.h"
 #include "base/gtest_prod_util.h"
 #include "base/json/json_reader.h"
-#include "base/macros.h"
 
 namespace base {
 
@@ -248,7 +247,8 @@
   FRIEND_TEST_ALL_PREFIXES(JSONParserTest, ReplaceInvalidCharacters);
   FRIEND_TEST_ALL_PREFIXES(JSONParserTest, ReplaceInvalidUTF16EscapeSequence);
 
-  DISALLOW_COPY_AND_ASSIGN(JSONParser);
+  JSONParser(const JSONParser&) = delete;
+  JSONParser& operator=(const JSONParser&) = delete;
 };
 
 // Used when decoding and an invalid utf-8 sequence is encountered.
diff --git a/src/base/json/json_value_converter.h b/src/base/json/json_value_converter.h
index f3030f2..1adc93d 100644
--- a/src/base/json/json_value_converter.h
+++ b/src/base/json/json_value_converter.h
@@ -13,7 +13,6 @@
 #include <vector>
 
 #include "base/logging.h"
-#include "base/macros.h"
 #include "base/memory/ptr_util.h"
 #include "base/values.h"
 
@@ -101,7 +100,8 @@
 
  private:
   std::string field_path_;
-  DISALLOW_COPY_AND_ASSIGN(FieldConverterBase);
+  FieldConverterBase(const FieldConverterBase&) = delete;
+  FieldConverterBase& operator=(const FieldConverterBase&) = delete;
 };
 
 template <typename FieldType>
@@ -128,7 +128,8 @@
  private:
   FieldType StructType::*field_pointer_;
   std::unique_ptr<ValueConverter<FieldType>> value_converter_;
-  DISALLOW_COPY_AND_ASSIGN(FieldConverter);
+  FieldConverter(const FieldConverter&) = delete;
+  FieldConverter& operator=(const FieldConverter&) = delete;
 };
 
 template <typename FieldType>
@@ -142,7 +143,8 @@
   bool Convert(const base::Value& value, int* field) const override;
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(BasicValueConverter);
+  BasicValueConverter(const BasicValueConverter&) = delete;
+  BasicValueConverter& operator=(const BasicValueConverter&) = delete;
 };
 
 template <>
@@ -153,7 +155,8 @@
   bool Convert(const base::Value& value, std::string* field) const override;
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(BasicValueConverter);
+  BasicValueConverter(const BasicValueConverter&) = delete;
+  BasicValueConverter& operator=(const BasicValueConverter&) = delete;
 };
 
 template <>
@@ -165,7 +168,8 @@
   bool Convert(const base::Value& value, std::u16string* field) const override;
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(BasicValueConverter);
+  BasicValueConverter(const BasicValueConverter&) = delete;
+  BasicValueConverter& operator=(const BasicValueConverter&) = delete;
 };
 
 template <>
@@ -176,7 +180,8 @@
   bool Convert(const base::Value& value, double* field) const override;
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(BasicValueConverter);
+  BasicValueConverter(const BasicValueConverter&) = delete;
+  BasicValueConverter& operator=(const BasicValueConverter&) = delete;
 };
 
 template <>
@@ -187,7 +192,8 @@
   bool Convert(const base::Value& value, bool* field) const override;
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(BasicValueConverter);
+  BasicValueConverter(const BasicValueConverter&) = delete;
+  BasicValueConverter& operator=(const BasicValueConverter&) = delete;
 };
 
 template <typename FieldType>
@@ -205,7 +211,8 @@
  private:
   ConvertFunc convert_func_;
 
-  DISALLOW_COPY_AND_ASSIGN(ValueFieldConverter);
+  ValueFieldConverter(const ValueFieldConverter&) = delete;
+  ValueFieldConverter& operator=(const ValueFieldConverter&) = delete;
 };
 
 template <typename FieldType>
@@ -225,7 +232,8 @@
  private:
   ConvertFunc convert_func_;
 
-  DISALLOW_COPY_AND_ASSIGN(CustomFieldConverter);
+  CustomFieldConverter(const CustomFieldConverter&) = delete;
+  CustomFieldConverter& operator=(const CustomFieldConverter&) = delete;
 };
 
 template <typename NestedType>
@@ -239,7 +247,8 @@
 
  private:
   JSONValueConverter<NestedType> converter_;
-  DISALLOW_COPY_AND_ASSIGN(NestedValueConverter);
+  NestedValueConverter(const NestedValueConverter&) = delete;
+  NestedValueConverter& operator=(const NestedValueConverter&) = delete;
 };
 
 template <typename Element>
@@ -274,7 +283,8 @@
 
  private:
   BasicValueConverter<Element> basic_converter_;
-  DISALLOW_COPY_AND_ASSIGN(RepeatedValueConverter);
+  RepeatedValueConverter(const RepeatedValueConverter&) = delete;
+  RepeatedValueConverter& operator=(const RepeatedValueConverter&) = delete;
 };
 
 template <typename NestedType>
@@ -307,7 +317,8 @@
 
  private:
   JSONValueConverter<NestedType> converter_;
-  DISALLOW_COPY_AND_ASSIGN(RepeatedMessageConverter);
+  RepeatedMessageConverter(const RepeatedMessageConverter&) = delete;
+  RepeatedMessageConverter& operator=(const RepeatedMessageConverter&) = delete;
 };
 
 template <typename NestedType>
@@ -343,7 +354,9 @@
 
  private:
   ConvertFunc convert_func_;
-  DISALLOW_COPY_AND_ASSIGN(RepeatedCustomValueConverter);
+  RepeatedCustomValueConverter(const RepeatedCustomValueConverter&) = delete;
+  RepeatedCustomValueConverter& operator=(const RepeatedCustomValueConverter&) =
+      delete;
 };
 
 }  // namespace internal
@@ -507,7 +520,8 @@
   std::vector<std::unique_ptr<internal::FieldConverterBase<StructType>>>
       fields_;
 
-  DISALLOW_COPY_AND_ASSIGN(JSONValueConverter);
+  JSONValueConverter(const JSONValueConverter&) = delete;
+  JSONValueConverter& operator=(const JSONValueConverter&) = delete;
 };
 
 }  // namespace base
diff --git a/src/base/json/json_writer.h b/src/base/json/json_writer.h
index 4114f77..888433f 100644
--- a/src/base/json/json_writer.h
+++ b/src/base/json/json_writer.h
@@ -9,8 +9,6 @@
 
 #include <string>
 
-#include "base/macros.h"
-
 namespace base {
 
 class Value;
@@ -59,7 +57,8 @@
   // Where we write JSON data as we generate it.
   std::string* json_string_;
 
-  DISALLOW_COPY_AND_ASSIGN(JSONWriter);
+  JSONWriter(const JSONWriter&) = delete;
+  JSONWriter& operator=(const JSONWriter&) = delete;
 };
 
 }  // namespace base
diff --git a/src/base/logging.cc b/src/base/logging.cc
index ee9e109..c8673e4 100644
--- a/src/base/logging.cc
+++ b/src/base/logging.cc
@@ -10,7 +10,6 @@
 #include <iterator>
 #include <thread>
 
-#include "base/macros.h"
 #include "util/build_config.h"
 
 #if defined(OS_WIN)
@@ -179,7 +178,7 @@
 #if defined(OS_WIN)
   OutputDebugStringA(str_newline.c_str());
 #endif
-  ignore_result(fwrite(str_newline.data(), str_newline.size(), 1, stderr));
+  fwrite(str_newline.data(), str_newline.size(), 1, stderr);
   fflush(stderr);
 
   if (severity_ == LOG_FATAL) {
diff --git a/src/base/logging.h b/src/base/logging.h
index 78cad59..2b1af7f 100644
--- a/src/base/logging.h
+++ b/src/base/logging.h
@@ -16,7 +16,6 @@
 #include <utility>
 
 #include "base/compiler_specific.h"
-#include "base/macros.h"
 #include "base/template_util.h"
 #include "util/build_config.h"
 
@@ -797,7 +796,8 @@
   SaveLastError last_error_;
 #endif
 
-  DISALLOW_COPY_AND_ASSIGN(LogMessage);
+  LogMessage(const LogMessage&) = delete;
+  LogMessage& operator=(const LogMessage&) = delete;
 };
 
 // This class is used to explicitly ignore values in the conditional
@@ -840,7 +840,8 @@
   SystemErrorCode err_;
   LogMessage log_message_;
 
-  DISALLOW_COPY_AND_ASSIGN(Win32ErrorLogMessage);
+  Win32ErrorLogMessage(const Win32ErrorLogMessage&) = delete;
+  Win32ErrorLogMessage& operator=(const Win32ErrorLogMessage&) = delete;
 };
 #elif defined(OS_POSIX) || defined(OS_FUCHSIA)
 // Appends a formatted system message of the errno type
@@ -860,7 +861,8 @@
   SystemErrorCode err_;
   LogMessage log_message_;
 
-  DISALLOW_COPY_AND_ASSIGN(ErrnoLogMessage);
+  ErrnoLogMessage(const ErrnoLogMessage&) = delete;
+  ErrnoLogMessage& operator=(const ErrnoLogMessage&) = delete;
 };
 #endif  // OS_WIN
 
diff --git a/src/base/mac/mac_logging.h b/src/base/mac/mac_logging.h
index 5ef75f3..4a7fd62 100644
--- a/src/base/mac/mac_logging.h
+++ b/src/base/mac/mac_logging.h
@@ -6,7 +6,6 @@
 #define BASE_MAC_MAC_LOGGING_H_
 
 #include "base/logging.h"
-#include "base/macros.h"
 #include "util/build_config.h"
 
 #if defined(OS_IOS)
@@ -42,7 +41,8 @@
  private:
   OSStatus status_;
 
-  DISALLOW_COPY_AND_ASSIGN(OSStatusLogMessage);
+  OSStatusLogMessage(const OSStatusLogMessage&) = delete;
+  OSStatusLogMessage& operator=(const OSStatusLogMessage&) = delete;
 };
 
 }  // namespace logging
diff --git a/src/base/mac/scoped_typeref.h b/src/base/mac/scoped_typeref.h
index 659ee34..034ed90 100644
--- a/src/base/mac/scoped_typeref.h
+++ b/src/base/mac/scoped_typeref.h
@@ -91,7 +91,7 @@
   // This is to be used only to take ownership of objects that are created
   // by pass-by-pointer create functions. To enforce this, require that the
   // object be reset to NULL before this may be used.
-  T* InitializeInto() WARN_UNUSED_RESULT {
+  [[nodiscard]] T* InitializeInto() {
     DCHECK(!object_);
     return &object_;
   }
@@ -123,7 +123,7 @@
   // ScopedTypeRef<>::release() is like std::unique_ptr<>::release.  It is NOT
   // a wrapper for Release().  To force a ScopedTypeRef<> object to call
   // Release(), use ScopedTypeRef<>::reset().
-  T release() __attribute((ns_returns_not_retained)) WARN_UNUSED_RESULT {
+  [[nodiscard]] T release() __attribute((ns_returns_not_retained)) {
     __unsafe_unretained T temp = object_;
     object_ = Traits::InvalidValue();
     return temp;
diff --git a/src/base/macros.h b/src/base/macros.h
deleted file mode 100644
index 750d54d..0000000
--- a/src/base/macros.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file contains macros and macro-like constructs (e.g., templates) that
-// are commonly used throughout Chromium source. (It may also contain things
-// that are closely related to things that are commonly used that belong in this
-// file.)
-
-#ifndef BASE_MACROS_H_
-#define BASE_MACROS_H_
-
-// Distinguish mips32.
-#if defined(__mips__) && (_MIPS_SIM == _ABIO32) && !defined(__mips32__)
-#define __mips32__
-#endif
-
-// Distinguish mips64.
-#if defined(__mips__) && (_MIPS_SIM == _ABI64) && !defined(__mips64__)
-#define __mips64__
-#endif
-
-// Put this in the declarations for a class to be uncopyable.
-#define DISALLOW_COPY(TypeName) TypeName(const TypeName&) = delete
-
-// Put this in the declarations for a class to be unassignable.
-#define DISALLOW_ASSIGN(TypeName) TypeName& operator=(const TypeName&) = delete
-
-// Put this in the declarations for a class to be uncopyable and unassignable.
-#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
-  DISALLOW_COPY(TypeName);                 \
-  DISALLOW_ASSIGN(TypeName)
-
-// A macro to disallow all the implicit constructors, namely the
-// default constructor, copy constructor and operator= functions.
-// This is especially useful for classes containing only static methods.
-#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
-  TypeName() = delete;                           \
-  DISALLOW_COPY_AND_ASSIGN(TypeName)
-
-// Used to explicitly mark the return value of a function as unused. If you are
-// really sure you don't want to do anything with the return value of a function
-// that has been marked WARN_UNUSED_RESULT, wrap it with this. Example:
-//
-//   std::unique_ptr<MyType> my_var = ...;
-//   if (TakeOwnership(my_var.get()) == SUCCESS)
-//     ignore_result(my_var.release());
-//
-template <typename T>
-inline void ignore_result(const T&) {}
-
-#endif  // BASE_MACROS_H_
diff --git a/src/base/memory/ref_counted.h b/src/base/memory/ref_counted.h
index acfa004..cd3f21a 100644
--- a/src/base/memory/ref_counted.h
+++ b/src/base/memory/ref_counted.h
@@ -12,7 +12,6 @@
 #include "base/atomic_ref_count.h"
 #include "base/compiler_specific.h"
 #include "base/logging.h"
-#include "base/macros.h"
 #include "base/memory/scoped_refptr.h"
 #include "util/build_config.h"
 
@@ -73,7 +72,8 @@
 
   mutable uint32_t ref_count_ = 0;
 
-  DISALLOW_COPY_AND_ASSIGN(RefCountedBase);
+  RefCountedBase(const RefCountedBase&) = delete;
+  RefCountedBase& operator=(const RefCountedBase&) = delete;
 };
 
 class RefCountedThreadSafeBase {
@@ -117,7 +117,8 @@
 
   mutable AtomicRefCount ref_count_{0};
 
-  DISALLOW_COPY_AND_ASSIGN(RefCountedThreadSafeBase);
+  RefCountedThreadSafeBase(const RefCountedThreadSafeBase&) = delete;
+  RefCountedThreadSafeBase& operator=(const RefCountedThreadSafeBase&) = delete;
 };
 
 }  // namespace subtle
@@ -227,7 +228,8 @@
     delete x;
   }
 
-  DISALLOW_COPY_AND_ASSIGN(RefCounted);
+  RefCounted(const RefCounted&) = delete;
+  RefCounted& operator=(const RefCounted&) = delete;
 };
 
 // Forward declaration.
@@ -290,7 +292,8 @@
     delete x;
   }
 
-  DISALLOW_COPY_AND_ASSIGN(RefCountedThreadSafe);
+  RefCountedThreadSafe(const RefCountedThreadSafe&) = delete;
+  RefCountedThreadSafe& operator=(const RefCountedThreadSafe&) = delete;
 };
 
 //
diff --git a/src/base/memory/scoped_refptr.h b/src/base/memory/scoped_refptr.h
index a257617..2403c22 100644
--- a/src/base/memory/scoped_refptr.h
+++ b/src/base/memory/scoped_refptr.h
@@ -13,7 +13,6 @@
 
 #include "base/compiler_specific.h"
 #include "base/logging.h"
-#include "base/macros.h"
 
 template <class T>
 class scoped_refptr;
diff --git a/src/base/memory/weak_ptr.h b/src/base/memory/weak_ptr.h
index 3b2a0af..55a9fe1 100644
--- a/src/base/memory/weak_ptr.h
+++ b/src/base/memory/weak_ptr.h
@@ -74,7 +74,6 @@
 #include <type_traits>
 
 #include "base/logging.h"
-#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 
 namespace base {
@@ -325,7 +324,9 @@
   }
 
  private:
-  DISALLOW_IMPLICIT_CONSTRUCTORS(WeakPtrFactory);
+  WeakPtrFactory() = delete;
+  WeakPtrFactory(const WeakPtrFactory&) = delete;
+  WeakPtrFactory& operator=(const WeakPtrFactory&) = delete;
 };
 
 // A class may extend from SupportsWeakPtr to let others take weak pointers to
@@ -347,7 +348,8 @@
 
  private:
   internal::WeakReferenceOwner weak_reference_owner_;
-  DISALLOW_COPY_AND_ASSIGN(SupportsWeakPtr);
+  SupportsWeakPtr(const SupportsWeakPtr&) = delete;
+  SupportsWeakPtr& operator=(const SupportsWeakPtr&) = delete;
 };
 
 // Helper function that uses type deduction to safely return a WeakPtr<Derived>
diff --git a/src/base/scoped_clear_errno.h b/src/base/scoped_clear_errno.h
index 44a0c62..cdcb406 100644
--- a/src/base/scoped_clear_errno.h
+++ b/src/base/scoped_clear_errno.h
@@ -7,8 +7,6 @@
 
 #include <errno.h>
 
-#include "base/macros.h"
-
 namespace base {
 
 // Simple scoper that saves the current value of errno, resets it to 0, and on
@@ -24,7 +22,8 @@
  private:
   const int old_errno_;
 
-  DISALLOW_COPY_AND_ASSIGN(ScopedClearErrno);
+  ScopedClearErrno(const ScopedClearErrno&) = delete;
+  ScopedClearErrno& operator=(const ScopedClearErrno&) = delete;
 };
 
 }  // namespace base
diff --git a/src/base/scoped_generic.h b/src/base/scoped_generic.h
index b1d479d..dd35d08 100644
--- a/src/base/scoped_generic.h
+++ b/src/base/scoped_generic.h
@@ -10,7 +10,6 @@
 #include <algorithm>
 
 #include "base/compiler_specific.h"
-#include "base/macros.h"
 
 namespace base {
 
@@ -114,7 +113,7 @@
   // Release the object. The return value is the current object held by this
   // object. After this operation, this object will hold a null value, and
   // will not own the object any more.
-  element_type release() WARN_UNUSED_RESULT {
+  [[nodiscard]] element_type release() {
     element_type old_generic = data_.generic;
     data_.generic = traits_type::InvalidValue();
     return old_generic;
@@ -122,7 +121,7 @@
 
   // Returns a raw pointer to the object storage, to allow the scoper to be used
   // to receive and manage out-parameter values. Implies reset().
-  element_type* receive() WARN_UNUSED_RESULT {
+  [[nodiscard]] element_type* receive() {
     reset();
     return &data_.generic;
   }
@@ -161,7 +160,8 @@
 
   Data data_;
 
-  DISALLOW_COPY_AND_ASSIGN(ScopedGeneric);
+  ScopedGeneric(const ScopedGeneric&) = delete;
+  ScopedGeneric& operator=(const ScopedGeneric&) = delete;
 };
 
 template <class T, class Traits>
diff --git a/src/base/strings/string_util.cc b/src/base/strings/string_util.cc
index 52049a8..1083942 100644
--- a/src/base/strings/string_util.cc
+++ b/src/base/strings/string_util.cc
@@ -22,7 +22,6 @@
 #include <vector>
 
 #include "base/logging.h"
-#include "base/macros.h"
 #include "base/strings/utf_string_conversion_utils.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/third_party/icu/icu_utf.h"
diff --git a/src/base/strings/stringprintf.cc b/src/base/strings/stringprintf.cc
index c00bdbc..2f81894 100644
--- a/src/base/strings/stringprintf.cc
+++ b/src/base/strings/stringprintf.cc
@@ -10,7 +10,6 @@
 #include <iterator>
 #include <vector>
 
-#include "base/macros.h"
 #include "base/scoped_clear_errno.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
diff --git a/src/base/strings/stringprintf.h b/src/base/strings/stringprintf.h
index e6e0746..c5b445c 100644
--- a/src/base/strings/stringprintf.h
+++ b/src/base/strings/stringprintf.h
@@ -15,12 +15,13 @@
 namespace base {
 
 // Return a C++ string given printf-like input.
-std::string StringPrintf(_Printf_format_string_ const char* format, ...)
-    PRINTF_FORMAT(1, 2) WARN_UNUSED_RESULT;
+[[nodiscard]] std::string StringPrintf(
+    _Printf_format_string_ const char* format,
+    ...) PRINTF_FORMAT(1, 2);
 
 // Return a C++ string given vprintf-like input.
-std::string StringPrintV(const char* format, va_list ap)
-    PRINTF_FORMAT(1, 0) WARN_UNUSED_RESULT;
+[[nodiscard]] std::string StringPrintV(const char* format, va_list ap)
+    PRINTF_FORMAT(1, 0);
 
 // Store result into a supplied string and return it.
 const std::string& SStringPrintf(std::string* dst,
diff --git a/src/base/timer/elapsed_timer.h b/src/base/timer/elapsed_timer.h
index fbbc83d..4c26b6d 100644
--- a/src/base/timer/elapsed_timer.h
+++ b/src/base/timer/elapsed_timer.h
@@ -5,7 +5,6 @@
 #ifndef BASE_TIMER_ELAPSED_TIMER_H_
 #define BASE_TIMER_ELAPSED_TIMER_H_
 
-#include "base/macros.h"
 #include "util/ticks.h"
 
 namespace base {
@@ -24,7 +23,8 @@
  private:
   Ticks begin_;
 
-  DISALLOW_COPY_AND_ASSIGN(ElapsedTimer);
+  ElapsedTimer(const ElapsedTimer&) = delete;
+  ElapsedTimer& operator=(const ElapsedTimer&) = delete;
 };
 
 }  // namespace base
diff --git a/src/base/value_iterators.h b/src/base/value_iterators.h
index 4c814c5..6e5af70 100644
--- a/src/base/value_iterators.h
+++ b/src/base/value_iterators.h
@@ -10,7 +10,6 @@
 #include <utility>
 
 #include "base/containers/flat_map.h"
-#include "base/macros.h"
 
 namespace base {
 
diff --git a/src/base/values.cc b/src/base/values.cc
index 25b10e3..f3e9e66 100644
--- a/src/base/values.cc
+++ b/src/base/values.cc
@@ -654,7 +654,7 @@
     std::unique_ptr<Value> value) {
   DictionaryValue* out;
   if (value && value->GetAsDictionary(&out)) {
-    ignore_result(value.release());
+    [[maybe_unused]] auto released = value.release();
     return WrapUnique(out);
   }
   return nullptr;
@@ -1078,7 +1078,7 @@
 std::unique_ptr<ListValue> ListValue::From(std::unique_ptr<Value> value) {
   ListValue* out;
   if (value && value->GetAsList(&out)) {
-    ignore_result(value.release());
+    [[maybe_unused]] auto result = value.release();
     return WrapUnique(out);
   }
   return nullptr;
diff --git a/src/base/values.h b/src/base/values.h
index 0b1dde6..20a5271 100644
--- a/src/base/values.h
+++ b/src/base/values.h
@@ -33,7 +33,6 @@
 
 #include "base/containers/flat_map.h"
 #include "base/containers/span.h"
-#include "base/macros.h"
 #include "base/value_iterators.h"
 
 namespace base {
@@ -198,11 +197,11 @@
   // This overload is necessary to avoid ambiguity for const char* arguments.
   Value* SetKey(const char* key, Value value);
 
-  // This attempts to remove the value associated with |key|. In case of failure,
-  // e.g. the key does not exist, |false| is returned and the underlying
-  // dictionary is not changed. In case of success, |key| is deleted from the
-  // dictionary and the method returns |true|.
-  // Note: This fatally asserts if type() is not Type::DICTIONARY.
+  // This attempts to remove the value associated with |key|. In case of
+  // failure, e.g. the key does not exist, |false| is returned and the
+  // underlying dictionary is not changed. In case of success, |key| is deleted
+  // from the dictionary and the method returns |true|. Note: This fatally
+  // asserts if type() is not Type::DICTIONARY.
   //
   // Example:
   //   bool success = RemoveKey("foo");
@@ -365,7 +364,8 @@
   void InternalMoveConstructFrom(Value&& that);
   void InternalCleanup();
 
-  DISALLOW_COPY_AND_ASSIGN(Value);
+  Value(const Value&) = delete;
+  Value& operator=(const Value&) = delete;
 };
 
 // DictionaryValue provides a key-value dictionary with (optional) "path"
diff --git a/src/base/win/registry.cc b/src/base/win/registry.cc
index 5acfda7..90aa89e 100644
--- a/src/base/win/registry.cc
+++ b/src/base/win/registry.cc
@@ -11,7 +11,6 @@
 #include <iterator>
 
 #include "base/logging.h"
-#include "base/macros.h"
 #include "base/strings/string_util.h"
 #include "base/win/win_util.h"
 
diff --git a/src/base/win/registry.h b/src/base/win/registry.h
index 8e5de46..6457d34 100644
--- a/src/base/win/registry.h
+++ b/src/base/win/registry.h
@@ -6,11 +6,10 @@
 #define BASE_WIN_REGISTRY_H_
 
 #include <stdint.h>
+#include <windows.h>
 #include <string>
 #include <vector>
-#include <windows.h>
 
-#include "base/macros.h"
 #include "base/win/scoped_handle.h"
 
 namespace base {
@@ -140,7 +139,8 @@
   HKEY key_;  // The registry key being iterated.
   REGSAM wow64access_;
 
-  DISALLOW_COPY_AND_ASSIGN(RegKey);
+  RegKey(const RegKey&) = delete;
+  RegKey& operator=(const RegKey&) = delete;
 };
 
 // Iterates the entries found in a particular folder on the registry.
@@ -196,7 +196,8 @@
   DWORD value_size_;
   DWORD type_;
 
-  DISALLOW_COPY_AND_ASSIGN(RegistryValueIterator);
+  RegistryValueIterator(const RegistryValueIterator&) = delete;
+  RegistryValueIterator& operator=(const RegistryValueIterator&) = delete;
 };
 
 class RegistryKeyIterator {
@@ -243,7 +244,8 @@
 
   char16_t name_[MAX_PATH];
 
-  DISALLOW_COPY_AND_ASSIGN(RegistryKeyIterator);
+  RegistryKeyIterator(const RegistryKeyIterator&) = delete;
+  RegistryKeyIterator& operator=(const RegistryKeyIterator&) = delete;
 };
 
 }  // namespace win
diff --git a/src/base/win/scoped_handle.h b/src/base/win/scoped_handle.h
index 4573af3..ab46375 100644
--- a/src/base/win/scoped_handle.h
+++ b/src/base/win/scoped_handle.h
@@ -9,7 +9,6 @@
 
 #include "base/gtest_prod_util.h"
 #include "base/logging.h"
-#include "base/macros.h"
 
 // TODO(rvargas): remove this with the rest of the verifier.
 #if defined(COMPILER_MSVC)
@@ -93,7 +92,8 @@
   FRIEND_TEST_ALL_PREFIXES(ScopedHandleTest, ActiveVerifierUntrackedHandle);
   Handle handle_;
 
-  DISALLOW_COPY_AND_ASSIGN(GenericScopedHandle);
+  GenericScopedHandle(const GenericScopedHandle&) = delete;
+  GenericScopedHandle& operator=(const GenericScopedHandle&) = delete;
 };
 
 #undef BASE_WIN_GET_CALLER
@@ -115,7 +115,9 @@
   static HANDLE NullHandle() { return NULL; }
 
  private:
-  DISALLOW_IMPLICIT_CONSTRUCTORS(HandleTraits);
+  HandleTraits() = delete;
+  HandleTraits(const HandleTraits&) = delete;
+  HandleTraits& operator=(const HandleTraits&) = delete;
 };
 
 // Do-nothing verifier.
@@ -133,7 +135,9 @@
                            const void* pc2) {}
 
  private:
-  DISALLOW_IMPLICIT_CONSTRUCTORS(DummyVerifierTraits);
+  DummyVerifierTraits() = delete;
+  DummyVerifierTraits(const DummyVerifierTraits&) = delete;
+  DummyVerifierTraits& operator=(const DummyVerifierTraits&) = delete;
 };
 
 // Performs actual run-time tracking.
@@ -151,7 +155,9 @@
                            const void* pc2);
 
  private:
-  DISALLOW_IMPLICIT_CONSTRUCTORS(VerifierTraits);
+  VerifierTraits() = delete;
+  VerifierTraits(const VerifierTraits&) = delete;
+  VerifierTraits& operator=(const VerifierTraits&) = delete;
 };
 
 typedef GenericScopedHandle<HandleTraits, VerifierTraits> ScopedHandle;
diff --git a/src/base/win/scoped_process_information.h b/src/base/win/scoped_process_information.h
index 557555d..23d28e7 100644
--- a/src/base/win/scoped_process_information.h
+++ b/src/base/win/scoped_process_information.h
@@ -7,7 +7,6 @@
 
 #include <windows.h>
 
-#include "base/macros.h"
 #include "base/win/scoped_handle.h"
 
 namespace base {
@@ -65,7 +64,8 @@
   DWORD process_id_;
   DWORD thread_id_;
 
-  DISALLOW_COPY_AND_ASSIGN(ScopedProcessInformation);
+  ScopedProcessInformation(const ScopedProcessInformation&) = delete;
+  ScopedProcessInformation& operator=(const ScopedProcessInformation&) = delete;
 };
 
 }  // namespace win
diff --git a/src/gn/action_target_generator.h b/src/gn/action_target_generator.h
index 5d7f88c..9073cd7 100644
--- a/src/gn/action_target_generator.h
+++ b/src/gn/action_target_generator.h
@@ -5,7 +5,6 @@
 #ifndef TOOLS_GN_ACTION_TARGET_GENERATOR_H_
 #define TOOLS_GN_ACTION_TARGET_GENERATOR_H_
 
-#include "base/macros.h"
 #include "gn/target.h"
 #include "gn/target_generator.h"
 
@@ -35,7 +34,8 @@
 
   Target::OutputType output_type_;
 
-  DISALLOW_COPY_AND_ASSIGN(ActionTargetGenerator);
+  ActionTargetGenerator(const ActionTargetGenerator&) = delete;
+  ActionTargetGenerator& operator=(const ActionTargetGenerator&) = delete;
 };
 
 #endif  // TOOLS_GN_ACTION_TARGET_GENERATOR_H_
diff --git a/src/gn/action_values.h b/src/gn/action_values.h
index af6ab12..30436b7 100644
--- a/src/gn/action_values.h
+++ b/src/gn/action_values.h
@@ -8,7 +8,6 @@
 #include <string>
 #include <vector>
 
-#include "base/macros.h"
 #include "gn/label_ptr.h"
 #include "gn/source_file.h"
 #include "gn/substitution_list.h"
@@ -64,7 +63,8 @@
   SubstitutionList rsp_file_contents_;
   LabelPtrPair<Pool> pool_;
 
-  DISALLOW_COPY_AND_ASSIGN(ActionValues);
+  ActionValues(const ActionValues&) = delete;
+  ActionValues& operator=(const ActionValues&) = delete;
 };
 
 #endif  // TOOLS_GN_ACTION_VALUES_H_
diff --git a/src/gn/args.h b/src/gn/args.h
index 24e8308..2914c59 100644
--- a/src/gn/args.h
+++ b/src/gn/args.h
@@ -11,7 +11,6 @@
 #include <string_view>
 #include <unordered_map>
 
-#include "base/macros.h"
 #include "gn/scope.h"
 
 class Err;
@@ -142,7 +141,7 @@
 
   SourceFileSet build_args_dependency_files_;
 
-  DISALLOW_ASSIGN(Args);
+  Args& operator=(const Args&) = delete;
 };
 
 #endif  // TOOLS_GN_ARGS_H_
diff --git a/src/gn/binary_target_generator.h b/src/gn/binary_target_generator.h
index 27dcb7a..2c8b769 100644
--- a/src/gn/binary_target_generator.h
+++ b/src/gn/binary_target_generator.h
@@ -5,7 +5,6 @@
 #ifndef TOOLS_GN_BINARY_TARGET_GENERATOR_H_
 #define TOOLS_GN_BINARY_TARGET_GENERATOR_H_
 
-#include "base/macros.h"
 #include "gn/target.h"
 #include "gn/target_generator.h"
 
@@ -35,7 +34,8 @@
 
   Target::OutputType output_type_;
 
-  DISALLOW_COPY_AND_ASSIGN(BinaryTargetGenerator);
+  BinaryTargetGenerator(const BinaryTargetGenerator&) = delete;
+  BinaryTargetGenerator& operator=(const BinaryTargetGenerator&) = delete;
 };
 
 #endif  // TOOLS_GN_BINARY_TARGET_GENERATOR_H_
diff --git a/src/gn/build_settings.h b/src/gn/build_settings.h
index f8dc502..9a6c514 100644
--- a/src/gn/build_settings.h
+++ b/src/gn/build_settings.h
@@ -12,7 +12,6 @@
 #include <utility>
 
 #include "base/files/file_path.h"
-#include "base/macros.h"
 #include "gn/args.h"
 #include "gn/label.h"
 #include "gn/scope.h"
@@ -146,7 +145,7 @@
 
   std::unique_ptr<SourceFileSet> exec_script_whitelist_;
 
-  DISALLOW_ASSIGN(BuildSettings);
+  BuildSettings& operator=(const BuildSettings&) = delete;
 };
 
 #endif  // TOOLS_GN_BUILD_SETTINGS_H_
diff --git a/src/gn/builder.h b/src/gn/builder.h
index 9f86826..8f328fa 100644
--- a/src/gn/builder.h
+++ b/src/gn/builder.h
@@ -9,7 +9,6 @@
 #include <map>
 #include <memory>
 
-#include "base/macros.h"
 #include "gn/builder_record.h"
 #include "gn/label.h"
 #include "gn/label_ptr.h"
@@ -140,7 +139,8 @@
 
   ResolvedGeneratedCallback resolved_and_generated_callback_;
 
-  DISALLOW_COPY_AND_ASSIGN(Builder);
+  Builder(const Builder&) = delete;
+  Builder& operator=(const Builder&) = delete;
 };
 
 #endif  // TOOLS_GN_BUILDER_H_
diff --git a/src/gn/builder_record.h b/src/gn/builder_record.h
index 1ccb19a..989c239 100644
--- a/src/gn/builder_record.h
+++ b/src/gn/builder_record.h
@@ -9,7 +9,6 @@
 #include <set>
 #include <utility>
 
-#include "base/macros.h"
 #include "gn/item.h"
 #include "gn/location.h"
 
@@ -104,7 +103,8 @@
   BuilderRecordSet unresolved_deps_;
   BuilderRecordSet waiting_on_resolution_;
 
-  DISALLOW_COPY_AND_ASSIGN(BuilderRecord);
+  BuilderRecord(const BuilderRecord&) = delete;
+  BuilderRecord& operator=(const BuilderRecord&) = delete;
 };
 
 #endif  // TOOLS_GN_BUILDER_RECORD_H_
diff --git a/src/gn/bundle_data.h b/src/gn/bundle_data.h
index 3c4feb1..527e078 100644
--- a/src/gn/bundle_data.h
+++ b/src/gn/bundle_data.h
@@ -154,9 +154,7 @@
     return bundle_deps_filter_;
   }
 
-  SubstitutionList& xcasset_compiler_flags() {
-    return xcasset_compiler_flags_;
-  }
+  SubstitutionList& xcasset_compiler_flags() { return xcasset_compiler_flags_; }
   const SubstitutionList& xcasset_compiler_flags() const {
     return xcasset_compiler_flags_;
   }
@@ -208,7 +206,8 @@
   SubstitutionList code_signing_args_;
   SubstitutionList xcasset_compiler_flags_;
 
-  DISALLOW_COPY_AND_ASSIGN(BundleData);
+  BundleData(const BundleData&) = delete;
+  BundleData& operator=(const BundleData&) = delete;
 };
 
 #endif  // TOOLS_GN_BUNDLE_DATA_H_
diff --git a/src/gn/bundle_data_target_generator.h b/src/gn/bundle_data_target_generator.h
index 05ea820..f5b60f1 100644
--- a/src/gn/bundle_data_target_generator.h
+++ b/src/gn/bundle_data_target_generator.h
@@ -5,7 +5,6 @@
 #ifndef TOOLS_GN_BUNDLE_DATA_TARGET_GENERATOR_H_
 #define TOOLS_GN_BUNDLE_DATA_TARGET_GENERATOR_H_
 
-#include "base/macros.h"
 #include "gn/target_generator.h"
 
 // Populates a Target with the values from a bundle_data rule.
@@ -26,7 +25,9 @@
   bool EnsureSubstitutionIsInBundleDir(const SubstitutionPattern& pattern,
                                        const Value& original_value);
 
-  DISALLOW_COPY_AND_ASSIGN(BundleDataTargetGenerator);
+  BundleDataTargetGenerator(const BundleDataTargetGenerator&) = delete;
+  BundleDataTargetGenerator& operator=(const BundleDataTargetGenerator&) =
+      delete;
 };
 
 #endif  // TOOLS_GN_BUNDLE_DATA_TARGET_GENERATOR_H_
diff --git a/src/gn/c_include_iterator.cc b/src/gn/c_include_iterator.cc
index 9fcc6be..faf475d 100644
--- a/src/gn/c_include_iterator.cc
+++ b/src/gn/c_include_iterator.cc
@@ -7,7 +7,6 @@
 #include <iterator>
 
 #include "base/logging.h"
-#include "base/macros.h"
 #include "base/strings/string_util.h"
 #include "gn/input_file.h"
 #include "gn/location.h"
diff --git a/src/gn/c_include_iterator.h b/src/gn/c_include_iterator.h
index 325d57e..77b9bbc 100644
--- a/src/gn/c_include_iterator.h
+++ b/src/gn/c_include_iterator.h
@@ -9,7 +9,6 @@
 
 #include <string_view>
 
-#include "base/macros.h"
 #include "gn/location.h"
 
 class InputFile;
@@ -55,7 +54,8 @@
   // beginning of the file) with some exceptions.
   int lines_since_last_include_ = 0;
 
-  DISALLOW_COPY_AND_ASSIGN(CIncludeIterator);
+  CIncludeIterator(const CIncludeIterator&) = delete;
+  CIncludeIterator& operator=(const CIncludeIterator&) = delete;
 };
 
 #endif  // TOOLS_GN_C_INCLUDE_ITERATOR_H_
diff --git a/src/gn/c_tool.h b/src/gn/c_tool.h
index fe32e53..c1b5883 100644
--- a/src/gn/c_tool.h
+++ b/src/gn/c_tool.h
@@ -8,7 +8,6 @@
 #include <string>
 
 #include "base/logging.h"
-#include "base/macros.h"
 #include "gn/label.h"
 #include "gn/label_ptr.h"
 #include "gn/scope.h"
@@ -120,7 +119,8 @@
   SubstitutionPattern link_output_;
   SubstitutionPattern depend_output_;
 
-  DISALLOW_COPY_AND_ASSIGN(CTool);
+  CTool(const CTool&) = delete;
+  CTool& operator=(const CTool&) = delete;
 };
 
 #endif  // TOOLS_GN_C_TOOL_H_
diff --git a/src/gn/command_format.cc b/src/gn/command_format.cc
index e94fb4f..a3fda21 100644
--- a/src/gn/command_format.cc
+++ b/src/gn/command_format.cc
@@ -12,7 +12,6 @@
 #include "base/files/file_util.h"
 #include "base/json/json_reader.h"
 #include "base/json/json_writer.h"
-#include "base/macros.h"
 #include "base/strings/string_split.h"
 #include "base/strings/string_util.h"
 #include "gn/commands.h"
@@ -260,7 +259,8 @@
   // Gives the precedence for operators in a BinaryOpNode.
   std::map<std::string_view, Precedence> precedence_;
 
-  DISALLOW_COPY_AND_ASSIGN(Printer);
+  Printer(const Printer&) = delete;
+  Printer& operator=(const Printer&) = delete;
 };
 
 Printer::Printer() : penalty_depth_(0) {
diff --git a/src/gn/config.h b/src/gn/config.h
index cb208d1..442472e 100644
--- a/src/gn/config.h
+++ b/src/gn/config.h
@@ -6,7 +6,6 @@
 #define TOOLS_GN_CONFIG_H_
 
 #include "base/logging.h"
-#include "base/macros.h"
 #include "gn/config_values.h"
 #include "gn/item.h"
 #include "gn/label_ptr.h"
@@ -63,7 +62,8 @@
 
   UniqueVector<LabelConfigPair> configs_;
 
-  DISALLOW_COPY_AND_ASSIGN(Config);
+  Config(const Config&) = delete;
+  Config& operator=(const Config&) = delete;
 };
 
 #endif  // TOOLS_GN_CONFIG_H_
diff --git a/src/gn/config_values.h b/src/gn/config_values.h
index 6361e78..4a86562 100644
--- a/src/gn/config_values.h
+++ b/src/gn/config_values.h
@@ -8,7 +8,6 @@
 #include <string>
 #include <vector>
 
-#include "base/macros.h"
 #include "gn/lib_file.h"
 #include "gn/source_dir.h"
 #include "gn/source_file.h"
diff --git a/src/gn/config_values_generator.h b/src/gn/config_values_generator.h
index b7b008c..fd508d4 100644
--- a/src/gn/config_values_generator.h
+++ b/src/gn/config_values_generator.h
@@ -5,7 +5,6 @@
 #ifndef TOOLS_GN_CONFIG_VALUES_GENERATOR_H_
 #define TOOLS_GN_CONFIG_VALUES_GENERATOR_H_
 
-#include "base/macros.h"
 #include "gn/source_dir.h"
 
 class ConfigValues;
@@ -33,7 +32,8 @@
   const SourceDir input_dir_;
   Err* err_;
 
-  DISALLOW_COPY_AND_ASSIGN(ConfigValuesGenerator);
+  ConfigValuesGenerator(const ConfigValuesGenerator&) = delete;
+  ConfigValuesGenerator& operator=(const ConfigValuesGenerator&) = delete;
 };
 
 // For using in documentation for functions which use this.
diff --git a/src/gn/copy_target_generator.h b/src/gn/copy_target_generator.h
index bec05e3..c3098f5 100644
--- a/src/gn/copy_target_generator.h
+++ b/src/gn/copy_target_generator.h
@@ -5,7 +5,6 @@
 #ifndef TOOLS_GN_COPY_TARGET_GENERATOR_H_
 #define TOOLS_GN_COPY_TARGET_GENERATOR_H_
 
-#include "base/macros.h"
 #include "gn/target_generator.h"
 
 // Populates a Target with the values from a copy rule.
@@ -21,7 +20,8 @@
   void DoRun() override;
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(CopyTargetGenerator);
+  CopyTargetGenerator(const CopyTargetGenerator&) = delete;
+  CopyTargetGenerator& operator=(const CopyTargetGenerator&) = delete;
 };
 
 #endif  // TOOLS_GN_COPY_TARGET_GENERATOR_H_
diff --git a/src/gn/create_bundle_target_generator.h b/src/gn/create_bundle_target_generator.h
index 6a0971a..cb18ebf 100644
--- a/src/gn/create_bundle_target_generator.h
+++ b/src/gn/create_bundle_target_generator.h
@@ -7,7 +7,6 @@
 
 #include <string_view>
 
-#include "base/macros.h"
 #include "gn/target_generator.h"
 
 class SourceDir;
@@ -42,7 +41,9 @@
   bool FillBundleDepsFilter();
   bool FillXcassetCompilerFlags();
 
-  DISALLOW_COPY_AND_ASSIGN(CreateBundleTargetGenerator);
+  CreateBundleTargetGenerator(const CreateBundleTargetGenerator&) = delete;
+  CreateBundleTargetGenerator& operator=(const CreateBundleTargetGenerator&) =
+      delete;
 };
 
 #endif  // TOOLS_GN_CREATE_BUNDLE_TARGET_GENERATOR_H_
diff --git a/src/gn/eclipse_writer.h b/src/gn/eclipse_writer.h
index e15254f..6b71a51 100644
--- a/src/gn/eclipse_writer.h
+++ b/src/gn/eclipse_writer.h
@@ -11,8 +11,6 @@
 #include <string>
 #include <vector>
 
-#include "base/macros.h"
-
 class BuildSettings;
 class Builder;
 class Err;
@@ -61,7 +59,8 @@
   // The defines of all the targets which use the default toolchain.
   std::map<std::string, std::string> defines_;
 
-  DISALLOW_COPY_AND_ASSIGN(EclipseWriter);
+  EclipseWriter(const EclipseWriter&) = delete;
+  EclipseWriter& operator=(const EclipseWriter&) = delete;
 };
 
 #endif  // TOOLS_GN_ECLIPSE_WRITER_H_
diff --git a/src/gn/general_tool.h b/src/gn/general_tool.h
index eb16b2c..b45cd9a 100644
--- a/src/gn/general_tool.h
+++ b/src/gn/general_tool.h
@@ -8,7 +8,6 @@
 #include <string>
 
 #include "base/logging.h"
-#include "base/macros.h"
 #include "gn/label.h"
 #include "gn/label_ptr.h"
 #include "gn/substitution_list.h"
@@ -40,7 +39,8 @@
   const GeneralTool* AsGeneral() const override;
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(GeneralTool);
+  GeneralTool(const GeneralTool&) = delete;
+  GeneralTool& operator=(const GeneralTool&) = delete;
 };
 
 #endif  // TOOLS_GN_GENERAL_TOOL_H_
diff --git a/src/gn/generated_file_target_generator.h b/src/gn/generated_file_target_generator.h
index c10c600..c240023 100644
--- a/src/gn/generated_file_target_generator.h
+++ b/src/gn/generated_file_target_generator.h
@@ -7,7 +7,6 @@
 
 #include <string_view>
 
-#include "base/macros.h"
 #include "gn/target.h"
 #include "gn/target_generator.h"
 
@@ -45,7 +44,9 @@
 
   Target::OutputType output_type_;
 
-  DISALLOW_COPY_AND_ASSIGN(GeneratedFileTargetGenerator);
+  GeneratedFileTargetGenerator(const GeneratedFileTargetGenerator&) = delete;
+  GeneratedFileTargetGenerator& operator=(const GeneratedFileTargetGenerator&) =
+      delete;
 };
 
 #endif  // TOOLS_GN_GENERATED_FILE_TARGET_GENERATOR_H_
diff --git a/src/gn/group_target_generator.h b/src/gn/group_target_generator.h
index 9845929..badb8e0 100644
--- a/src/gn/group_target_generator.h
+++ b/src/gn/group_target_generator.h
@@ -5,7 +5,6 @@
 #ifndef TOOLS_GN_GROUP_TARGET_GENERATOR_H_
 #define TOOLS_GN_GROUP_TARGET_GENERATOR_H_
 
-#include "base/macros.h"
 #include "gn/target_generator.h"
 
 // Populates a Target with the values for a group rule.
@@ -21,7 +20,8 @@
   void DoRun() override;
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(GroupTargetGenerator);
+  GroupTargetGenerator(const GroupTargetGenerator&) = delete;
+  GroupTargetGenerator& operator=(const GroupTargetGenerator&) = delete;
 };
 
 #endif  // TOOLS_GN_GROUP_TARGET_GENERATOR_H_
diff --git a/src/gn/header_checker.h b/src/gn/header_checker.h
index 9e10652..d4d2f9f 100644
--- a/src/gn/header_checker.h
+++ b/src/gn/header_checker.h
@@ -15,7 +15,6 @@
 
 #include "base/atomic_ref_count.h"
 #include "base/gtest_prod_util.h"
-#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "gn/c_include_iterator.h"
 #include "gn/err.h"
@@ -202,7 +201,8 @@
   // Signaled when |task_count_| becomes zero.
   std::condition_variable task_count_cv_;
 
-  DISALLOW_COPY_AND_ASSIGN(HeaderChecker);
+  HeaderChecker(const HeaderChecker&) = delete;
+  HeaderChecker& operator=(const HeaderChecker&) = delete;
 };
 
 #endif  // TOOLS_GN_HEADER_CHECKER_H_
diff --git a/src/gn/import_manager.h b/src/gn/import_manager.h
index e033183..60a1f48 100644
--- a/src/gn/import_manager.h
+++ b/src/gn/import_manager.h
@@ -12,8 +12,6 @@
 #include <unordered_set>
 #include <vector>
 
-#include "base/macros.h"
-
 class Err;
 class ParseNode;
 class Scope;
@@ -48,7 +46,8 @@
 
   std::unordered_set<std::string> imports_in_progress_;
 
-  DISALLOW_COPY_AND_ASSIGN(ImportManager);
+  ImportManager(const ImportManager&) = delete;
+  ImportManager& operator=(const ImportManager&) = delete;
 };
 
 #endif  // TOOLS_GN_IMPORT_MANAGER_H_
diff --git a/src/gn/inherited_libraries.h b/src/gn/inherited_libraries.h
index f56c648..758e3c9 100644
--- a/src/gn/inherited_libraries.h
+++ b/src/gn/inherited_libraries.h
@@ -11,8 +11,6 @@
 #include <utility>
 #include <vector>
 
-#include "base/macros.h"
-
 class Target;
 
 // Represents an ordered uniquified set of all shared/static libraries for
@@ -65,7 +63,8 @@
   using LibraryMap = std::map<const Target*, Node>;
   LibraryMap map_;
 
-  DISALLOW_COPY_AND_ASSIGN(InheritedLibraries);
+  InheritedLibraries(const InheritedLibraries&) = delete;
+  InheritedLibraries& operator=(const InheritedLibraries&) = delete;
 };
 
 #endif  // TOOLS_GN_INHERITED_LIBRARIES_H_
diff --git a/src/gn/input_conversion.cc b/src/gn/input_conversion.cc
index c09ac91..596eba3 100644
--- a/src/gn/input_conversion.cc
+++ b/src/gn/input_conversion.cc
@@ -9,7 +9,6 @@
 #include <utility>
 
 #include "base/json/json_reader.h"
-#include "base/macros.h"
 #include "base/strings/string_split.h"
 #include "base/strings/string_util.h"
 #include "base/values.h"
diff --git a/src/gn/input_file.h b/src/gn/input_file.h
index efb15bd..cf9e7eb 100644
--- a/src/gn/input_file.h
+++ b/src/gn/input_file.h
@@ -9,7 +9,6 @@
 
 #include "base/files/file_path.h"
 #include "base/logging.h"
-#include "base/macros.h"
 #include "gn/source_dir.h"
 #include "gn/source_file.h"
 
@@ -59,7 +58,8 @@
   bool contents_loaded_ = false;
   std::string contents_;
 
-  DISALLOW_COPY_AND_ASSIGN(InputFile);
+  InputFile(const InputFile&) = delete;
+  InputFile& operator=(const InputFile&) = delete;
 };
 
 #endif  // TOOLS_GN_INPUT_FILE_H_
diff --git a/src/gn/input_file_manager.h b/src/gn/input_file_manager.h
index d495bee..5d82eab 100644
--- a/src/gn/input_file_manager.h
+++ b/src/gn/input_file_manager.h
@@ -13,7 +13,6 @@
 #include <vector>
 
 #include "base/files/file_path.h"
-#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "gn/input_file.h"
 #include "gn/parse_tree.h"
@@ -169,7 +168,8 @@
   // Used by unit tests to mock out SyncLoadFile().
   SyncLoadFileCallback load_file_callback_;
 
-  DISALLOW_COPY_AND_ASSIGN(InputFileManager);
+  InputFileManager(const InputFileManager&) = delete;
+  InputFileManager& operator=(const InputFileManager&) = delete;
 };
 
 #endif  // TOOLS_GN_INPUT_FILE_MANAGER_H_
diff --git a/src/gn/label_pattern_unittest.cc b/src/gn/label_pattern_unittest.cc
index ad98401..54fbb2e 100644
--- a/src/gn/label_pattern_unittest.cc
+++ b/src/gn/label_pattern_unittest.cc
@@ -6,7 +6,6 @@
 
 #include <iterator>
 
-#include "base/macros.h"
 #include "gn/err.h"
 #include "gn/label_pattern.h"
 #include "gn/value.h"
diff --git a/src/gn/label_unittest.cc b/src/gn/label_unittest.cc
index 159bba8..3a03337 100644
--- a/src/gn/label_unittest.cc
+++ b/src/gn/label_unittest.cc
@@ -6,7 +6,6 @@
 
 #include <iterator>
 
-#include "base/macros.h"
 #include "gn/err.h"
 #include "gn/label.h"
 #include "gn/value.h"
diff --git a/src/gn/metadata.h b/src/gn/metadata.h
index c0a0042..6635f21 100644
--- a/src/gn/metadata.h
+++ b/src/gn/metadata.h
@@ -84,7 +84,8 @@
                                           const Value& value,
                                           Err* err) const;
 
-  DISALLOW_COPY_AND_ASSIGN(Metadata);
+  Metadata(const Metadata&) = delete;
+  Metadata& operator=(const Metadata&) = delete;
 };
 
 #endif  // TOOLS_GN_METADATA_H_
diff --git a/src/gn/ninja_action_target_writer.h b/src/gn/ninja_action_target_writer.h
index eb94284..ef91f4e 100644
--- a/src/gn/ninja_action_target_writer.h
+++ b/src/gn/ninja_action_target_writer.h
@@ -8,7 +8,6 @@
 #include <vector>
 
 #include "base/gtest_prod_util.h"
-#include "base/macros.h"
 #include "gn/ninja_target_writer.h"
 
 class OutputFile;
@@ -56,7 +55,8 @@
   // computing intermediate strings.
   PathOutput path_output_no_escaping_;
 
-  DISALLOW_COPY_AND_ASSIGN(NinjaActionTargetWriter);
+  NinjaActionTargetWriter(const NinjaActionTargetWriter&) = delete;
+  NinjaActionTargetWriter& operator=(const NinjaActionTargetWriter&) = delete;
 };
 
 #endif  // TOOLS_GN_NINJA_ACTION_TARGET_WRITER_H_
diff --git a/src/gn/ninja_binary_target_writer.h b/src/gn/ninja_binary_target_writer.h
index 66e0b6a..e53e28e 100644
--- a/src/gn/ninja_binary_target_writer.h
+++ b/src/gn/ninja_binary_target_writer.h
@@ -5,7 +5,6 @@
 #ifndef TOOLS_GN_NINJA_BINARY_TARGET_WRITER_H_
 #define TOOLS_GN_NINJA_BINARY_TARGET_WRITER_H_
 
-#include "base/macros.h"
 #include "gn/c_tool.h"
 #include "gn/config_values.h"
 #include "gn/ninja_target_writer.h"
@@ -69,10 +68,8 @@
   void WriteLinkerFlags(std::ostream& out,
                         const Tool* tool,
                         const SourceFile* optional_def_file);
-  void WriteCustomLinkerFlags(std::ostream& out,
-                        const Tool* tool);
-  void WriteLibrarySearchPath(std::ostream& out,
-                        const Tool* tool);
+  void WriteCustomLinkerFlags(std::ostream& out, const Tool* tool);
+  void WriteLibrarySearchPath(std::ostream& out, const Tool* tool);
   void WriteLibs(std::ostream& out, const Tool* tool);
   void WriteFrameworks(std::ostream& out, const Tool* tool);
   void WriteSwiftModules(std::ostream& out,
@@ -86,7 +83,8 @@
   std::string rule_prefix_;
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(NinjaBinaryTargetWriter);
+  NinjaBinaryTargetWriter(const NinjaBinaryTargetWriter&) = delete;
+  NinjaBinaryTargetWriter& operator=(const NinjaBinaryTargetWriter&) = delete;
 };
 
 #endif  // TOOLS_GN_NINJA_BINARY_TARGET_WRITER_H_
diff --git a/src/gn/ninja_build_writer.h b/src/gn/ninja_build_writer.h
index b5e9e6a..e77f740 100644
--- a/src/gn/ninja_build_writer.h
+++ b/src/gn/ninja_build_writer.h
@@ -11,7 +11,6 @@
 #include <unordered_map>
 #include <vector>
 
-#include "base/macros.h"
 #include "gn/path_output.h"
 
 class Builder;
@@ -23,7 +22,7 @@
 
 namespace base {
 class CommandLine;
-}  // base
+}  // namespace base
 
 // Generates the toplevel "build.ninja" file. This references the individual
 // toolchain files and lists all input .gn files as dependencies of the
@@ -70,7 +69,8 @@
   std::ostream& dep_out_;
   PathOutput path_output_;
 
-  DISALLOW_COPY_AND_ASSIGN(NinjaBuildWriter);
+  NinjaBuildWriter(const NinjaBuildWriter&) = delete;
+  NinjaBuildWriter& operator=(const NinjaBuildWriter&) = delete;
 };
 
 extern const char kNinjaRules_Help[];
diff --git a/src/gn/ninja_bundle_data_target_writer.h b/src/gn/ninja_bundle_data_target_writer.h
index 9b8986d..720c593 100644
--- a/src/gn/ninja_bundle_data_target_writer.h
+++ b/src/gn/ninja_bundle_data_target_writer.h
@@ -5,7 +5,6 @@
 #ifndef TOOLS_GN_NINJA_BUNDLE_DATA_TARGET_WRITER_H_
 #define TOOLS_GN_NINJA_BUNDLE_DATA_TARGET_WRITER_H_
 
-#include "base/macros.h"
 #include "gn/ninja_target_writer.h"
 
 // Writes a .ninja file for a bundle_data target type.
@@ -17,7 +16,9 @@
   void Run() override;
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(NinjaBundleDataTargetWriter);
+  NinjaBundleDataTargetWriter(const NinjaBundleDataTargetWriter&) = delete;
+  NinjaBundleDataTargetWriter& operator=(const NinjaBundleDataTargetWriter&) =
+      delete;
 };
 
 #endif  // TOOLS_GN_NINJA_BUNDLE_DATA_TARGET_WRITER_H_
diff --git a/src/gn/ninja_c_binary_target_writer.h b/src/gn/ninja_c_binary_target_writer.h
index da75178..ab42985 100644
--- a/src/gn/ninja_c_binary_target_writer.h
+++ b/src/gn/ninja_c_binary_target_writer.h
@@ -5,7 +5,6 @@
 #ifndef TOOLS_GN_NINJA_C_BINARY_TARGET_WRITER_H_
 #define TOOLS_GN_NINJA_C_BINARY_TARGET_WRITER_H_
 
-#include "base/macros.h"
 #include "gn/config_values.h"
 #include "gn/ninja_binary_target_writer.h"
 #include "gn/toolchain.h"
@@ -106,7 +105,8 @@
 
   const CTool* tool_;
 
-  DISALLOW_COPY_AND_ASSIGN(NinjaCBinaryTargetWriter);
+  NinjaCBinaryTargetWriter(const NinjaCBinaryTargetWriter&) = delete;
+  NinjaCBinaryTargetWriter& operator=(const NinjaCBinaryTargetWriter&) = delete;
 };
 
 #endif  // TOOLS_GN_NINJA_C_BINARY_TARGET_WRITER_H_
diff --git a/src/gn/ninja_copy_target_writer.h b/src/gn/ninja_copy_target_writer.h
index c4919c6..95d50b4 100644
--- a/src/gn/ninja_copy_target_writer.h
+++ b/src/gn/ninja_copy_target_writer.h
@@ -5,7 +5,6 @@
 #ifndef TOOLS_GN_NINJA_COPY_TARGET_WRITER_H_
 #define TOOLS_GN_NINJA_COPY_TARGET_WRITER_H_
 
-#include "base/macros.h"
 #include "gn/ninja_target_writer.h"
 
 // Writes a .ninja file for a copy target type.
@@ -21,7 +20,8 @@
   // name(s) into the given vector.
   void WriteCopyRules(std::vector<OutputFile>* output_files);
 
-  DISALLOW_COPY_AND_ASSIGN(NinjaCopyTargetWriter);
+  NinjaCopyTargetWriter(const NinjaCopyTargetWriter&) = delete;
+  NinjaCopyTargetWriter& operator=(const NinjaCopyTargetWriter&) = delete;
 };
 
 #endif  // TOOLS_GN_NINJA_COPY_TARGET_WRITER_H_
diff --git a/src/gn/ninja_create_bundle_target_writer.cc b/src/gn/ninja_create_bundle_target_writer.cc
index 9f000f3..d05f5f0 100644
--- a/src/gn/ninja_create_bundle_target_writer.cc
+++ b/src/gn/ninja_create_bundle_target_writer.cc
@@ -6,7 +6,6 @@
 
 #include <iterator>
 
-#include "base/macros.h"
 #include "base/strings/string_util.h"
 #include "gn/filesystem_utils.h"
 #include "gn/general_tool.h"
@@ -270,8 +269,8 @@
     args_escape_options.mode = ESCAPE_NINJA_COMMAND;
     for (const auto& flag : flags) {
       out_ << " ";
-      SubstitutionWriter::WriteWithNinjaVariables(
-          flag, args_escape_options, out_);
+      SubstitutionWriter::WriteWithNinjaVariables(flag, args_escape_options,
+                                                  out_);
     }
     out_ << std::endl;
   }
diff --git a/src/gn/ninja_create_bundle_target_writer.h b/src/gn/ninja_create_bundle_target_writer.h
index 6d4e224..34951fb 100644
--- a/src/gn/ninja_create_bundle_target_writer.h
+++ b/src/gn/ninja_create_bundle_target_writer.h
@@ -5,7 +5,6 @@
 #ifndef TOOLS_GN_NINJA_CREATE_BUNDLE_TARGET_WRITER_H_
 #define TOOLS_GN_NINJA_CREATE_BUNDLE_TARGET_WRITER_H_
 
-#include "base/macros.h"
 #include "gn/ninja_target_writer.h"
 
 class BundleFileRule;
@@ -65,7 +64,9 @@
       const std::vector<OutputFile>& order_only_deps,
       std::vector<OutputFile>* output_files);
 
-  DISALLOW_COPY_AND_ASSIGN(NinjaCreateBundleTargetWriter);
+  NinjaCreateBundleTargetWriter(const NinjaCreateBundleTargetWriter&) = delete;
+  NinjaCreateBundleTargetWriter& operator=(
+      const NinjaCreateBundleTargetWriter&) = delete;
 };
 
 #endif  // TOOLS_GN_NINJA_CREATE_BUNDLE_TARGET_WRITER_H_
diff --git a/src/gn/ninja_generated_file_target_writer.h b/src/gn/ninja_generated_file_target_writer.h
index 43231a6..3103388 100644
--- a/src/gn/ninja_generated_file_target_writer.h
+++ b/src/gn/ninja_generated_file_target_writer.h
@@ -5,7 +5,6 @@
 #ifndef TOOLS_GN_NINJA_GENERATED_FILE_TARGET_WRITER_H_
 #define TOOLS_GN_NINJA_GENERATED_FILE_TARGET_WRITER_H_
 
-#include "base/macros.h"
 #include "gn/ninja_target_writer.h"
 
 // Writes a .ninja file for a group target type.
@@ -19,7 +18,10 @@
  private:
   void GenerateFile();
 
-  DISALLOW_COPY_AND_ASSIGN(NinjaGeneratedFileTargetWriter);
+  NinjaGeneratedFileTargetWriter(const NinjaGeneratedFileTargetWriter&) =
+      delete;
+  NinjaGeneratedFileTargetWriter& operator=(
+      const NinjaGeneratedFileTargetWriter&) = delete;
 };
 
 #endif  // TOOLS_GN_NINJA_GENERATED_FILE_TARGET_WRITER_H_
diff --git a/src/gn/ninja_group_target_writer.h b/src/gn/ninja_group_target_writer.h
index 8abb20a..7a3f211 100644
--- a/src/gn/ninja_group_target_writer.h
+++ b/src/gn/ninja_group_target_writer.h
@@ -5,7 +5,6 @@
 #ifndef TOOLS_GN_NINJA_GROUP_TARGET_WRITER_H_
 #define TOOLS_GN_NINJA_GROUP_TARGET_WRITER_H_
 
-#include "base/macros.h"
 #include "gn/ninja_target_writer.h"
 
 // Writes a .ninja file for a group target type.
@@ -17,7 +16,8 @@
   void Run() override;
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(NinjaGroupTargetWriter);
+  NinjaGroupTargetWriter(const NinjaGroupTargetWriter&) = delete;
+  NinjaGroupTargetWriter& operator=(const NinjaGroupTargetWriter&) = delete;
 };
 
 #endif  // TOOLS_GN_NINJA_GROUP_TARGET_WRITER_H_
diff --git a/src/gn/ninja_rust_binary_target_writer.h b/src/gn/ninja_rust_binary_target_writer.h
index bd060ab..0319c86 100644
--- a/src/gn/ninja_rust_binary_target_writer.h
+++ b/src/gn/ninja_rust_binary_target_writer.h
@@ -5,7 +5,6 @@
 #ifndef TOOLS_GN_NINJA_RUST_BINARY_TARGET_WRITER_H_
 #define TOOLS_GN_NINJA_RUST_BINARY_TARGET_WRITER_H_
 
-#include "base/macros.h"
 #include "gn/ninja_binary_target_writer.h"
 #include "gn/rust_tool.h"
 
@@ -32,11 +31,14 @@
   // Write a ninja variable `sources` that contains all sources and input files.
   void WriteSourcesAndInputs();
   void WriteEdition();
-  void AppendSourcesAndInputsToImplicitDeps(UniqueVector<OutputFile>* deps) const;
+  void AppendSourcesAndInputsToImplicitDeps(
+      UniqueVector<OutputFile>* deps) const;
 
   const RustTool* tool_;
 
-  DISALLOW_COPY_AND_ASSIGN(NinjaRustBinaryTargetWriter);
+  NinjaRustBinaryTargetWriter(const NinjaRustBinaryTargetWriter&) = delete;
+  NinjaRustBinaryTargetWriter& operator=(const NinjaRustBinaryTargetWriter&) =
+      delete;
 };
 
 #endif  // TOOLS_GN_NINJA_RUST_BINARY_TARGET_WRITER_H_
diff --git a/src/gn/ninja_target_writer.h b/src/gn/ninja_target_writer.h
index efcf73d..7a339ab 100644
--- a/src/gn/ninja_target_writer.h
+++ b/src/gn/ninja_target_writer.h
@@ -7,7 +7,6 @@
 
 #include <iosfwd>
 
-#include "base/macros.h"
 #include "gn/path_output.h"
 #include "gn/substitution_type.h"
 
@@ -66,7 +65,8 @@
   void WriteCopyRules();
   void WriteEscapedSubstitution(const Substitution* type);
 
-  DISALLOW_COPY_AND_ASSIGN(NinjaTargetWriter);
+  NinjaTargetWriter(const NinjaTargetWriter&) = delete;
+  NinjaTargetWriter& operator=(const NinjaTargetWriter&) = delete;
 };
 
 #endif  // TOOLS_GN_NINJA_TARGET_WRITER_H_
diff --git a/src/gn/ninja_toolchain_writer.h b/src/gn/ninja_toolchain_writer.h
index 97ec481..cbc7c68 100644
--- a/src/gn/ninja_toolchain_writer.h
+++ b/src/gn/ninja_toolchain_writer.h
@@ -11,7 +11,6 @@
 #include <vector>
 
 #include "base/gtest_prod_util.h"
-#include "base/macros.h"
 #include "gn/ninja_writer.h"
 #include "gn/path_output.h"
 #include "gn/toolchain.h"
@@ -55,7 +54,8 @@
   std::ostream& out_;
   PathOutput path_output_;
 
-  DISALLOW_COPY_AND_ASSIGN(NinjaToolchainWriter);
+  NinjaToolchainWriter(const NinjaToolchainWriter&) = delete;
+  NinjaToolchainWriter& operator=(const NinjaToolchainWriter&) = delete;
 };
 
 #endif  // TOOLS_GN_NINJA_TOOLCHAIN_WRITER_H_
diff --git a/src/gn/ninja_writer.h b/src/gn/ninja_writer.h
index b9b93a4..cf648d2 100644
--- a/src/gn/ninja_writer.h
+++ b/src/gn/ninja_writer.h
@@ -10,8 +10,6 @@
 #include <string>
 #include <vector>
 
-#include "base/macros.h"
-
 class Builder;
 class BuildSettings;
 class Err;
@@ -43,7 +41,8 @@
 
   const Builder& builder_;
 
-  DISALLOW_COPY_AND_ASSIGN(NinjaWriter);
+  NinjaWriter(const NinjaWriter&) = delete;
+  NinjaWriter& operator=(const NinjaWriter&) = delete;
 };
 
 #endif  // TOOLS_GN_NINJA_WRITER_H_
diff --git a/src/gn/parse_node_value_adapter.h b/src/gn/parse_node_value_adapter.h
index e724bb6..ad1c7d8 100644
--- a/src/gn/parse_node_value_adapter.h
+++ b/src/gn/parse_node_value_adapter.h
@@ -5,7 +5,6 @@
 #ifndef TOOLS_GN_PARSE_NODE_VALUE_ADAPTER_H_
 #define TOOLS_GN_PARSE_NODE_VALUE_ADAPTER_H_
 
-#include "base/macros.h"
 #include "gn/value.h"
 
 class ParseNode;
@@ -49,7 +48,8 @@
   const Value* ref_;
   Value temporary_;
 
-  DISALLOW_COPY_AND_ASSIGN(ParseNodeValueAdapter);
+  ParseNodeValueAdapter(const ParseNodeValueAdapter&) = delete;
+  ParseNodeValueAdapter& operator=(const ParseNodeValueAdapter&) = delete;
 };
 
 #endif  // TOOLS_GN_PARSE_NODE_VALUE_ADAPTER_H_
diff --git a/src/gn/parse_tree.h b/src/gn/parse_tree.h
index 57d82e3..7922cd6 100644
--- a/src/gn/parse_tree.h
+++ b/src/gn/parse_tree.h
@@ -12,7 +12,6 @@
 #include <utility>
 #include <vector>
 
-#include "base/macros.h"
 #include "base/values.h"
 #include "gn/err.h"
 #include "gn/token.h"
@@ -69,7 +68,8 @@
   // following the expression.
   std::vector<Token> after_;
 
-  DISALLOW_COPY_AND_ASSIGN(Comments);
+  Comments(const Comments&) = delete;
+  Comments& operator=(const Comments&) = delete;
 };
 
 // ParseNode -------------------------------------------------------------------
@@ -125,7 +125,8 @@
 
   std::unique_ptr<Comments> comments_;
 
-  DISALLOW_COPY_AND_ASSIGN(ParseNode);
+  ParseNode(const ParseNode&) = delete;
+  ParseNode& operator=(const ParseNode&) = delete;
 };
 
 // AccessorNode ----------------------------------------------------------------
@@ -217,7 +218,8 @@
   std::unique_ptr<ParseNode> subscript_;
   std::unique_ptr<IdentifierNode> member_;
 
-  DISALLOW_COPY_AND_ASSIGN(AccessorNode);
+  AccessorNode(const AccessorNode&) = delete;
+  AccessorNode& operator=(const AccessorNode&) = delete;
 };
 
 // BinaryOpNode ----------------------------------------------------------------
@@ -254,7 +256,8 @@
   Token op_;
   std::unique_ptr<ParseNode> right_;
 
-  DISALLOW_COPY_AND_ASSIGN(BinaryOpNode);
+  BinaryOpNode(const BinaryOpNode&) = delete;
+  BinaryOpNode& operator=(const BinaryOpNode&) = delete;
 };
 
 // BlockNode -------------------------------------------------------------------
@@ -314,7 +317,8 @@
 
   std::vector<std::unique_ptr<ParseNode>> statements_;
 
-  DISALLOW_COPY_AND_ASSIGN(BlockNode);
+  BlockNode(const BlockNode&) = delete;
+  BlockNode& operator=(const BlockNode&) = delete;
 };
 
 // ConditionNode ---------------------------------------------------------------
@@ -358,7 +362,8 @@
   std::unique_ptr<BlockNode> if_true_;    // Always non-null.
   std::unique_ptr<ParseNode> if_false_;   // May be null.
 
-  DISALLOW_COPY_AND_ASSIGN(ConditionNode);
+  ConditionNode(const ConditionNode&) = delete;
+  ConditionNode& operator=(const ConditionNode&) = delete;
 };
 
 // FunctionCallNode ------------------------------------------------------------
@@ -396,7 +401,8 @@
   std::unique_ptr<ListNode> args_;
   std::unique_ptr<BlockNode> block_;  // May be null.
 
-  DISALLOW_COPY_AND_ASSIGN(FunctionCallNode);
+  FunctionCallNode(const FunctionCallNode&) = delete;
+  FunctionCallNode& operator=(const FunctionCallNode&) = delete;
 };
 
 // IdentifierNode --------------------------------------------------------------
@@ -426,7 +432,8 @@
  private:
   Token value_;
 
-  DISALLOW_COPY_AND_ASSIGN(IdentifierNode);
+  IdentifierNode(const IdentifierNode&) = delete;
+  IdentifierNode& operator=(const IdentifierNode&) = delete;
 };
 
 // ListNode --------------------------------------------------------------------
@@ -481,7 +488,8 @@
 
   std::vector<std::unique_ptr<const ParseNode>> contents_;
 
-  DISALLOW_COPY_AND_ASSIGN(ListNode);
+  ListNode(const ListNode&) = delete;
+  ListNode& operator=(const ListNode&) = delete;
 };
 
 // LiteralNode -----------------------------------------------------------------
@@ -511,7 +519,8 @@
  private:
   Token value_;
 
-  DISALLOW_COPY_AND_ASSIGN(LiteralNode);
+  LiteralNode(const LiteralNode&) = delete;
+  LiteralNode& operator=(const LiteralNode&) = delete;
 };
 
 // UnaryOpNode -----------------------------------------------------------------
@@ -544,7 +553,8 @@
   Token op_;
   std::unique_ptr<ParseNode> operand_;
 
-  DISALLOW_COPY_AND_ASSIGN(UnaryOpNode);
+  UnaryOpNode(const UnaryOpNode&) = delete;
+  UnaryOpNode& operator=(const UnaryOpNode&) = delete;
 };
 
 // BlockCommentNode ------------------------------------------------------------
@@ -577,7 +587,8 @@
  private:
   Token comment_;
 
-  DISALLOW_COPY_AND_ASSIGN(BlockCommentNode);
+  BlockCommentNode(const BlockCommentNode&) = delete;
+  BlockCommentNode& operator=(const BlockCommentNode&) = delete;
 };
 
 // EndNode ---------------------------------------------------------------------
@@ -608,7 +619,8 @@
  private:
   Token value_;
 
-  DISALLOW_COPY_AND_ASSIGN(EndNode);
+  EndNode(const EndNode&) = delete;
+  EndNode& operator=(const EndNode&) = delete;
 };
 
 #endif  // TOOLS_GN_PARSE_TREE_H_
diff --git a/src/gn/parser.h b/src/gn/parser.h
index 1f1cf1a..b323028 100644
--- a/src/gn/parser.h
+++ b/src/gn/parser.h
@@ -12,7 +12,6 @@
 #include <vector>
 
 #include "base/gtest_prod_util.h"
-#include "base/macros.h"
 #include "gn/err.h"
 #include "gn/parse_tree.h"
 
@@ -134,7 +133,8 @@
   FRIEND_TEST_ALL_PREFIXES(Parser, ParenExpression);
   FRIEND_TEST_ALL_PREFIXES(Parser, UnaryOp);
 
-  DISALLOW_COPY_AND_ASSIGN(Parser);
+  Parser(const Parser&) = delete;
+  Parser& operator=(const Parser&) = delete;
 };
 
 using PrefixFunc = std::unique_ptr<ParseNode> (Parser::*)(const Token& token);
diff --git a/src/gn/path_output.h b/src/gn/path_output.h
index e04d236..3b973d6 100644
--- a/src/gn/path_output.h
+++ b/src/gn/path_output.h
@@ -9,7 +9,6 @@
 #include <string>
 #include <string_view>
 
-#include "base/macros.h"
 #include "gn/escape.h"
 #include "gn/source_dir.h"
 #include "gn/unique_vector.h"
diff --git a/src/gn/pattern_unittest.cc b/src/gn/pattern_unittest.cc
index d796289..e7f4e4d 100644
--- a/src/gn/pattern_unittest.cc
+++ b/src/gn/pattern_unittest.cc
@@ -6,7 +6,6 @@
 
 #include <iterator>
 
-#include "base/macros.h"
 #include "gn/pattern.h"
 #include "util/test/test.h"
 
diff --git a/src/gn/pool.h b/src/gn/pool.h
index 3d6f8f3..e031136 100644
--- a/src/gn/pool.h
+++ b/src/gn/pool.h
@@ -7,7 +7,6 @@
 
 #include <string>
 
-#include "base/macros.h"
 #include "gn/item.h"
 
 // Represents a named pool in the dependency graph.
@@ -35,7 +34,8 @@
 
   int64_t depth_ = 0;
 
-  DISALLOW_COPY_AND_ASSIGN(Pool);
+  Pool(const Pool&) = delete;
+  Pool& operator=(const Pool&) = delete;
 };
 
 #endif  // TOOLS_GN_POOL_H_
diff --git a/src/gn/qt_creator_writer.h b/src/gn/qt_creator_writer.h
index c85a322..4571ec1 100644
--- a/src/gn/qt_creator_writer.h
+++ b/src/gn/qt_creator_writer.h
@@ -9,7 +9,6 @@
 #include <string>
 
 #include "base/files/file_path.h"
-#include "base/macros.h"
 #include "gn/err.h"
 #include "gn/target.h"
 
@@ -50,7 +49,8 @@
   std::set<std::string> defines_;
   Err err_;
 
-  DISALLOW_COPY_AND_ASSIGN(QtCreatorWriter);
+  QtCreatorWriter(const QtCreatorWriter&) = delete;
+  QtCreatorWriter& operator=(const QtCreatorWriter&) = delete;
 };
 
 #endif  // TOOLS_GN_QT_CREATOR_WRITER_H_
diff --git a/src/gn/rust_tool.h b/src/gn/rust_tool.h
index 836191c..7b4f7ac 100644
--- a/src/gn/rust_tool.h
+++ b/src/gn/rust_tool.h
@@ -9,7 +9,6 @@
 #include <string_view>
 
 #include "base/logging.h"
-#include "base/macros.h"
 #include "gn/label.h"
 #include "gn/label_ptr.h"
 #include "gn/rust_values.h"
@@ -54,7 +53,8 @@
                               SubstitutionList* field,
                               Err* err);
 
-  DISALLOW_COPY_AND_ASSIGN(RustTool);
+  RustTool(const RustTool&) = delete;
+  RustTool& operator=(const RustTool&) = delete;
 };
 
 #endif  // TOOLS_GN_RUST_TOOL_H_
diff --git a/src/gn/rust_values.h b/src/gn/rust_values.h
index ee97717..3185340 100644
--- a/src/gn/rust_values.h
+++ b/src/gn/rust_values.h
@@ -85,7 +85,8 @@
   std::map<Label, std::string> aliased_deps_;
   InheritedLibraries rust_libs_;
 
-  DISALLOW_COPY_AND_ASSIGN(RustValues);
+  RustValues(const RustValues&) = delete;
+  RustValues& operator=(const RustValues&) = delete;
 };
 
 #endif  // TOOLS_GN_RUST_TARGET_VALUES_H_
diff --git a/src/gn/rust_values_generator.h b/src/gn/rust_values_generator.h
index d902978..19ddca5 100644
--- a/src/gn/rust_values_generator.h
+++ b/src/gn/rust_values_generator.h
@@ -5,7 +5,6 @@
 #ifndef TOOLS_GN_RUST_VALUES_GENERATOR_H_
 #define TOOLS_GN_RUST_VALUES_GENERATOR_H_
 
-#include "base/macros.h"
 #include "gn/target.h"
 
 class FunctionCallNode;
@@ -33,7 +32,8 @@
   const FunctionCallNode* function_call_;
   Err* err_;
 
-  DISALLOW_COPY_AND_ASSIGN(RustValuesGenerator);
+  RustValuesGenerator(const RustValuesGenerator&) = delete;
+  RustValuesGenerator& operator=(const RustValuesGenerator&) = delete;
 };
 
 #endif  // TOOLS_GN_RUST_VALUES_GENERATOR_H_
diff --git a/src/gn/scheduler.h b/src/gn/scheduler.h
index 6fd25fd..cf29fe8 100644
--- a/src/gn/scheduler.h
+++ b/src/gn/scheduler.h
@@ -12,7 +12,6 @@
 
 #include "base/atomic_ref_count.h"
 #include "base/files/file_path.h"
-#include "base/macros.h"
 #include "gn/input_file_manager.h"
 #include "gn/label.h"
 #include "gn/source_file.h"
@@ -148,7 +147,8 @@
   std::multimap<SourceFile, const Target*> unknown_generated_inputs_;
   std::map<SourceFile, bool> generated_files_;
 
-  DISALLOW_COPY_AND_ASSIGN(Scheduler);
+  Scheduler(const Scheduler&) = delete;
+  Scheduler& operator=(const Scheduler&) = delete;
 };
 
 extern Scheduler* g_scheduler;
diff --git a/src/gn/scope.h b/src/gn/scope.h
index 341cefa..5412a41 100644
--- a/src/gn/scope.h
+++ b/src/gn/scope.h
@@ -13,7 +13,6 @@
 #include <utility>
 #include <vector>
 
-#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "gn/err.h"
 #include "gn/pattern.h"
@@ -379,7 +378,8 @@
 
   SourceFileSet build_dependency_files_;
 
-  DISALLOW_COPY_AND_ASSIGN(Scope);
+  Scope(const Scope&) = delete;
+  Scope& operator=(const Scope&) = delete;
 };
 
 #endif  // TOOLS_GN_SCOPE_H_
diff --git a/src/gn/scope_per_file_provider.h b/src/gn/scope_per_file_provider.h
index 3daa4fb..604e22f 100644
--- a/src/gn/scope_per_file_provider.h
+++ b/src/gn/scope_per_file_provider.h
@@ -8,7 +8,6 @@
 #include <memory>
 #include <string_view>
 
-#include "base/macros.h"
 #include "gn/scope.h"
 
 // ProgrammaticProvider for a scope to provide it with per-file built-in
@@ -48,7 +47,8 @@
   std::unique_ptr<Value> target_gen_dir_;
   std::unique_ptr<Value> target_out_dir_;
 
-  DISALLOW_COPY_AND_ASSIGN(ScopePerFileProvider);
+  ScopePerFileProvider(const ScopePerFileProvider&) = delete;
+  ScopePerFileProvider& operator=(const ScopePerFileProvider&) = delete;
 };
 
 #endif  // TOOLS_GN_SCOPE_PER_FILE_PROVIDER_H_
diff --git a/src/gn/settings.h b/src/gn/settings.h
index 755513a..9b83b60 100644
--- a/src/gn/settings.h
+++ b/src/gn/settings.h
@@ -6,7 +6,6 @@
 #define TOOLS_GN_SETTINGS_H_
 
 #include "base/files/file_path.h"
-#include "base/macros.h"
 #include "gn/import_manager.h"
 #include "gn/output_file.h"
 #include "gn/scope.h"
@@ -110,7 +109,8 @@
 
   bool greedy_target_generation_ = false;
 
-  DISALLOW_COPY_AND_ASSIGN(Settings);
+  Settings(const Settings&) = delete;
+  Settings& operator=(const Settings&) = delete;
 };
 
 #endif  // TOOLS_GN_SETTINGS_H_
diff --git a/src/gn/setup.h b/src/gn/setup.h
index 1c5d280..2809a7d 100644
--- a/src/gn/setup.h
+++ b/src/gn/setup.h
@@ -9,7 +9,6 @@
 #include <vector>
 
 #include "base/files/file_path.h"
-#include "base/macros.h"
 #include "gn/build_settings.h"
 #include "gn/builder.h"
 #include "gn/label_pattern.h"
@@ -59,9 +58,9 @@
 
   // Same as DoSetup() but used for tests to capture error output.
   bool DoSetupWithErr(const std::string& build_dir,
-               bool force_create,
-               const base::CommandLine& cmdline,
-               Err* err);
+                      bool force_create,
+                      const base::CommandLine& cmdline,
+                      Err* err);
 
   // Runs the load, returning true on success. On failure, prints the error
   // and returns false. This includes both RunPreMessageLoop() and
@@ -208,7 +207,8 @@
   std::vector<Token> args_tokens_;
   std::unique_ptr<ParseNode> args_root_;
 
-  DISALLOW_COPY_AND_ASSIGN(Setup);
+  Setup(const Setup&) = delete;
+  Setup& operator=(const Setup&) = delete;
 };
 
 #endif  // TOOLS_GN_SETUP_H_
diff --git a/src/gn/substitution_type.h b/src/gn/substitution_type.h
index 28f6c66..d359a30 100644
--- a/src/gn/substitution_type.h
+++ b/src/gn/substitution_type.h
@@ -8,7 +8,6 @@
 #include <vector>
 
 #include "base/containers/flat_set.h"
-#include "base/macros.h"
 
 class Err;
 class ParseNode;
@@ -18,7 +17,8 @@
 struct Substitution {
   const char* name;
   const char* ninja_name;
-  DISALLOW_COPY_AND_ASSIGN(Substitution);
+  Substitution(const Substitution&) = delete;
+  Substitution& operator=(const Substitution&) = delete;
 };
 
 using SubstitutionTypes = const std::vector<const Substitution*>;
diff --git a/src/gn/target.h b/src/gn/target.h
index 96f80f2..293d53c 100644
--- a/src/gn/target.h
+++ b/src/gn/target.h
@@ -11,7 +11,6 @@
 
 #include "base/gtest_prod_util.h"
 #include "base/logging.h"
-#include "base/macros.h"
 #include "gn/action_values.h"
 #include "gn/bundle_data.h"
 #include "gn/config_values.h"
@@ -509,7 +508,8 @@
   std::vector<std::string> data_keys_;
   std::vector<std::string> walk_keys_;
 
-  DISALLOW_COPY_AND_ASSIGN(Target);
+  Target(const Target&) = delete;
+  Target& operator=(const Target&) = delete;
 };
 
 extern const char kExecution_Help[];
diff --git a/src/gn/target_generator.h b/src/gn/target_generator.h
index 2053196..b34e43a 100644
--- a/src/gn/target_generator.h
+++ b/src/gn/target_generator.h
@@ -8,7 +8,6 @@
 #include <string>
 #include <vector>
 
-#include "base/macros.h"
 #include "gn/label_ptr.h"
 #include "gn/unique_vector.h"
 
@@ -80,7 +79,8 @@
                           UniqueVector<LabelConfigPair>* dest);
   bool FillGenericDeps(const char* var_name, LabelTargetVector* dest);
 
-  DISALLOW_COPY_AND_ASSIGN(TargetGenerator);
+  TargetGenerator(const TargetGenerator&) = delete;
+  TargetGenerator& operator=(const TargetGenerator&) = delete;
 };
 
 #endif  // TOOLS_GN_TARGET_GENERATOR_H_
diff --git a/src/gn/test_with_scheduler.h b/src/gn/test_with_scheduler.h
index 4ae3697..86e50ab 100644
--- a/src/gn/test_with_scheduler.h
+++ b/src/gn/test_with_scheduler.h
@@ -5,7 +5,6 @@
 #ifndef TOOLS_GN_TEST_WITH_SCHEDULER_H_
 #define TOOLS_GN_TEST_WITH_SCHEDULER_H_
 
-#include "base/macros.h"
 #include "gn/scheduler.h"
 #include "util/msg_loop.h"
 #include "util/test/test.h"
@@ -21,7 +20,8 @@
   MsgLoop run_loop_;
   Scheduler scheduler_;
 
-  DISALLOW_COPY_AND_ASSIGN(TestWithScheduler);
+  TestWithScheduler(const TestWithScheduler&) = delete;
+  TestWithScheduler& operator=(const TestWithScheduler&) = delete;
 };
 
 #endif  // TOOLS_GN_TEST_WITH_SCHEDULER_H_
diff --git a/src/gn/test_with_scope.h b/src/gn/test_with_scope.h
index 19854db..14881a8 100644
--- a/src/gn/test_with_scope.h
+++ b/src/gn/test_with_scope.h
@@ -8,7 +8,6 @@
 #include <string>
 #include <vector>
 
-#include "base/macros.h"
 #include "gn/build_settings.h"
 #include "gn/c_tool.h"
 #include "gn/err.h"
@@ -83,7 +82,8 @@
 
   std::string print_output_;
 
-  DISALLOW_COPY_AND_ASSIGN(TestWithScope);
+  TestWithScope(const TestWithScope&) = delete;
+  TestWithScope& operator=(const TestWithScope&) = delete;
 };
 
 // Helper class to treat some string input as a file.
@@ -111,7 +111,8 @@
 
   Err parse_err_;
 
-  DISALLOW_COPY_AND_ASSIGN(TestParseInput);
+  TestParseInput(const TestParseInput&) = delete;
+  TestParseInput& operator=(const TestParseInput&) = delete;
 };
 
 // Shortcut for creating targets for tests that take the test setup, a pretty-
diff --git a/src/gn/tokenizer.h b/src/gn/tokenizer.h
index 0af3a36..29d9f43 100644
--- a/src/gn/tokenizer.h
+++ b/src/gn/tokenizer.h
@@ -10,7 +10,6 @@
 #include <string_view>
 #include <vector>
 
-#include "base/macros.h"
 #include "gn/err.h"
 #include "gn/token.h"
 
@@ -102,7 +101,8 @@
   int line_number_ = 1;
   int column_number_ = 1;
 
-  DISALLOW_COPY_AND_ASSIGN(Tokenizer);
+  Tokenizer(const Tokenizer&) = delete;
+  Tokenizer& operator=(const Tokenizer&) = delete;
 };
 
 #endif  // TOOLS_GN_TOKENIZER_H_
diff --git a/src/gn/tool.h b/src/gn/tool.h
index e64935f..1e01af7 100644
--- a/src/gn/tool.h
+++ b/src/gn/tool.h
@@ -8,7 +8,6 @@
 #include <string>
 
 #include "base/logging.h"
-#include "base/macros.h"
 #include "gn/label.h"
 #include "gn/label_ptr.h"
 #include "gn/scope.h"
@@ -84,9 +83,7 @@
   }
 
   // Launcher for the command (e.g. goma)
-  const std::string& command_launcher() const {
-    return command_launcher_;
-  }
+  const std::string& command_launcher() const { return command_launcher_; }
   void set_command_launcher(std::string l) {
     DCHECK(!complete_);
     command_launcher_ = std::move(l);
@@ -298,7 +295,8 @@
 
   SubstitutionBits substitution_bits_;
 
-  DISALLOW_COPY_AND_ASSIGN(Tool);
+  Tool(const Tool&) = delete;
+  Tool& operator=(const Tool&) = delete;
 };
 
 #endif  // TOOLS_GN_TOOL_H_
diff --git a/src/gn/trace.cc b/src/gn/trace.cc
index 87c3cb6..c6eeed2 100644
--- a/src/gn/trace.cc
+++ b/src/gn/trace.cc
@@ -17,7 +17,6 @@
 #include "base/files/file_util.h"
 #include "base/json/string_escape.h"
 #include "base/logging.h"
-#include "base/macros.h"
 #include "base/strings/stringprintf.h"
 #include "gn/filesystem_utils.h"
 #include "gn/label.h"
@@ -44,7 +43,8 @@
 
   std::vector<TraceItem*> events_;
 
-  DISALLOW_COPY_AND_ASSIGN(TraceLog);
+  TraceLog(const TraceLog&) = delete;
+  TraceLog& operator=(const TraceLog&) = delete;
 };
 
 TraceLog* trace_log = nullptr;
diff --git a/src/gn/trace.h b/src/gn/trace.h
index f4f06df..b89e82a 100644
--- a/src/gn/trace.h
+++ b/src/gn/trace.h
@@ -8,7 +8,6 @@
 #include <string>
 #include <thread>
 
-#include "base/macros.h"
 #include "util/ticks.h"
 
 class Label;
diff --git a/src/gn/value.h b/src/gn/value.h
index bf01073..fd16c6b 100644
--- a/src/gn/value.h
+++ b/src/gn/value.h
@@ -11,7 +11,6 @@
 #include <memory>
 
 #include "base/logging.h"
-#include "base/macros.h"
 #include "gn/err.h"
 
 class ParseNode;
diff --git a/src/gn/visibility.h b/src/gn/visibility.h
index f0ebcf5..a000d82 100644
--- a/src/gn/visibility.h
+++ b/src/gn/visibility.h
@@ -9,7 +9,6 @@
 #include <string_view>
 #include <vector>
 
-#include "base/macros.h"
 #include "gn/label_pattern.h"
 #include "gn/source_dir.h"
 
@@ -66,7 +65,8 @@
  private:
   std::vector<LabelPattern> patterns_;
 
-  DISALLOW_COPY_AND_ASSIGN(Visibility);
+  Visibility(const Visibility&) = delete;
+  Visibility& operator=(const Visibility&) = delete;
 };
 
 #endif  // TOOLS_GN_VISIBILITY_H_
diff --git a/src/gn/visual_studio_writer.h b/src/gn/visual_studio_writer.h
index 8d1bc8e..428f18b 100644
--- a/src/gn/visual_studio_writer.h
+++ b/src/gn/visual_studio_writer.h
@@ -11,7 +11,6 @@
 #include <vector>
 
 #include "base/gtest_prod_util.h"
-#include "base/macros.h"
 #include "gn/path_output.h"
 
 namespace base {
@@ -166,7 +165,8 @@
   // Windows 10 SDK version string (e.g. 10.0.14393.0)
   std::string windows_sdk_version_;
 
-  DISALLOW_COPY_AND_ASSIGN(VisualStudioWriter);
+  VisualStudioWriter(const VisualStudioWriter&) = delete;
+  VisualStudioWriter& operator=(const VisualStudioWriter&) = delete;
 };
 
 #endif  // TOOLS_GN_VISUAL_STUDIO_WRITER_H_
diff --git a/src/gn/xcode_object.cc b/src/gn/xcode_object.cc
index 1d08f22..f3c5a54 100644
--- a/src/gn/xcode_object.cc
+++ b/src/gn/xcode_object.cc
@@ -11,7 +11,6 @@
 #include <utility>
 
 #include "base/logging.h"
-#include "base/macros.h"
 #include "base/strings/string_util.h"
 #include "gn/filesystem_utils.h"
 
diff --git a/src/gn/xcode_object.h b/src/gn/xcode_object.h
index 82dec5e..e29eb3d 100644
--- a/src/gn/xcode_object.h
+++ b/src/gn/xcode_object.h
@@ -11,8 +11,6 @@
 #include <string>
 #include <vector>
 
-#include "base/macros.h"
-
 // Helper classes to generate Xcode project files.
 //
 // This code is based on gyp xcodeproj_file.py generator. It does not support
@@ -76,7 +74,8 @@
   virtual void Visit(PBXObject* object) = 0;
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(PBXObjectVisitor);
+  PBXObjectVisitor(const PBXObjectVisitor&) = delete;
+  PBXObjectVisitor& operator=(const PBXObjectVisitor&) = delete;
 };
 
 // PBXObjectVisitorConst ------------------------------------------------------
@@ -88,7 +87,8 @@
   virtual void Visit(const PBXObject* object) = 0;
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(PBXObjectVisitorConst);
+  PBXObjectVisitorConst(const PBXObjectVisitorConst&) = delete;
+  PBXObjectVisitorConst& operator=(const PBXObjectVisitorConst&) = delete;
 };
 
 // PBXObject ------------------------------------------------------------------
@@ -113,7 +113,8 @@
  private:
   std::string id_;
 
-  DISALLOW_COPY_AND_ASSIGN(PBXObject);
+  PBXObject(const PBXObject&) = delete;
+  PBXObject& operator=(const PBXObject&) = delete;
 };
 
 // PBXBuildPhase --------------------------------------------------------------
@@ -133,7 +134,8 @@
   std::vector<std::unique_ptr<PBXBuildFile>> files_;
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(PBXBuildPhase);
+  PBXBuildPhase(const PBXBuildPhase&) = delete;
+  PBXBuildPhase& operator=(const PBXBuildPhase&) = delete;
 };
 
 // PBXTarget ------------------------------------------------------------------
@@ -162,7 +164,8 @@
   std::string name_;
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(PBXTarget);
+  PBXTarget(const PBXTarget&) = delete;
+  PBXTarget& operator=(const PBXTarget&) = delete;
 };
 
 // PBXAggregateTarget ---------------------------------------------------------
@@ -180,7 +183,8 @@
   void Print(std::ostream& out, unsigned indent) const override;
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(PBXAggregateTarget);
+  PBXAggregateTarget(const PBXAggregateTarget&) = delete;
+  PBXAggregateTarget& operator=(const PBXAggregateTarget&) = delete;
 };
 
 // PBXBuildFile ---------------------------------------------------------------
@@ -200,7 +204,8 @@
   const PBXFileReference* file_reference_ = nullptr;
   const PBXBuildPhase* build_phase_ = nullptr;
 
-  DISALLOW_COPY_AND_ASSIGN(PBXBuildFile);
+  PBXBuildFile(const PBXBuildFile&) = delete;
+  PBXBuildFile& operator=(const PBXBuildFile&) = delete;
 };
 
 // PBXContainerItemProxy ------------------------------------------------------
@@ -218,7 +223,8 @@
   const PBXProject* project_ = nullptr;
   const PBXTarget* target_ = nullptr;
 
-  DISALLOW_COPY_AND_ASSIGN(PBXContainerItemProxy);
+  PBXContainerItemProxy(const PBXContainerItemProxy&) = delete;
+  PBXContainerItemProxy& operator=(const PBXContainerItemProxy&) = delete;
 };
 
 // PBXFileReference -----------------------------------------------------------
@@ -243,7 +249,8 @@
   std::string path_;
   std::string type_;
 
-  DISALLOW_COPY_AND_ASSIGN(PBXFileReference);
+  PBXFileReference(const PBXFileReference&) = delete;
+  PBXFileReference& operator=(const PBXFileReference&) = delete;
 };
 
 // PBXFrameworksBuildPhase ----------------------------------------------------
@@ -259,7 +266,8 @@
   void Print(std::ostream& out, unsigned indent) const override;
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(PBXFrameworksBuildPhase);
+  PBXFrameworksBuildPhase(const PBXFrameworksBuildPhase&) = delete;
+  PBXFrameworksBuildPhase& operator=(const PBXFrameworksBuildPhase&) = delete;
 };
 
 // PBXGroup -------------------------------------------------------------------
@@ -304,7 +312,8 @@
   bool is_source_ = false;
   bool autosorted_ = true;
 
-  DISALLOW_COPY_AND_ASSIGN(PBXGroup);
+  PBXGroup(const PBXGroup&) = delete;
+  PBXGroup& operator=(const PBXGroup&) = delete;
 };
 
 // PBXNativeTarget ------------------------------------------------------------
@@ -333,7 +342,8 @@
   std::string product_type_;
   std::string product_name_;
 
-  DISALLOW_COPY_AND_ASSIGN(PBXNativeTarget);
+  PBXNativeTarget(const PBXNativeTarget&) = delete;
+  PBXNativeTarget& operator=(const PBXNativeTarget&) = delete;
 };
 
 // PBXProject -----------------------------------------------------------------
@@ -389,7 +399,8 @@
   PBXGroup* products_ = nullptr;
   PBXNativeTarget* target_for_indexing_ = nullptr;
 
-  DISALLOW_COPY_AND_ASSIGN(PBXProject);
+  PBXProject(const PBXProject&) = delete;
+  PBXProject& operator=(const PBXProject&) = delete;
 };
 
 // PBXResourcesBuildPhase -----------------------------------------------------
@@ -405,7 +416,8 @@
   void Print(std::ostream& out, unsigned indent) const override;
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(PBXResourcesBuildPhase);
+  PBXResourcesBuildPhase(const PBXResourcesBuildPhase&) = delete;
+  PBXResourcesBuildPhase& operator=(const PBXResourcesBuildPhase&) = delete;
 };
 
 // PBXShellScriptBuildPhase ---------------------------------------------------
@@ -425,7 +437,8 @@
   std::string name_;
   std::string shell_script_;
 
-  DISALLOW_COPY_AND_ASSIGN(PBXShellScriptBuildPhase);
+  PBXShellScriptBuildPhase(const PBXShellScriptBuildPhase&) = delete;
+  PBXShellScriptBuildPhase& operator=(const PBXShellScriptBuildPhase&) = delete;
 };
 
 // PBXSourcesBuildPhase -------------------------------------------------------
@@ -441,7 +454,8 @@
   void Print(std::ostream& out, unsigned indent) const override;
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(PBXSourcesBuildPhase);
+  PBXSourcesBuildPhase(const PBXSourcesBuildPhase&) = delete;
+  PBXSourcesBuildPhase& operator=(const PBXSourcesBuildPhase&) = delete;
 };
 
 // PBXTargetDependency -----------------------------------------------------
@@ -463,7 +477,8 @@
   const PBXTarget* target_ = nullptr;
   std::unique_ptr<PBXContainerItemProxy> container_item_proxy_;
 
-  DISALLOW_COPY_AND_ASSIGN(PBXTargetDependency);
+  PBXTargetDependency(const PBXTargetDependency&) = delete;
+  PBXTargetDependency& operator=(const PBXTargetDependency&) = delete;
 };
 
 // XCBuildConfiguration -------------------------------------------------------
@@ -483,7 +498,8 @@
   PBXAttributes attributes_;
   std::string name_;
 
-  DISALLOW_COPY_AND_ASSIGN(XCBuildConfiguration);
+  XCBuildConfiguration(const XCBuildConfiguration&) = delete;
+  XCBuildConfiguration& operator=(const XCBuildConfiguration&) = delete;
 };
 
 // XCConfigurationList --------------------------------------------------------
@@ -506,7 +522,8 @@
   std::vector<std::unique_ptr<XCBuildConfiguration>> configurations_;
   const PBXObject* owner_reference_ = nullptr;
 
-  DISALLOW_COPY_AND_ASSIGN(XCConfigurationList);
+  XCConfigurationList(const XCConfigurationList&) = delete;
+  XCConfigurationList& operator=(const XCConfigurationList&) = delete;
 };
 
 #endif  // TOOLS_GN_XCODE_OBJECT_H_
diff --git a/src/gn/xcode_writer.cc b/src/gn/xcode_writer.cc
index 45fc378..19938cd 100644
--- a/src/gn/xcode_writer.cc
+++ b/src/gn/xcode_writer.cc
@@ -325,7 +325,10 @@
  private:
   std::map<PBXObjectClass, std::vector<const PBXObject*>> objects_per_class_;
 
-  DISALLOW_COPY_AND_ASSIGN(CollectPBXObjectsPerClassHelper);
+  CollectPBXObjectsPerClassHelper(const CollectPBXObjectsPerClassHelper&) =
+      delete;
+  CollectPBXObjectsPerClassHelper& operator=(
+      const CollectPBXObjectsPerClassHelper&) = delete;
 };
 
 std::map<PBXObjectClass, std::vector<const PBXObject*>>
@@ -360,7 +363,9 @@
   std::string seed_;
   int64_t counter_;
 
-  DISALLOW_COPY_AND_ASSIGN(RecursivelyAssignIdsHelper);
+  RecursivelyAssignIdsHelper(const RecursivelyAssignIdsHelper&) = delete;
+  RecursivelyAssignIdsHelper& operator=(const RecursivelyAssignIdsHelper&) =
+      delete;
 };
 
 void RecursivelyAssignIds(PBXProject* project) {
@@ -975,10 +980,9 @@
   const std::string& target_output_name = RebasePath(
       target->bundle_data().GetBundleRootDirOutput(target->settings()).value(),
       build_settings_->build_dir());
-  const std::string output_dir = RebasePath(target->bundle_data()
-          .GetBundleDir(target->settings())
-          .value(),
-      build_settings_->build_dir());
+  const std::string output_dir =
+      RebasePath(target->bundle_data().GetBundleDir(target->settings()).value(),
+                 build_settings_->build_dir());
   const std::string root_src_dir =
       RebasePath("//", build_settings_->build_dir());
   return project_.AddNativeTarget(
diff --git a/src/gn/xcode_writer.h b/src/gn/xcode_writer.h
index f934275..96ed14f 100644
--- a/src/gn/xcode_writer.h
+++ b/src/gn/xcode_writer.h
@@ -11,8 +11,6 @@
 #include <string>
 #include <vector>
 
-#include "base/macros.h"
-
 class Builder;
 class BuildSettings;
 class Err;
@@ -77,7 +75,8 @@
                                Err* err);
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(XcodeWriter);
+  XcodeWriter(const XcodeWriter&) = delete;
+  XcodeWriter& operator=(const XcodeWriter&) = delete;
 };
 
 #endif  // TOOLS_GN_XCODE_WRITER_H_
diff --git a/src/gn/xml_element_writer.h b/src/gn/xml_element_writer.h
index 6229f88..1bf9b46 100644
--- a/src/gn/xml_element_writer.h
+++ b/src/gn/xml_element_writer.h
@@ -12,8 +12,6 @@
 #include <utility>
 #include <vector>
 
-#include "base/macros.h"
-
 // Vector of XML attribute key-value pairs.
 class XmlAttributes
     : public std::vector<std::pair<std::string_view, std::string_view>> {
@@ -87,7 +85,8 @@
   // Flag indicating if XML element should be written in one document line.
   bool one_line_;
 
-  DISALLOW_COPY_AND_ASSIGN(XmlElementWriter);
+  XmlElementWriter(const XmlElementWriter&) = delete;
+  XmlElementWriter& operator=(const XmlElementWriter&) = delete;
 };
 
 template <class Writer>
diff --git a/src/util/msg_loop.h b/src/util/msg_loop.h
index b6e1ec7..ceb0d1c 100644
--- a/src/util/msg_loop.h
+++ b/src/util/msg_loop.h
@@ -5,8 +5,6 @@
 #ifndef UTIL_RUN_LOOP_H_
 #define UTIL_RUN_LOOP_H_
 
-#include "base/macros.h"
-
 #include <condition_variable>
 #include <functional>
 #include <mutex>
@@ -41,7 +39,8 @@
   std::condition_variable notifier_;
   bool should_quit_ = false;
 
-  DISALLOW_COPY_AND_ASSIGN(MsgLoop);
+  MsgLoop(const MsgLoop&) = delete;
+  MsgLoop& operator=(const MsgLoop&) = delete;
 };
 
 #endif  // UTIL_RUN_LOOP_H_
diff --git a/src/util/semaphore.h b/src/util/semaphore.h
index f74b8f8..13a0992 100644
--- a/src/util/semaphore.h
+++ b/src/util/semaphore.h
@@ -8,7 +8,6 @@
 #ifndef UTIL_SEMAPHORE_H_
 #define UTIL_SEMAPHORE_H_
 
-#include "base/macros.h"
 #include "util/build_config.h"
 
 #if defined(OS_WIN)
@@ -49,7 +48,8 @@
  private:
   NativeHandle native_handle_;
 
-  DISALLOW_COPY_AND_ASSIGN(Semaphore);
+  Semaphore(const Semaphore&) = delete;
+  Semaphore& operator=(const Semaphore&) = delete;
 };
 
 #endif  // UTIL_SEMAPHORE_H_
diff --git a/src/util/worker_pool.h b/src/util/worker_pool.h
index 7284ebe..753f997 100644
--- a/src/util/worker_pool.h
+++ b/src/util/worker_pool.h
@@ -12,7 +12,6 @@
 #include <thread>
 
 #include "base/logging.h"
-#include "base/macros.h"
 
 class WorkerPool {
  public:
@@ -31,7 +30,8 @@
   std::condition_variable_any pool_notifier_;
   bool should_stop_processing_;
 
-  DISALLOW_COPY_AND_ASSIGN(WorkerPool);
+  WorkerPool(const WorkerPool&) = delete;
+  WorkerPool& operator=(const WorkerPool&) = delete;
 };
 
 #endif  // UTIL_WORKER_POOL_H_