clang-format everything

Change-Id: I37d07b604fe89b9a893503514ef9dc51347a23c6
Reviewed-on: https://gn-review.googlesource.com/1625
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Brett Wilson <brettw@chromium.org>
diff --git a/base/bind.h b/base/bind.h
index aab6828..71df0fe 100644
--- a/base/bind.h
+++ b/base/bind.h
@@ -175,8 +175,9 @@
 
 // Bind as OnceCallback.
 template <typename Functor, typename... Args>
-inline OnceCallback<MakeUnboundRunType<Functor, Args...>>
-BindOnce(Functor&& functor, Args&&... args) {
+inline OnceCallback<MakeUnboundRunType<Functor, Args...>> BindOnce(
+    Functor&& functor,
+    Args&&... args) {
   static_assert(!internal::IsOnceCallback<std::decay_t<Functor>>() ||
                     (std::is_rvalue_reference<Functor&&>() &&
                      !std::is_const<std::remove_reference_t<Functor>>()),
@@ -212,14 +213,14 @@
   using InvokeFuncStorage = internal::BindStateBase::InvokeFuncStorage;
   return CallbackType(new BindState(
       reinterpret_cast<InvokeFuncStorage>(invoke_func),
-      std::forward<Functor>(functor),
-      std::forward<Args>(args)...));
+      std::forward<Functor>(functor), std::forward<Args>(args)...));
 }
 
 // Bind as RepeatingCallback.
 template <typename Functor, typename... Args>
-inline RepeatingCallback<MakeUnboundRunType<Functor, Args...>>
-BindRepeating(Functor&& functor, Args&&... args) {
+inline RepeatingCallback<MakeUnboundRunType<Functor, Args...>> BindRepeating(
+    Functor&& functor,
+    Args&&... args) {
   static_assert(
       !internal::IsOnceCallback<std::decay_t<Functor>>(),
       "BindRepeating cannot bind OnceCallback. Use BindOnce with std::move().");
@@ -253,16 +254,15 @@
   using InvokeFuncStorage = internal::BindStateBase::InvokeFuncStorage;
   return CallbackType(new BindState(
       reinterpret_cast<InvokeFuncStorage>(invoke_func),
-      std::forward<Functor>(functor),
-      std::forward<Args>(args)...));
+      std::forward<Functor>(functor), std::forward<Args>(args)...));
 }
 
 // Unannotated Bind.
 // TODO(tzik): Deprecate this and migrate to OnceCallback and
 // RepeatingCallback, once they get ready.
 template <typename Functor, typename... Args>
-inline Callback<MakeUnboundRunType<Functor, Args...>>
-Bind(Functor&& functor, Args&&... args) {
+inline Callback<MakeUnboundRunType<Functor, Args...>> Bind(Functor&& functor,
+                                                           Args&&... args) {
   return base::BindRepeating(std::forward<Functor>(functor),
                              std::forward<Args>(args)...);
 }
diff --git a/base/callback_internal.cc b/base/callback_internal.cc
index 6cef841..c52d8af 100644
--- a/base/callback_internal.cc
+++ b/base/callback_internal.cc
@@ -23,8 +23,7 @@
 
 BindStateBase::BindStateBase(InvokeFuncStorage polymorphic_invoke,
                              void (*destructor)(const BindStateBase*))
-    : BindStateBase(polymorphic_invoke, destructor, &ReturnFalse) {
-}
+    : BindStateBase(polymorphic_invoke, destructor, &ReturnFalse) {}
 
 BindStateBase::BindStateBase(InvokeFuncStorage polymorphic_invoke,
                              void (*destructor)(const BindStateBase*),
diff --git a/base/callback_internal.h b/base/callback_internal.h
index 5139e6b..7e5180f 100644
--- a/base/callback_internal.h
+++ b/base/callback_internal.h
@@ -62,7 +62,7 @@
  public:
   REQUIRE_ADOPTION_FOR_REFCOUNTED_TYPE();
 
-  using InvokeFuncStorage = void(*)();
+  using InvokeFuncStorage = void (*)();
 
  private:
   BindStateBase(InvokeFuncStorage polymorphic_invoke,
@@ -84,9 +84,7 @@
   friend struct BindState;
   friend struct ::base::FakeBindState;
 
-  bool IsCancelled() const {
-    return is_cancelled_(this);
-  }
+  bool IsCancelled() const { return is_cancelled_(this); }
 
   // In C++, it is safe to cast function pointers to function pointers of
   // another type. It is not okay to use void*. We create a InvokeFuncStorage
diff --git a/base/callback_list.h b/base/callback_list.h
index f455c65..cced145 100644
--- a/base/callback_list.h
+++ b/base/callback_list.h
@@ -76,9 +76,7 @@
    public:
     Subscription(CallbackListBase<CallbackType>* list,
                  typename std::list<CallbackType>::iterator iter)
-        : list_(list),
-          iter_(iter) {
-    }
+        : list_(list), iter_(iter) {}
 
     ~Subscription() {
       if (list_->active_iterator_count_) {
@@ -123,14 +121,12 @@
   class Iterator {
    public:
     explicit Iterator(CallbackListBase<CallbackType>* list)
-        : list_(list),
-          list_iter_(list_->callbacks_.begin()) {
+        : list_(list), list_iter_(list_->callbacks_.begin()) {
       ++list_->active_iterator_count_;
     }
 
     Iterator(const Iterator& iter)
-        : list_(iter.list_),
-          list_iter_(iter.list_iter_) {
+        : list_(iter.list_), list_iter_(iter.list_iter_) {
       ++list_->active_iterator_count_;
     }
 
@@ -166,9 +162,7 @@
 
   // Returns an instance of a CallbackListBase::Iterator which can be used
   // to run callbacks.
-  Iterator GetIterator() {
-    return Iterator(this);
-  }
+  Iterator GetIterator() { return Iterator(this); }
 
   // Compact the list: remove any entries which were nulled out during
   // iteration.
@@ -198,7 +192,8 @@
 
 }  // namespace internal
 
-template <typename Sig> class CallbackList;
+template <typename Sig>
+class CallbackList;
 
 template <typename... Args>
 class CallbackList<void(Args...)>
diff --git a/base/command_line.cc b/base/command_line.cc
index 134ffb8..a49ca71 100644
--- a/base/command_line.cc
+++ b/base/command_line.cc
@@ -19,6 +19,7 @@
 
 #if defined(OS_WIN)
 #include <windows.h>
+
 #include <shellapi.h>
 #endif
 
@@ -123,7 +124,8 @@
     if (arg[i] == '\\') {
       // Find the extent of this run of backslashes.
       size_t start = i, end = start + 1;
-      for (; end < arg.size() && arg[end] == '\\'; ++end) {}
+      for (; end < arg.size() && arg[end] == '\\'; ++end) {
+      }
       size_t backslash_count = end - start;
 
       // Backslashes are escapes only if the run is followed by a double quote.
@@ -153,26 +155,18 @@
 
 }  // namespace
 
-CommandLine::CommandLine(NoProgram no_program)
-    : argv_(1),
-      begin_args_(1) {
-}
+CommandLine::CommandLine(NoProgram no_program) : argv_(1), begin_args_(1) {}
 
-CommandLine::CommandLine(const FilePath& program)
-    : argv_(1),
-      begin_args_(1) {
+CommandLine::CommandLine(const FilePath& program) : argv_(1), begin_args_(1) {
   SetProgram(program);
 }
 
 CommandLine::CommandLine(int argc, const CommandLine::CharType* const* argv)
-    : argv_(1),
-      begin_args_(1) {
+    : argv_(1), begin_args_(1) {
   InitFromArgv(argc, argv);
 }
 
-CommandLine::CommandLine(const StringVector& argv)
-    : argv_(1),
-      begin_args_(1) {
+CommandLine::CommandLine(const StringVector& argv) : argv_(1), begin_args_(1) {
   InitFromArgv(argv);
 }
 
diff --git a/base/command_line.h b/base/command_line.h
index c8394ee..7530d66 100644
--- a/base/command_line.h
+++ b/base/command_line.h
@@ -174,8 +174,7 @@
   // Append a switch [with optional value] to the command line.
   // Note: Switches will precede arguments regardless of appending order.
   void AppendSwitch(const std::string& switch_string);
-  void AppendSwitchPath(const std::string& switch_string,
-                        const FilePath& path);
+  void AppendSwitchPath(const std::string& switch_string, const FilePath& path);
   void AppendSwitchNative(const std::string& switch_string,
                           const StringType& value);
   void AppendSwitchASCII(const std::string& switch_string,
diff --git a/base/compiler_specific.h b/base/compiler_specific.h
index c27c7bc..b548aa6 100644
--- a/base/compiler_specific.h
+++ b/base/compiler_specific.h
@@ -25,12 +25,12 @@
 
 // MSVC_SUPPRESS_WARNING disables warning |n| for the remainder of the line and
 // for the next line of the source file.
-#define MSVC_SUPPRESS_WARNING(n) __pragma(warning(suppress:n))
+#define MSVC_SUPPRESS_WARNING(n) __pragma(warning(suppress : n))
 
 // MSVC_PUSH_DISABLE_WARNING pushes |n| onto a stack of warnings to be disabled.
 // The warning remains disabled until popped by MSVC_POP_WARNING.
-#define MSVC_PUSH_DISABLE_WARNING(n) __pragma(warning(push)) \
-                                     __pragma(warning(disable:n))
+#define MSVC_PUSH_DISABLE_WARNING(n) \
+  __pragma(warning(push)) __pragma(warning(disable : n))
 
 // MSVC_PUSH_WARNING_LEVEL pushes |n| as the global warning level.  The level
 // remains in effect until popped by MSVC_POP_WARNING().  Use 0 to disable all
@@ -136,7 +136,7 @@
 // (This is undocumented but matches what the system C headers do.)
 #if defined(COMPILER_GCC) || defined(__clang__)
 #define PRINTF_FORMAT(format_param, dots_param) \
-    __attribute__((format(printf, format_param, dots_param)))
+  __attribute__((format(printf, format_param, dots_param)))
 #else
 #define PRINTF_FORMAT(format_param, dots_param)
 #endif
@@ -165,14 +165,14 @@
 // Mark a memory region fully initialized.
 // Use this to annotate code that deliberately reads uninitialized data, for
 // example a GC scavenging root set pointers from the stack.
-#define MSAN_UNPOISON(p, size)  __msan_unpoison(p, size)
+#define MSAN_UNPOISON(p, size) __msan_unpoison(p, size)
 
 // Check a memory region for initializedness, as if it was being used here.
 // If any bits are uninitialized, crash with an MSan report.
 // Use this to sanitize data which MSan won't be able to track, e.g. before
 // passing data to another process via shared memory.
 #define MSAN_CHECK_MEM_IS_INITIALIZED(p, size) \
-    __msan_check_mem_is_initialized(p, size)
+  __msan_check_mem_is_initialized(p, size)
 #else  // MEMORY_SANITIZER
 #define MSAN_UNPOISON(p, size)
 #define MSAN_CHECK_MEM_IS_INITIALIZED(p, size)
diff --git a/base/containers/span.h b/base/containers/span.h
index f1e0000..c971861 100644
--- a/base/containers/span.h
+++ b/base/containers/span.h
@@ -267,9 +267,9 @@
   template <size_t Offset, size_t Count = dynamic_extent>
   constexpr span<T,
                  (Count != dynamic_extent
-                     ? Count
-                     : (Extent != dynamic_extent ? Extent - Offset
-                                                 : dynamic_extent))>
+                      ? Count
+                      : (Extent != dynamic_extent ? Extent - Offset
+                                                  : dynamic_extent))>
   subspan() const noexcept {
     static_assert(Extent == dynamic_extent || Offset <= Extent,
                   "Offset must not exceed Extent");
diff --git a/base/environment.cc b/base/environment.cc
index fed01d0..19bc20e 100644
--- a/base/environment.cc
+++ b/base/environment.cc
@@ -143,8 +143,7 @@
 
 #if defined(OS_WIN)
 
-string16 AlterEnvironment(const wchar_t* env,
-                          const EnvironmentMap& changes) {
+string16 AlterEnvironment(const wchar_t* env, const EnvironmentMap& changes) {
   string16 result;
 
   // First copy all unmodified values to the output.
@@ -163,8 +162,8 @@
   }
 
   // Now append all modified and new values.
-  for (EnvironmentMap::const_iterator i = changes.begin();
-       i != changes.end(); ++i) {
+  for (EnvironmentMap::const_iterator i = changes.begin(); i != changes.end();
+       ++i) {
     if (!i->second.empty()) {
       result.append(i->first);
       result.push_back('=');
@@ -203,8 +202,8 @@
   }
 
   // Now append all modified and new values.
-  for (EnvironmentMap::const_iterator i = changes.begin();
-       i != changes.end(); ++i) {
+  for (EnvironmentMap::const_iterator i = changes.begin(); i != changes.end();
+       ++i) {
     if (!i->second.empty()) {
       result_indices.push_back(value_storage.size());
       value_storage.append(i->first);
@@ -220,8 +219,8 @@
   std::unique_ptr<char* []> result(new char*[pointer_count_required]);
 
   // The string storage goes after the array of pointers.
-  char* storage_data = reinterpret_cast<char*>(
-      &result.get()[result_indices.size() + 1]);
+  char* storage_data =
+      reinterpret_cast<char*>(&result.get()[result_indices.size() + 1]);
   if (!value_storage.empty())
     memcpy(storage_data, value_storage.data(), value_storage.size());
 
diff --git a/base/environment.h b/base/environment.h
index 2d5976d..135e3c8 100644
--- a/base/environment.h
+++ b/base/environment.h
@@ -45,7 +45,6 @@
   virtual bool UnSetVar(StringPiece variable_name) = 0;
 };
 
-
 #if defined(OS_WIN)
 
 typedef string16 NativeEnvironmentString;
@@ -62,8 +61,7 @@
 // which is a concatenated list of null-terminated 16-bit strings. The end is
 // marked by a double-null terminator. The size of the returned string will
 // include the terminators.
-string16 AlterEnvironment(const wchar_t* env,
-                                      const EnvironmentMap& changes);
+string16 AlterEnvironment(const wchar_t* env, const EnvironmentMap& changes);
 
 #elif defined(OS_POSIX) || defined(OS_FUCHSIA)
 
@@ -78,9 +76,8 @@
 // returned array will have appended to it the storage for the array itself so
 // there is only one pointer to manage, but this means that you can't copy the
 // array without keeping the original around.
-std::unique_ptr<char* []> AlterEnvironment(
-    const char* const* env,
-    const EnvironmentMap& changes);
+std::unique_ptr<char* []> AlterEnvironment(const char* const* env,
+                                           const EnvironmentMap& changes);
 
 #endif
 
diff --git a/base/files/file.cc b/base/files/file.cc
index 7485b1a..8f779d5 100644
--- a/base/files/file.cc
+++ b/base/files/file.cc
@@ -13,19 +13,12 @@
 
 namespace base {
 
-File::Info::Info()
-    : size(0),
-      is_directory(false),
-      is_symbolic_link(false) {
-}
+File::Info::Info() : size(0), is_directory(false), is_symbolic_link(false) {}
 
 File::Info::~Info() = default;
 
 File::File()
-    : error_details_(FILE_ERROR_FAILED),
-      created_(false),
-      async_(false) {
-}
+    : error_details_(FILE_ERROR_FAILED), created_(false), async_(false) {}
 
 #if !defined(OS_NACL)
 File::File(const FilePath& path, uint32_t flags)
@@ -45,10 +38,7 @@
 }
 
 File::File(Error error_details)
-    : error_details_(error_details),
-      created_(false),
-      async_(false) {
-}
+    : error_details_(error_details), created_(false), async_(false) {}
 
 File::File(File&& other)
     : file_(other.TakePlatformFile()),
diff --git a/base/files/file.h b/base/files/file.h
index c554249..49a2cb4 100644
--- a/base/files/file.h
+++ b/base/files/file.h
@@ -106,11 +106,7 @@
   };
 
   // This explicit mapping matches both FILE_ on Windows and SEEK_ on Linux.
-  enum Whence {
-    FROM_BEGIN   = 0,
-    FROM_CURRENT = 1,
-    FROM_END     = 2
-  };
+  enum Whence { FROM_BEGIN = 0, FROM_CURRENT = 1, FROM_END = 2 };
 
   // Used to hold information about a given file.
   // If you add more fields to this structure (platform-specific fields are OK),
@@ -361,4 +357,3 @@
 }  // namespace base
 
 #endif  // BASE_FILES_FILE_H_
-
diff --git a/base/files/file_enumerator.h b/base/files/file_enumerator.h
index 45ce88b..905871d 100644
--- a/base/files/file_enumerator.h
+++ b/base/files/file_enumerator.h
@@ -111,9 +111,7 @@
   // since the underlying code uses OS-specific matching routines.  In general,
   // Windows matching is less featureful than others, so test there first.
   // If unspecified, this will match all files.
-  FileEnumerator(const FilePath& root_path,
-                 bool recursive,
-                 int file_type);
+  FileEnumerator(const FilePath& root_path, bool recursive, int file_type);
   FileEnumerator(const FilePath& root_path,
                  bool recursive,
                  int file_type,
diff --git a/base/files/file_path.cc b/base/files/file_path.cc
index 969a977..325b9b2 100644
--- a/base/files/file_path.cc
+++ b/base/files/file_path.cc
@@ -33,8 +33,8 @@
 
 namespace {
 
-const char* const kCommonDoubleExtensionSuffixes[] = { "gz", "z", "bz2", "bz" };
-const char* const kCommonDoubleExtensions[] = { "user.js" };
+const char* const kCommonDoubleExtensionSuffixes[] = {"gz", "z", "bz2", "bz"};
+const char* const kCommonDoubleExtensions[] = {"user.js"};
 
 const FilePath::CharType kStringTerminator = FILE_PATH_LITERAL('\0');
 
@@ -81,20 +81,19 @@
   if (letter != StringType::npos) {
     // Look for a separator right after the drive specification.
     return path.length() > letter + 1 &&
-        FilePath::IsSeparator(path[letter + 1]);
+           FilePath::IsSeparator(path[letter + 1]);
   }
   // Look for a pair of leading separators.
-  return path.length() > 1 &&
-      FilePath::IsSeparator(path[0]) && FilePath::IsSeparator(path[1]);
-#else  // FILE_PATH_USES_DRIVE_LETTERS
+  return path.length() > 1 && FilePath::IsSeparator(path[0]) &&
+         FilePath::IsSeparator(path[1]);
+#else   // FILE_PATH_USES_DRIVE_LETTERS
   // Look for a separator in the first position.
   return path.length() > 0 && FilePath::IsSeparator(path[0]);
 #endif  // FILE_PATH_USES_DRIVE_LETTERS
 }
 
 bool AreAllSeparators(const StringType& input) {
-  for (StringType::const_iterator it = input.begin();
-      it != input.end(); ++it) {
+  for (StringType::const_iterator it = input.begin(); it != input.end(); ++it) {
     if (!FilePath::IsSeparator(*it))
       return false;
   }
@@ -126,9 +125,8 @@
 
   const StringType::size_type penultimate_dot =
       path.rfind(FilePath::kExtensionSeparator, last_dot - 1);
-  const StringType::size_type last_separator =
-      path.find_last_of(FilePath::kSeparators, last_dot - 1,
-                        FilePath::kSeparatorsLength - 1);
+  const StringType::size_type last_separator = path.find_last_of(
+      FilePath::kSeparators, last_dot - 1, FilePath::kSeparatorsLength - 1);
 
   if (penultimate_dot == StringType::npos ||
       (last_separator != StringType::npos &&
@@ -189,7 +187,7 @@
 bool FilePath::operator==(const FilePath& that) const {
 #if defined(FILE_PATH_USES_DRIVE_LETTERS)
   return EqualDriveLetterCaseInsensitive(this->path_, that.path_);
-#else  // defined(FILE_PATH_USES_DRIVE_LETTERS)
+#else   // defined(FILE_PATH_USES_DRIVE_LETTERS)
   return path_ == that.path_;
 #endif  // defined(FILE_PATH_USES_DRIVE_LETTERS)
 }
@@ -197,7 +195,7 @@
 bool FilePath::operator!=(const FilePath& that) const {
 #if defined(FILE_PATH_USES_DRIVE_LETTERS)
   return !EqualDriveLetterCaseInsensitive(this->path_, that.path_);
-#else  // defined(FILE_PATH_USES_DRIVE_LETTERS)
+#else   // defined(FILE_PATH_USES_DRIVE_LETTERS)
   return path_ != that.path_;
 #endif  // defined(FILE_PATH_USES_DRIVE_LETTERS)
 }
@@ -256,8 +254,7 @@
   return AppendRelativePath(child, nullptr);
 }
 
-bool FilePath::AppendRelativePath(const FilePath& child,
-                                  FilePath* path) const {
+bool FilePath::AppendRelativePath(const FilePath& child, FilePath* path) const {
   std::vector<StringType> parent_components;
   std::vector<StringType> child_components;
   GetComponents(&parent_components);
@@ -269,8 +266,7 @@
 
   std::vector<StringType>::const_iterator parent_comp =
       parent_components.begin();
-  std::vector<StringType>::const_iterator child_comp =
-      child_components.begin();
+  std::vector<StringType>::const_iterator child_comp = child_components.begin();
 
 #if defined(FILE_PATH_USES_DRIVE_LETTERS)
   // Windows can access case sensitive filesystems, so component
@@ -314,9 +310,8 @@
   // resizes below using letter will still be valid.
   StringType::size_type letter = FindDriveLetter(new_path.path_);
 
-  StringType::size_type last_separator =
-      new_path.path_.find_last_of(kSeparators, StringType::npos,
-                                  kSeparatorsLength - 1);
+  StringType::size_type last_separator = new_path.path_.find_last_of(
+      kSeparators, StringType::npos, kSeparatorsLength - 1);
   if (last_separator == StringType::npos) {
     // path_ is in the current directory.
     new_path.path_.resize(letter + 1);
@@ -352,9 +347,8 @@
 
   // Keep everything after the final separator, but if the pathname is only
   // one character and it's a separator, leave it alone.
-  StringType::size_type last_separator =
-      new_path.path_.find_last_of(kSeparators, StringType::npos,
-                                  kSeparatorsLength - 1);
+  StringType::size_type last_separator = new_path.path_.find_last_of(
+      kSeparators, StringType::npos, kSeparatorsLength - 1);
   if (last_separator != StringType::npos &&
       last_separator < new_path.path_.length() - 1) {
     new_path.path_.erase(0, last_separator + 1);
@@ -417,8 +411,7 @@
   return FilePath(ret);
 }
 
-FilePath FilePath::InsertBeforeExtensionASCII(StringPiece suffix)
-    const {
+FilePath FilePath::InsertBeforeExtensionASCII(StringPiece suffix) const {
   DCHECK(IsStringASCII(suffix));
 #if defined(OS_WIN)
   return InsertBeforeExtension(ASCIIToUTF16(suffix));
@@ -682,7 +675,7 @@
   StringPieceType::const_iterator i2 = string2.begin();
   StringPieceType::const_iterator string1end = string1.end();
   StringPieceType::const_iterator string2end = string2.end();
-  for ( ; i1 != string1end && i2 != string2end; ++i1, ++i2) {
+  for (; i1 != string1end && i2 != string2end; ++i1, ++i2) {
     wchar_t c1 =
         (wchar_t)LOWORD(char_upper_api((LPWSTR)(DWORD_PTR)MAKELONG(*i1, 0)));
     wchar_t c2 =
@@ -702,7 +695,8 @@
 #elif defined(OS_MACOSX)
 // Mac OS X specific implementation of file string comparisons.
 
-// cf. http://developer.apple.com/mac/library/technotes/tn/tn1150.html#UnicodeSubtleties
+// cf.
+// http://developer.apple.com/mac/library/technotes/tn/tn1150.html#UnicodeSubtleties
 //
 // "When using CreateTextEncoding to create a text encoding, you should set
 // the TextEncodingBase to kTextEncodingUnicodeV2_0, set the
@@ -713,7 +707,8 @@
 //
 // Another technical article for X 10.4 updates this: one should use
 // the new (unambiguous) kUnicodeHFSPlusDecompVariant.
-// cf. http://developer.apple.com/mac/library/releasenotes/TextFonts/RN-TEC/index.html
+// cf.
+// http://developer.apple.com/mac/library/releasenotes/TextFonts/RN-TEC/index.html
 //
 // This implementation uses CFStringGetFileSystemRepresentation() to get the
 // decomposed form, and an adapted version of the FastUnicodeCompare as
@@ -733,390 +728,390 @@
 namespace {
 
 const UInt16 lower_case_table[] = {
-  // High-byte indices ( == 0 iff no case mapping and no ignorables )
+    // High-byte indices ( == 0 iff no case mapping and no ignorables )
 
-  /* 0 */ 0x0100, 0x0200, 0x0000, 0x0300, 0x0400, 0x0500, 0x0000, 0x0000,
-          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-  /* 1 */ 0x0600, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-  /* 2 */ 0x0700, 0x0800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-  /* 3 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-  /* 4 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-  /* 5 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-  /* 6 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-  /* 7 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-  /* 8 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-  /* 9 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-  /* A */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-  /* B */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-  /* C */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-  /* D */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-  /* E */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-  /* F */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0900, 0x0A00,
+    /* 0 */ 0x0100, 0x0200, 0x0000, 0x0300, 0x0400, 0x0500, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 1 */ 0x0600, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 2 */ 0x0700, 0x0800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 3 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 4 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 5 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 6 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 7 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 8 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 9 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* A */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* B */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* C */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* D */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* E */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* F */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0900, 0x0A00,
 
-  // Table 1 (for high byte 0x00)
+    // Table 1 (for high byte 0x00)
 
-  /* 0 */ 0xFFFF, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
-          0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
-  /* 1 */ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
-          0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
-  /* 2 */ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
-          0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
-  /* 3 */ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
-          0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
-  /* 4 */ 0x0040, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
-          0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
-  /* 5 */ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
-          0x0078, 0x0079, 0x007A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
-  /* 6 */ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
-          0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
-  /* 7 */ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
-          0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
-  /* 8 */ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
-          0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
-  /* 9 */ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
-          0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
-  /* A */ 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
-          0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
-  /* B */ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
-          0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
-  /* C */ 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00E6, 0x00C7,
-          0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
-  /* D */ 0x00F0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
-          0x00F8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00FE, 0x00DF,
-  /* E */ 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
-          0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
-  /* F */ 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
-          0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF,
+    /* 0 */ 0xFFFF, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+    0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+    /* 1 */ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+    0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+    /* 2 */ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+    0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+    /* 3 */ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+    0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+    /* 4 */ 0x0040, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+    0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+    /* 5 */ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+    0x0078, 0x0079, 0x007A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+    /* 6 */ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+    0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+    /* 7 */ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+    0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+    /* 8 */ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+    /* 9 */ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+    /* A */ 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
+    0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+    /* B */ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+    0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
+    /* C */ 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00E6, 0x00C7,
+    0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+    /* D */ 0x00F0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
+    0x00F8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00FE, 0x00DF,
+    /* E */ 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
+    0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+    /* F */ 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
+    0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF,
 
-  // Table 2 (for high byte 0x01)
+    // Table 2 (for high byte 0x01)
 
-  /* 0 */ 0x0100, 0x0101, 0x0102, 0x0103, 0x0104, 0x0105, 0x0106, 0x0107,
-          0x0108, 0x0109, 0x010A, 0x010B, 0x010C, 0x010D, 0x010E, 0x010F,
-  /* 1 */ 0x0111, 0x0111, 0x0112, 0x0113, 0x0114, 0x0115, 0x0116, 0x0117,
-          0x0118, 0x0119, 0x011A, 0x011B, 0x011C, 0x011D, 0x011E, 0x011F,
-  /* 2 */ 0x0120, 0x0121, 0x0122, 0x0123, 0x0124, 0x0125, 0x0127, 0x0127,
-          0x0128, 0x0129, 0x012A, 0x012B, 0x012C, 0x012D, 0x012E, 0x012F,
-  /* 3 */ 0x0130, 0x0131, 0x0133, 0x0133, 0x0134, 0x0135, 0x0136, 0x0137,
-          0x0138, 0x0139, 0x013A, 0x013B, 0x013C, 0x013D, 0x013E, 0x0140,
-  /* 4 */ 0x0140, 0x0142, 0x0142, 0x0143, 0x0144, 0x0145, 0x0146, 0x0147,
-          0x0148, 0x0149, 0x014B, 0x014B, 0x014C, 0x014D, 0x014E, 0x014F,
-  /* 5 */ 0x0150, 0x0151, 0x0153, 0x0153, 0x0154, 0x0155, 0x0156, 0x0157,
-          0x0158, 0x0159, 0x015A, 0x015B, 0x015C, 0x015D, 0x015E, 0x015F,
-  /* 6 */ 0x0160, 0x0161, 0x0162, 0x0163, 0x0164, 0x0165, 0x0167, 0x0167,
-          0x0168, 0x0169, 0x016A, 0x016B, 0x016C, 0x016D, 0x016E, 0x016F,
-  /* 7 */ 0x0170, 0x0171, 0x0172, 0x0173, 0x0174, 0x0175, 0x0176, 0x0177,
-          0x0178, 0x0179, 0x017A, 0x017B, 0x017C, 0x017D, 0x017E, 0x017F,
-  /* 8 */ 0x0180, 0x0253, 0x0183, 0x0183, 0x0185, 0x0185, 0x0254, 0x0188,
-          0x0188, 0x0256, 0x0257, 0x018C, 0x018C, 0x018D, 0x01DD, 0x0259,
-  /* 9 */ 0x025B, 0x0192, 0x0192, 0x0260, 0x0263, 0x0195, 0x0269, 0x0268,
-          0x0199, 0x0199, 0x019A, 0x019B, 0x026F, 0x0272, 0x019E, 0x0275,
-  /* A */ 0x01A0, 0x01A1, 0x01A3, 0x01A3, 0x01A5, 0x01A5, 0x01A6, 0x01A8,
-          0x01A8, 0x0283, 0x01AA, 0x01AB, 0x01AD, 0x01AD, 0x0288, 0x01AF,
-  /* B */ 0x01B0, 0x028A, 0x028B, 0x01B4, 0x01B4, 0x01B6, 0x01B6, 0x0292,
-          0x01B9, 0x01B9, 0x01BA, 0x01BB, 0x01BD, 0x01BD, 0x01BE, 0x01BF,
-  /* C */ 0x01C0, 0x01C1, 0x01C2, 0x01C3, 0x01C6, 0x01C6, 0x01C6, 0x01C9,
-          0x01C9, 0x01C9, 0x01CC, 0x01CC, 0x01CC, 0x01CD, 0x01CE, 0x01CF,
-  /* D */ 0x01D0, 0x01D1, 0x01D2, 0x01D3, 0x01D4, 0x01D5, 0x01D6, 0x01D7,
-          0x01D8, 0x01D9, 0x01DA, 0x01DB, 0x01DC, 0x01DD, 0x01DE, 0x01DF,
-  /* E */ 0x01E0, 0x01E1, 0x01E2, 0x01E3, 0x01E5, 0x01E5, 0x01E6, 0x01E7,
-          0x01E8, 0x01E9, 0x01EA, 0x01EB, 0x01EC, 0x01ED, 0x01EE, 0x01EF,
-  /* F */ 0x01F0, 0x01F3, 0x01F3, 0x01F3, 0x01F4, 0x01F5, 0x01F6, 0x01F7,
-          0x01F8, 0x01F9, 0x01FA, 0x01FB, 0x01FC, 0x01FD, 0x01FE, 0x01FF,
+    /* 0 */ 0x0100, 0x0101, 0x0102, 0x0103, 0x0104, 0x0105, 0x0106, 0x0107,
+    0x0108, 0x0109, 0x010A, 0x010B, 0x010C, 0x010D, 0x010E, 0x010F,
+    /* 1 */ 0x0111, 0x0111, 0x0112, 0x0113, 0x0114, 0x0115, 0x0116, 0x0117,
+    0x0118, 0x0119, 0x011A, 0x011B, 0x011C, 0x011D, 0x011E, 0x011F,
+    /* 2 */ 0x0120, 0x0121, 0x0122, 0x0123, 0x0124, 0x0125, 0x0127, 0x0127,
+    0x0128, 0x0129, 0x012A, 0x012B, 0x012C, 0x012D, 0x012E, 0x012F,
+    /* 3 */ 0x0130, 0x0131, 0x0133, 0x0133, 0x0134, 0x0135, 0x0136, 0x0137,
+    0x0138, 0x0139, 0x013A, 0x013B, 0x013C, 0x013D, 0x013E, 0x0140,
+    /* 4 */ 0x0140, 0x0142, 0x0142, 0x0143, 0x0144, 0x0145, 0x0146, 0x0147,
+    0x0148, 0x0149, 0x014B, 0x014B, 0x014C, 0x014D, 0x014E, 0x014F,
+    /* 5 */ 0x0150, 0x0151, 0x0153, 0x0153, 0x0154, 0x0155, 0x0156, 0x0157,
+    0x0158, 0x0159, 0x015A, 0x015B, 0x015C, 0x015D, 0x015E, 0x015F,
+    /* 6 */ 0x0160, 0x0161, 0x0162, 0x0163, 0x0164, 0x0165, 0x0167, 0x0167,
+    0x0168, 0x0169, 0x016A, 0x016B, 0x016C, 0x016D, 0x016E, 0x016F,
+    /* 7 */ 0x0170, 0x0171, 0x0172, 0x0173, 0x0174, 0x0175, 0x0176, 0x0177,
+    0x0178, 0x0179, 0x017A, 0x017B, 0x017C, 0x017D, 0x017E, 0x017F,
+    /* 8 */ 0x0180, 0x0253, 0x0183, 0x0183, 0x0185, 0x0185, 0x0254, 0x0188,
+    0x0188, 0x0256, 0x0257, 0x018C, 0x018C, 0x018D, 0x01DD, 0x0259,
+    /* 9 */ 0x025B, 0x0192, 0x0192, 0x0260, 0x0263, 0x0195, 0x0269, 0x0268,
+    0x0199, 0x0199, 0x019A, 0x019B, 0x026F, 0x0272, 0x019E, 0x0275,
+    /* A */ 0x01A0, 0x01A1, 0x01A3, 0x01A3, 0x01A5, 0x01A5, 0x01A6, 0x01A8,
+    0x01A8, 0x0283, 0x01AA, 0x01AB, 0x01AD, 0x01AD, 0x0288, 0x01AF,
+    /* B */ 0x01B0, 0x028A, 0x028B, 0x01B4, 0x01B4, 0x01B6, 0x01B6, 0x0292,
+    0x01B9, 0x01B9, 0x01BA, 0x01BB, 0x01BD, 0x01BD, 0x01BE, 0x01BF,
+    /* C */ 0x01C0, 0x01C1, 0x01C2, 0x01C3, 0x01C6, 0x01C6, 0x01C6, 0x01C9,
+    0x01C9, 0x01C9, 0x01CC, 0x01CC, 0x01CC, 0x01CD, 0x01CE, 0x01CF,
+    /* D */ 0x01D0, 0x01D1, 0x01D2, 0x01D3, 0x01D4, 0x01D5, 0x01D6, 0x01D7,
+    0x01D8, 0x01D9, 0x01DA, 0x01DB, 0x01DC, 0x01DD, 0x01DE, 0x01DF,
+    /* E */ 0x01E0, 0x01E1, 0x01E2, 0x01E3, 0x01E5, 0x01E5, 0x01E6, 0x01E7,
+    0x01E8, 0x01E9, 0x01EA, 0x01EB, 0x01EC, 0x01ED, 0x01EE, 0x01EF,
+    /* F */ 0x01F0, 0x01F3, 0x01F3, 0x01F3, 0x01F4, 0x01F5, 0x01F6, 0x01F7,
+    0x01F8, 0x01F9, 0x01FA, 0x01FB, 0x01FC, 0x01FD, 0x01FE, 0x01FF,
 
-  // Table 3 (for high byte 0x03)
+    // Table 3 (for high byte 0x03)
 
-  /* 0 */ 0x0300, 0x0301, 0x0302, 0x0303, 0x0304, 0x0305, 0x0306, 0x0307,
-          0x0308, 0x0309, 0x030A, 0x030B, 0x030C, 0x030D, 0x030E, 0x030F,
-  /* 1 */ 0x0310, 0x0311, 0x0312, 0x0313, 0x0314, 0x0315, 0x0316, 0x0317,
-          0x0318, 0x0319, 0x031A, 0x031B, 0x031C, 0x031D, 0x031E, 0x031F,
-  /* 2 */ 0x0320, 0x0321, 0x0322, 0x0323, 0x0324, 0x0325, 0x0326, 0x0327,
-          0x0328, 0x0329, 0x032A, 0x032B, 0x032C, 0x032D, 0x032E, 0x032F,
-  /* 3 */ 0x0330, 0x0331, 0x0332, 0x0333, 0x0334, 0x0335, 0x0336, 0x0337,
-          0x0338, 0x0339, 0x033A, 0x033B, 0x033C, 0x033D, 0x033E, 0x033F,
-  /* 4 */ 0x0340, 0x0341, 0x0342, 0x0343, 0x0344, 0x0345, 0x0346, 0x0347,
-          0x0348, 0x0349, 0x034A, 0x034B, 0x034C, 0x034D, 0x034E, 0x034F,
-  /* 5 */ 0x0350, 0x0351, 0x0352, 0x0353, 0x0354, 0x0355, 0x0356, 0x0357,
-          0x0358, 0x0359, 0x035A, 0x035B, 0x035C, 0x035D, 0x035E, 0x035F,
-  /* 6 */ 0x0360, 0x0361, 0x0362, 0x0363, 0x0364, 0x0365, 0x0366, 0x0367,
-          0x0368, 0x0369, 0x036A, 0x036B, 0x036C, 0x036D, 0x036E, 0x036F,
-  /* 7 */ 0x0370, 0x0371, 0x0372, 0x0373, 0x0374, 0x0375, 0x0376, 0x0377,
-          0x0378, 0x0379, 0x037A, 0x037B, 0x037C, 0x037D, 0x037E, 0x037F,
-  /* 8 */ 0x0380, 0x0381, 0x0382, 0x0383, 0x0384, 0x0385, 0x0386, 0x0387,
-          0x0388, 0x0389, 0x038A, 0x038B, 0x038C, 0x038D, 0x038E, 0x038F,
-  /* 9 */ 0x0390, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
-          0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
-  /* A */ 0x03C0, 0x03C1, 0x03A2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
-          0x03C8, 0x03C9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF,
-  /* B */ 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
-          0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
-  /* C */ 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
-          0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0x03CF,
-  /* D */ 0x03D0, 0x03D1, 0x03D2, 0x03D3, 0x03D4, 0x03D5, 0x03D6, 0x03D7,
-          0x03D8, 0x03D9, 0x03DA, 0x03DB, 0x03DC, 0x03DD, 0x03DE, 0x03DF,
-  /* E */ 0x03E0, 0x03E1, 0x03E3, 0x03E3, 0x03E5, 0x03E5, 0x03E7, 0x03E7,
-          0x03E9, 0x03E9, 0x03EB, 0x03EB, 0x03ED, 0x03ED, 0x03EF, 0x03EF,
-  /* F */ 0x03F0, 0x03F1, 0x03F2, 0x03F3, 0x03F4, 0x03F5, 0x03F6, 0x03F7,
-          0x03F8, 0x03F9, 0x03FA, 0x03FB, 0x03FC, 0x03FD, 0x03FE, 0x03FF,
+    /* 0 */ 0x0300, 0x0301, 0x0302, 0x0303, 0x0304, 0x0305, 0x0306, 0x0307,
+    0x0308, 0x0309, 0x030A, 0x030B, 0x030C, 0x030D, 0x030E, 0x030F,
+    /* 1 */ 0x0310, 0x0311, 0x0312, 0x0313, 0x0314, 0x0315, 0x0316, 0x0317,
+    0x0318, 0x0319, 0x031A, 0x031B, 0x031C, 0x031D, 0x031E, 0x031F,
+    /* 2 */ 0x0320, 0x0321, 0x0322, 0x0323, 0x0324, 0x0325, 0x0326, 0x0327,
+    0x0328, 0x0329, 0x032A, 0x032B, 0x032C, 0x032D, 0x032E, 0x032F,
+    /* 3 */ 0x0330, 0x0331, 0x0332, 0x0333, 0x0334, 0x0335, 0x0336, 0x0337,
+    0x0338, 0x0339, 0x033A, 0x033B, 0x033C, 0x033D, 0x033E, 0x033F,
+    /* 4 */ 0x0340, 0x0341, 0x0342, 0x0343, 0x0344, 0x0345, 0x0346, 0x0347,
+    0x0348, 0x0349, 0x034A, 0x034B, 0x034C, 0x034D, 0x034E, 0x034F,
+    /* 5 */ 0x0350, 0x0351, 0x0352, 0x0353, 0x0354, 0x0355, 0x0356, 0x0357,
+    0x0358, 0x0359, 0x035A, 0x035B, 0x035C, 0x035D, 0x035E, 0x035F,
+    /* 6 */ 0x0360, 0x0361, 0x0362, 0x0363, 0x0364, 0x0365, 0x0366, 0x0367,
+    0x0368, 0x0369, 0x036A, 0x036B, 0x036C, 0x036D, 0x036E, 0x036F,
+    /* 7 */ 0x0370, 0x0371, 0x0372, 0x0373, 0x0374, 0x0375, 0x0376, 0x0377,
+    0x0378, 0x0379, 0x037A, 0x037B, 0x037C, 0x037D, 0x037E, 0x037F,
+    /* 8 */ 0x0380, 0x0381, 0x0382, 0x0383, 0x0384, 0x0385, 0x0386, 0x0387,
+    0x0388, 0x0389, 0x038A, 0x038B, 0x038C, 0x038D, 0x038E, 0x038F,
+    /* 9 */ 0x0390, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
+    0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
+    /* A */ 0x03C0, 0x03C1, 0x03A2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
+    0x03C8, 0x03C9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF,
+    /* B */ 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
+    0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
+    /* C */ 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
+    0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0x03CF,
+    /* D */ 0x03D0, 0x03D1, 0x03D2, 0x03D3, 0x03D4, 0x03D5, 0x03D6, 0x03D7,
+    0x03D8, 0x03D9, 0x03DA, 0x03DB, 0x03DC, 0x03DD, 0x03DE, 0x03DF,
+    /* E */ 0x03E0, 0x03E1, 0x03E3, 0x03E3, 0x03E5, 0x03E5, 0x03E7, 0x03E7,
+    0x03E9, 0x03E9, 0x03EB, 0x03EB, 0x03ED, 0x03ED, 0x03EF, 0x03EF,
+    /* F */ 0x03F0, 0x03F1, 0x03F2, 0x03F3, 0x03F4, 0x03F5, 0x03F6, 0x03F7,
+    0x03F8, 0x03F9, 0x03FA, 0x03FB, 0x03FC, 0x03FD, 0x03FE, 0x03FF,
 
-  // Table 4 (for high byte 0x04)
+    // Table 4 (for high byte 0x04)
 
-  /* 0 */ 0x0400, 0x0401, 0x0452, 0x0403, 0x0454, 0x0455, 0x0456, 0x0407,
-          0x0458, 0x0459, 0x045A, 0x045B, 0x040C, 0x040D, 0x040E, 0x045F,
-  /* 1 */ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
-          0x0438, 0x0419, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
-  /* 2 */ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
-          0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
-  /* 3 */ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
-          0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
-  /* 4 */ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
-          0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
-  /* 5 */ 0x0450, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457,
-          0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x045D, 0x045E, 0x045F,
-  /* 6 */ 0x0461, 0x0461, 0x0463, 0x0463, 0x0465, 0x0465, 0x0467, 0x0467,
-          0x0469, 0x0469, 0x046B, 0x046B, 0x046D, 0x046D, 0x046F, 0x046F,
-  /* 7 */ 0x0471, 0x0471, 0x0473, 0x0473, 0x0475, 0x0475, 0x0476, 0x0477,
-          0x0479, 0x0479, 0x047B, 0x047B, 0x047D, 0x047D, 0x047F, 0x047F,
-  /* 8 */ 0x0481, 0x0481, 0x0482, 0x0483, 0x0484, 0x0485, 0x0486, 0x0487,
-          0x0488, 0x0489, 0x048A, 0x048B, 0x048C, 0x048D, 0x048E, 0x048F,
-  /* 9 */ 0x0491, 0x0491, 0x0493, 0x0493, 0x0495, 0x0495, 0x0497, 0x0497,
-          0x0499, 0x0499, 0x049B, 0x049B, 0x049D, 0x049D, 0x049F, 0x049F,
-  /* A */ 0x04A1, 0x04A1, 0x04A3, 0x04A3, 0x04A5, 0x04A5, 0x04A7, 0x04A7,
-          0x04A9, 0x04A9, 0x04AB, 0x04AB, 0x04AD, 0x04AD, 0x04AF, 0x04AF,
-  /* B */ 0x04B1, 0x04B1, 0x04B3, 0x04B3, 0x04B5, 0x04B5, 0x04B7, 0x04B7,
-          0x04B9, 0x04B9, 0x04BB, 0x04BB, 0x04BD, 0x04BD, 0x04BF, 0x04BF,
-  /* C */ 0x04C0, 0x04C1, 0x04C2, 0x04C4, 0x04C4, 0x04C5, 0x04C6, 0x04C8,
-          0x04C8, 0x04C9, 0x04CA, 0x04CC, 0x04CC, 0x04CD, 0x04CE, 0x04CF,
-  /* D */ 0x04D0, 0x04D1, 0x04D2, 0x04D3, 0x04D4, 0x04D5, 0x04D6, 0x04D7,
-          0x04D8, 0x04D9, 0x04DA, 0x04DB, 0x04DC, 0x04DD, 0x04DE, 0x04DF,
-  /* E */ 0x04E0, 0x04E1, 0x04E2, 0x04E3, 0x04E4, 0x04E5, 0x04E6, 0x04E7,
-          0x04E8, 0x04E9, 0x04EA, 0x04EB, 0x04EC, 0x04ED, 0x04EE, 0x04EF,
-  /* F */ 0x04F0, 0x04F1, 0x04F2, 0x04F3, 0x04F4, 0x04F5, 0x04F6, 0x04F7,
-          0x04F8, 0x04F9, 0x04FA, 0x04FB, 0x04FC, 0x04FD, 0x04FE, 0x04FF,
+    /* 0 */ 0x0400, 0x0401, 0x0452, 0x0403, 0x0454, 0x0455, 0x0456, 0x0407,
+    0x0458, 0x0459, 0x045A, 0x045B, 0x040C, 0x040D, 0x040E, 0x045F,
+    /* 1 */ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
+    0x0438, 0x0419, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
+    /* 2 */ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
+    0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
+    /* 3 */ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
+    0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
+    /* 4 */ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
+    0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
+    /* 5 */ 0x0450, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457,
+    0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x045D, 0x045E, 0x045F,
+    /* 6 */ 0x0461, 0x0461, 0x0463, 0x0463, 0x0465, 0x0465, 0x0467, 0x0467,
+    0x0469, 0x0469, 0x046B, 0x046B, 0x046D, 0x046D, 0x046F, 0x046F,
+    /* 7 */ 0x0471, 0x0471, 0x0473, 0x0473, 0x0475, 0x0475, 0x0476, 0x0477,
+    0x0479, 0x0479, 0x047B, 0x047B, 0x047D, 0x047D, 0x047F, 0x047F,
+    /* 8 */ 0x0481, 0x0481, 0x0482, 0x0483, 0x0484, 0x0485, 0x0486, 0x0487,
+    0x0488, 0x0489, 0x048A, 0x048B, 0x048C, 0x048D, 0x048E, 0x048F,
+    /* 9 */ 0x0491, 0x0491, 0x0493, 0x0493, 0x0495, 0x0495, 0x0497, 0x0497,
+    0x0499, 0x0499, 0x049B, 0x049B, 0x049D, 0x049D, 0x049F, 0x049F,
+    /* A */ 0x04A1, 0x04A1, 0x04A3, 0x04A3, 0x04A5, 0x04A5, 0x04A7, 0x04A7,
+    0x04A9, 0x04A9, 0x04AB, 0x04AB, 0x04AD, 0x04AD, 0x04AF, 0x04AF,
+    /* B */ 0x04B1, 0x04B1, 0x04B3, 0x04B3, 0x04B5, 0x04B5, 0x04B7, 0x04B7,
+    0x04B9, 0x04B9, 0x04BB, 0x04BB, 0x04BD, 0x04BD, 0x04BF, 0x04BF,
+    /* C */ 0x04C0, 0x04C1, 0x04C2, 0x04C4, 0x04C4, 0x04C5, 0x04C6, 0x04C8,
+    0x04C8, 0x04C9, 0x04CA, 0x04CC, 0x04CC, 0x04CD, 0x04CE, 0x04CF,
+    /* D */ 0x04D0, 0x04D1, 0x04D2, 0x04D3, 0x04D4, 0x04D5, 0x04D6, 0x04D7,
+    0x04D8, 0x04D9, 0x04DA, 0x04DB, 0x04DC, 0x04DD, 0x04DE, 0x04DF,
+    /* E */ 0x04E0, 0x04E1, 0x04E2, 0x04E3, 0x04E4, 0x04E5, 0x04E6, 0x04E7,
+    0x04E8, 0x04E9, 0x04EA, 0x04EB, 0x04EC, 0x04ED, 0x04EE, 0x04EF,
+    /* F */ 0x04F0, 0x04F1, 0x04F2, 0x04F3, 0x04F4, 0x04F5, 0x04F6, 0x04F7,
+    0x04F8, 0x04F9, 0x04FA, 0x04FB, 0x04FC, 0x04FD, 0x04FE, 0x04FF,
 
-  // Table 5 (for high byte 0x05)
+    // Table 5 (for high byte 0x05)
 
-  /* 0 */ 0x0500, 0x0501, 0x0502, 0x0503, 0x0504, 0x0505, 0x0506, 0x0507,
-          0x0508, 0x0509, 0x050A, 0x050B, 0x050C, 0x050D, 0x050E, 0x050F,
-  /* 1 */ 0x0510, 0x0511, 0x0512, 0x0513, 0x0514, 0x0515, 0x0516, 0x0517,
-          0x0518, 0x0519, 0x051A, 0x051B, 0x051C, 0x051D, 0x051E, 0x051F,
-  /* 2 */ 0x0520, 0x0521, 0x0522, 0x0523, 0x0524, 0x0525, 0x0526, 0x0527,
-          0x0528, 0x0529, 0x052A, 0x052B, 0x052C, 0x052D, 0x052E, 0x052F,
-  /* 3 */ 0x0530, 0x0561, 0x0562, 0x0563, 0x0564, 0x0565, 0x0566, 0x0567,
-          0x0568, 0x0569, 0x056A, 0x056B, 0x056C, 0x056D, 0x056E, 0x056F,
-  /* 4 */ 0x0570, 0x0571, 0x0572, 0x0573, 0x0574, 0x0575, 0x0576, 0x0577,
-          0x0578, 0x0579, 0x057A, 0x057B, 0x057C, 0x057D, 0x057E, 0x057F,
-  /* 5 */ 0x0580, 0x0581, 0x0582, 0x0583, 0x0584, 0x0585, 0x0586, 0x0557,
-          0x0558, 0x0559, 0x055A, 0x055B, 0x055C, 0x055D, 0x055E, 0x055F,
-  /* 6 */ 0x0560, 0x0561, 0x0562, 0x0563, 0x0564, 0x0565, 0x0566, 0x0567,
-          0x0568, 0x0569, 0x056A, 0x056B, 0x056C, 0x056D, 0x056E, 0x056F,
-  /* 7 */ 0x0570, 0x0571, 0x0572, 0x0573, 0x0574, 0x0575, 0x0576, 0x0577,
-          0x0578, 0x0579, 0x057A, 0x057B, 0x057C, 0x057D, 0x057E, 0x057F,
-  /* 8 */ 0x0580, 0x0581, 0x0582, 0x0583, 0x0584, 0x0585, 0x0586, 0x0587,
-          0x0588, 0x0589, 0x058A, 0x058B, 0x058C, 0x058D, 0x058E, 0x058F,
-  /* 9 */ 0x0590, 0x0591, 0x0592, 0x0593, 0x0594, 0x0595, 0x0596, 0x0597,
-          0x0598, 0x0599, 0x059A, 0x059B, 0x059C, 0x059D, 0x059E, 0x059F,
-  /* A */ 0x05A0, 0x05A1, 0x05A2, 0x05A3, 0x05A4, 0x05A5, 0x05A6, 0x05A7,
-          0x05A8, 0x05A9, 0x05AA, 0x05AB, 0x05AC, 0x05AD, 0x05AE, 0x05AF,
-  /* B */ 0x05B0, 0x05B1, 0x05B2, 0x05B3, 0x05B4, 0x05B5, 0x05B6, 0x05B7,
-          0x05B8, 0x05B9, 0x05BA, 0x05BB, 0x05BC, 0x05BD, 0x05BE, 0x05BF,
-  /* C */ 0x05C0, 0x05C1, 0x05C2, 0x05C3, 0x05C4, 0x05C5, 0x05C6, 0x05C7,
-          0x05C8, 0x05C9, 0x05CA, 0x05CB, 0x05CC, 0x05CD, 0x05CE, 0x05CF,
-  /* D */ 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
-          0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
-  /* E */ 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
-          0x05E8, 0x05E9, 0x05EA, 0x05EB, 0x05EC, 0x05ED, 0x05EE, 0x05EF,
-  /* F */ 0x05F0, 0x05F1, 0x05F2, 0x05F3, 0x05F4, 0x05F5, 0x05F6, 0x05F7,
-          0x05F8, 0x05F9, 0x05FA, 0x05FB, 0x05FC, 0x05FD, 0x05FE, 0x05FF,
+    /* 0 */ 0x0500, 0x0501, 0x0502, 0x0503, 0x0504, 0x0505, 0x0506, 0x0507,
+    0x0508, 0x0509, 0x050A, 0x050B, 0x050C, 0x050D, 0x050E, 0x050F,
+    /* 1 */ 0x0510, 0x0511, 0x0512, 0x0513, 0x0514, 0x0515, 0x0516, 0x0517,
+    0x0518, 0x0519, 0x051A, 0x051B, 0x051C, 0x051D, 0x051E, 0x051F,
+    /* 2 */ 0x0520, 0x0521, 0x0522, 0x0523, 0x0524, 0x0525, 0x0526, 0x0527,
+    0x0528, 0x0529, 0x052A, 0x052B, 0x052C, 0x052D, 0x052E, 0x052F,
+    /* 3 */ 0x0530, 0x0561, 0x0562, 0x0563, 0x0564, 0x0565, 0x0566, 0x0567,
+    0x0568, 0x0569, 0x056A, 0x056B, 0x056C, 0x056D, 0x056E, 0x056F,
+    /* 4 */ 0x0570, 0x0571, 0x0572, 0x0573, 0x0574, 0x0575, 0x0576, 0x0577,
+    0x0578, 0x0579, 0x057A, 0x057B, 0x057C, 0x057D, 0x057E, 0x057F,
+    /* 5 */ 0x0580, 0x0581, 0x0582, 0x0583, 0x0584, 0x0585, 0x0586, 0x0557,
+    0x0558, 0x0559, 0x055A, 0x055B, 0x055C, 0x055D, 0x055E, 0x055F,
+    /* 6 */ 0x0560, 0x0561, 0x0562, 0x0563, 0x0564, 0x0565, 0x0566, 0x0567,
+    0x0568, 0x0569, 0x056A, 0x056B, 0x056C, 0x056D, 0x056E, 0x056F,
+    /* 7 */ 0x0570, 0x0571, 0x0572, 0x0573, 0x0574, 0x0575, 0x0576, 0x0577,
+    0x0578, 0x0579, 0x057A, 0x057B, 0x057C, 0x057D, 0x057E, 0x057F,
+    /* 8 */ 0x0580, 0x0581, 0x0582, 0x0583, 0x0584, 0x0585, 0x0586, 0x0587,
+    0x0588, 0x0589, 0x058A, 0x058B, 0x058C, 0x058D, 0x058E, 0x058F,
+    /* 9 */ 0x0590, 0x0591, 0x0592, 0x0593, 0x0594, 0x0595, 0x0596, 0x0597,
+    0x0598, 0x0599, 0x059A, 0x059B, 0x059C, 0x059D, 0x059E, 0x059F,
+    /* A */ 0x05A0, 0x05A1, 0x05A2, 0x05A3, 0x05A4, 0x05A5, 0x05A6, 0x05A7,
+    0x05A8, 0x05A9, 0x05AA, 0x05AB, 0x05AC, 0x05AD, 0x05AE, 0x05AF,
+    /* B */ 0x05B0, 0x05B1, 0x05B2, 0x05B3, 0x05B4, 0x05B5, 0x05B6, 0x05B7,
+    0x05B8, 0x05B9, 0x05BA, 0x05BB, 0x05BC, 0x05BD, 0x05BE, 0x05BF,
+    /* C */ 0x05C0, 0x05C1, 0x05C2, 0x05C3, 0x05C4, 0x05C5, 0x05C6, 0x05C7,
+    0x05C8, 0x05C9, 0x05CA, 0x05CB, 0x05CC, 0x05CD, 0x05CE, 0x05CF,
+    /* D */ 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
+    0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
+    /* E */ 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
+    0x05E8, 0x05E9, 0x05EA, 0x05EB, 0x05EC, 0x05ED, 0x05EE, 0x05EF,
+    /* F */ 0x05F0, 0x05F1, 0x05F2, 0x05F3, 0x05F4, 0x05F5, 0x05F6, 0x05F7,
+    0x05F8, 0x05F9, 0x05FA, 0x05FB, 0x05FC, 0x05FD, 0x05FE, 0x05FF,
 
-  // Table 6 (for high byte 0x10)
+    // Table 6 (for high byte 0x10)
 
-  /* 0 */ 0x1000, 0x1001, 0x1002, 0x1003, 0x1004, 0x1005, 0x1006, 0x1007,
-          0x1008, 0x1009, 0x100A, 0x100B, 0x100C, 0x100D, 0x100E, 0x100F,
-  /* 1 */ 0x1010, 0x1011, 0x1012, 0x1013, 0x1014, 0x1015, 0x1016, 0x1017,
-          0x1018, 0x1019, 0x101A, 0x101B, 0x101C, 0x101D, 0x101E, 0x101F,
-  /* 2 */ 0x1020, 0x1021, 0x1022, 0x1023, 0x1024, 0x1025, 0x1026, 0x1027,
-          0x1028, 0x1029, 0x102A, 0x102B, 0x102C, 0x102D, 0x102E, 0x102F,
-  /* 3 */ 0x1030, 0x1031, 0x1032, 0x1033, 0x1034, 0x1035, 0x1036, 0x1037,
-          0x1038, 0x1039, 0x103A, 0x103B, 0x103C, 0x103D, 0x103E, 0x103F,
-  /* 4 */ 0x1040, 0x1041, 0x1042, 0x1043, 0x1044, 0x1045, 0x1046, 0x1047,
-          0x1048, 0x1049, 0x104A, 0x104B, 0x104C, 0x104D, 0x104E, 0x104F,
-  /* 5 */ 0x1050, 0x1051, 0x1052, 0x1053, 0x1054, 0x1055, 0x1056, 0x1057,
-          0x1058, 0x1059, 0x105A, 0x105B, 0x105C, 0x105D, 0x105E, 0x105F,
-  /* 6 */ 0x1060, 0x1061, 0x1062, 0x1063, 0x1064, 0x1065, 0x1066, 0x1067,
-          0x1068, 0x1069, 0x106A, 0x106B, 0x106C, 0x106D, 0x106E, 0x106F,
-  /* 7 */ 0x1070, 0x1071, 0x1072, 0x1073, 0x1074, 0x1075, 0x1076, 0x1077,
-          0x1078, 0x1079, 0x107A, 0x107B, 0x107C, 0x107D, 0x107E, 0x107F,
-  /* 8 */ 0x1080, 0x1081, 0x1082, 0x1083, 0x1084, 0x1085, 0x1086, 0x1087,
-          0x1088, 0x1089, 0x108A, 0x108B, 0x108C, 0x108D, 0x108E, 0x108F,
-  /* 9 */ 0x1090, 0x1091, 0x1092, 0x1093, 0x1094, 0x1095, 0x1096, 0x1097,
-          0x1098, 0x1099, 0x109A, 0x109B, 0x109C, 0x109D, 0x109E, 0x109F,
-  /* A */ 0x10D0, 0x10D1, 0x10D2, 0x10D3, 0x10D4, 0x10D5, 0x10D6, 0x10D7,
-          0x10D8, 0x10D9, 0x10DA, 0x10DB, 0x10DC, 0x10DD, 0x10DE, 0x10DF,
-  /* B */ 0x10E0, 0x10E1, 0x10E2, 0x10E3, 0x10E4, 0x10E5, 0x10E6, 0x10E7,
-          0x10E8, 0x10E9, 0x10EA, 0x10EB, 0x10EC, 0x10ED, 0x10EE, 0x10EF,
-  /* C */ 0x10F0, 0x10F1, 0x10F2, 0x10F3, 0x10F4, 0x10F5, 0x10C6, 0x10C7,
-          0x10C8, 0x10C9, 0x10CA, 0x10CB, 0x10CC, 0x10CD, 0x10CE, 0x10CF,
-  /* D */ 0x10D0, 0x10D1, 0x10D2, 0x10D3, 0x10D4, 0x10D5, 0x10D6, 0x10D7,
-          0x10D8, 0x10D9, 0x10DA, 0x10DB, 0x10DC, 0x10DD, 0x10DE, 0x10DF,
-  /* E */ 0x10E0, 0x10E1, 0x10E2, 0x10E3, 0x10E4, 0x10E5, 0x10E6, 0x10E7,
-          0x10E8, 0x10E9, 0x10EA, 0x10EB, 0x10EC, 0x10ED, 0x10EE, 0x10EF,
-  /* F */ 0x10F0, 0x10F1, 0x10F2, 0x10F3, 0x10F4, 0x10F5, 0x10F6, 0x10F7,
-          0x10F8, 0x10F9, 0x10FA, 0x10FB, 0x10FC, 0x10FD, 0x10FE, 0x10FF,
+    /* 0 */ 0x1000, 0x1001, 0x1002, 0x1003, 0x1004, 0x1005, 0x1006, 0x1007,
+    0x1008, 0x1009, 0x100A, 0x100B, 0x100C, 0x100D, 0x100E, 0x100F,
+    /* 1 */ 0x1010, 0x1011, 0x1012, 0x1013, 0x1014, 0x1015, 0x1016, 0x1017,
+    0x1018, 0x1019, 0x101A, 0x101B, 0x101C, 0x101D, 0x101E, 0x101F,
+    /* 2 */ 0x1020, 0x1021, 0x1022, 0x1023, 0x1024, 0x1025, 0x1026, 0x1027,
+    0x1028, 0x1029, 0x102A, 0x102B, 0x102C, 0x102D, 0x102E, 0x102F,
+    /* 3 */ 0x1030, 0x1031, 0x1032, 0x1033, 0x1034, 0x1035, 0x1036, 0x1037,
+    0x1038, 0x1039, 0x103A, 0x103B, 0x103C, 0x103D, 0x103E, 0x103F,
+    /* 4 */ 0x1040, 0x1041, 0x1042, 0x1043, 0x1044, 0x1045, 0x1046, 0x1047,
+    0x1048, 0x1049, 0x104A, 0x104B, 0x104C, 0x104D, 0x104E, 0x104F,
+    /* 5 */ 0x1050, 0x1051, 0x1052, 0x1053, 0x1054, 0x1055, 0x1056, 0x1057,
+    0x1058, 0x1059, 0x105A, 0x105B, 0x105C, 0x105D, 0x105E, 0x105F,
+    /* 6 */ 0x1060, 0x1061, 0x1062, 0x1063, 0x1064, 0x1065, 0x1066, 0x1067,
+    0x1068, 0x1069, 0x106A, 0x106B, 0x106C, 0x106D, 0x106E, 0x106F,
+    /* 7 */ 0x1070, 0x1071, 0x1072, 0x1073, 0x1074, 0x1075, 0x1076, 0x1077,
+    0x1078, 0x1079, 0x107A, 0x107B, 0x107C, 0x107D, 0x107E, 0x107F,
+    /* 8 */ 0x1080, 0x1081, 0x1082, 0x1083, 0x1084, 0x1085, 0x1086, 0x1087,
+    0x1088, 0x1089, 0x108A, 0x108B, 0x108C, 0x108D, 0x108E, 0x108F,
+    /* 9 */ 0x1090, 0x1091, 0x1092, 0x1093, 0x1094, 0x1095, 0x1096, 0x1097,
+    0x1098, 0x1099, 0x109A, 0x109B, 0x109C, 0x109D, 0x109E, 0x109F,
+    /* A */ 0x10D0, 0x10D1, 0x10D2, 0x10D3, 0x10D4, 0x10D5, 0x10D6, 0x10D7,
+    0x10D8, 0x10D9, 0x10DA, 0x10DB, 0x10DC, 0x10DD, 0x10DE, 0x10DF,
+    /* B */ 0x10E0, 0x10E1, 0x10E2, 0x10E3, 0x10E4, 0x10E5, 0x10E6, 0x10E7,
+    0x10E8, 0x10E9, 0x10EA, 0x10EB, 0x10EC, 0x10ED, 0x10EE, 0x10EF,
+    /* C */ 0x10F0, 0x10F1, 0x10F2, 0x10F3, 0x10F4, 0x10F5, 0x10C6, 0x10C7,
+    0x10C8, 0x10C9, 0x10CA, 0x10CB, 0x10CC, 0x10CD, 0x10CE, 0x10CF,
+    /* D */ 0x10D0, 0x10D1, 0x10D2, 0x10D3, 0x10D4, 0x10D5, 0x10D6, 0x10D7,
+    0x10D8, 0x10D9, 0x10DA, 0x10DB, 0x10DC, 0x10DD, 0x10DE, 0x10DF,
+    /* E */ 0x10E0, 0x10E1, 0x10E2, 0x10E3, 0x10E4, 0x10E5, 0x10E6, 0x10E7,
+    0x10E8, 0x10E9, 0x10EA, 0x10EB, 0x10EC, 0x10ED, 0x10EE, 0x10EF,
+    /* F */ 0x10F0, 0x10F1, 0x10F2, 0x10F3, 0x10F4, 0x10F5, 0x10F6, 0x10F7,
+    0x10F8, 0x10F9, 0x10FA, 0x10FB, 0x10FC, 0x10FD, 0x10FE, 0x10FF,
 
-  // Table 7 (for high byte 0x20)
+    // Table 7 (for high byte 0x20)
 
-  /* 0 */ 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007,
-          0x2008, 0x2009, 0x200A, 0x200B, 0x0000, 0x0000, 0x0000, 0x0000,
-  /* 1 */ 0x2010, 0x2011, 0x2012, 0x2013, 0x2014, 0x2015, 0x2016, 0x2017,
-          0x2018, 0x2019, 0x201A, 0x201B, 0x201C, 0x201D, 0x201E, 0x201F,
-  /* 2 */ 0x2020, 0x2021, 0x2022, 0x2023, 0x2024, 0x2025, 0x2026, 0x2027,
-          0x2028, 0x2029, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x202F,
-  /* 3 */ 0x2030, 0x2031, 0x2032, 0x2033, 0x2034, 0x2035, 0x2036, 0x2037,
-          0x2038, 0x2039, 0x203A, 0x203B, 0x203C, 0x203D, 0x203E, 0x203F,
-  /* 4 */ 0x2040, 0x2041, 0x2042, 0x2043, 0x2044, 0x2045, 0x2046, 0x2047,
-          0x2048, 0x2049, 0x204A, 0x204B, 0x204C, 0x204D, 0x204E, 0x204F,
-  /* 5 */ 0x2050, 0x2051, 0x2052, 0x2053, 0x2054, 0x2055, 0x2056, 0x2057,
-          0x2058, 0x2059, 0x205A, 0x205B, 0x205C, 0x205D, 0x205E, 0x205F,
-  /* 6 */ 0x2060, 0x2061, 0x2062, 0x2063, 0x2064, 0x2065, 0x2066, 0x2067,
-          0x2068, 0x2069, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-  /* 7 */ 0x2070, 0x2071, 0x2072, 0x2073, 0x2074, 0x2075, 0x2076, 0x2077,
-          0x2078, 0x2079, 0x207A, 0x207B, 0x207C, 0x207D, 0x207E, 0x207F,
-  /* 8 */ 0x2080, 0x2081, 0x2082, 0x2083, 0x2084, 0x2085, 0x2086, 0x2087,
-          0x2088, 0x2089, 0x208A, 0x208B, 0x208C, 0x208D, 0x208E, 0x208F,
-  /* 9 */ 0x2090, 0x2091, 0x2092, 0x2093, 0x2094, 0x2095, 0x2096, 0x2097,
-          0x2098, 0x2099, 0x209A, 0x209B, 0x209C, 0x209D, 0x209E, 0x209F,
-  /* A */ 0x20A0, 0x20A1, 0x20A2, 0x20A3, 0x20A4, 0x20A5, 0x20A6, 0x20A7,
-          0x20A8, 0x20A9, 0x20AA, 0x20AB, 0x20AC, 0x20AD, 0x20AE, 0x20AF,
-  /* B */ 0x20B0, 0x20B1, 0x20B2, 0x20B3, 0x20B4, 0x20B5, 0x20B6, 0x20B7,
-          0x20B8, 0x20B9, 0x20BA, 0x20BB, 0x20BC, 0x20BD, 0x20BE, 0x20BF,
-  /* C */ 0x20C0, 0x20C1, 0x20C2, 0x20C3, 0x20C4, 0x20C5, 0x20C6, 0x20C7,
-          0x20C8, 0x20C9, 0x20CA, 0x20CB, 0x20CC, 0x20CD, 0x20CE, 0x20CF,
-  /* D */ 0x20D0, 0x20D1, 0x20D2, 0x20D3, 0x20D4, 0x20D5, 0x20D6, 0x20D7,
-          0x20D8, 0x20D9, 0x20DA, 0x20DB, 0x20DC, 0x20DD, 0x20DE, 0x20DF,
-  /* E */ 0x20E0, 0x20E1, 0x20E2, 0x20E3, 0x20E4, 0x20E5, 0x20E6, 0x20E7,
-          0x20E8, 0x20E9, 0x20EA, 0x20EB, 0x20EC, 0x20ED, 0x20EE, 0x20EF,
-  /* F */ 0x20F0, 0x20F1, 0x20F2, 0x20F3, 0x20F4, 0x20F5, 0x20F6, 0x20F7,
-          0x20F8, 0x20F9, 0x20FA, 0x20FB, 0x20FC, 0x20FD, 0x20FE, 0x20FF,
+    /* 0 */ 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007,
+    0x2008, 0x2009, 0x200A, 0x200B, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 1 */ 0x2010, 0x2011, 0x2012, 0x2013, 0x2014, 0x2015, 0x2016, 0x2017,
+    0x2018, 0x2019, 0x201A, 0x201B, 0x201C, 0x201D, 0x201E, 0x201F,
+    /* 2 */ 0x2020, 0x2021, 0x2022, 0x2023, 0x2024, 0x2025, 0x2026, 0x2027,
+    0x2028, 0x2029, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x202F,
+    /* 3 */ 0x2030, 0x2031, 0x2032, 0x2033, 0x2034, 0x2035, 0x2036, 0x2037,
+    0x2038, 0x2039, 0x203A, 0x203B, 0x203C, 0x203D, 0x203E, 0x203F,
+    /* 4 */ 0x2040, 0x2041, 0x2042, 0x2043, 0x2044, 0x2045, 0x2046, 0x2047,
+    0x2048, 0x2049, 0x204A, 0x204B, 0x204C, 0x204D, 0x204E, 0x204F,
+    /* 5 */ 0x2050, 0x2051, 0x2052, 0x2053, 0x2054, 0x2055, 0x2056, 0x2057,
+    0x2058, 0x2059, 0x205A, 0x205B, 0x205C, 0x205D, 0x205E, 0x205F,
+    /* 6 */ 0x2060, 0x2061, 0x2062, 0x2063, 0x2064, 0x2065, 0x2066, 0x2067,
+    0x2068, 0x2069, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 7 */ 0x2070, 0x2071, 0x2072, 0x2073, 0x2074, 0x2075, 0x2076, 0x2077,
+    0x2078, 0x2079, 0x207A, 0x207B, 0x207C, 0x207D, 0x207E, 0x207F,
+    /* 8 */ 0x2080, 0x2081, 0x2082, 0x2083, 0x2084, 0x2085, 0x2086, 0x2087,
+    0x2088, 0x2089, 0x208A, 0x208B, 0x208C, 0x208D, 0x208E, 0x208F,
+    /* 9 */ 0x2090, 0x2091, 0x2092, 0x2093, 0x2094, 0x2095, 0x2096, 0x2097,
+    0x2098, 0x2099, 0x209A, 0x209B, 0x209C, 0x209D, 0x209E, 0x209F,
+    /* A */ 0x20A0, 0x20A1, 0x20A2, 0x20A3, 0x20A4, 0x20A5, 0x20A6, 0x20A7,
+    0x20A8, 0x20A9, 0x20AA, 0x20AB, 0x20AC, 0x20AD, 0x20AE, 0x20AF,
+    /* B */ 0x20B0, 0x20B1, 0x20B2, 0x20B3, 0x20B4, 0x20B5, 0x20B6, 0x20B7,
+    0x20B8, 0x20B9, 0x20BA, 0x20BB, 0x20BC, 0x20BD, 0x20BE, 0x20BF,
+    /* C */ 0x20C0, 0x20C1, 0x20C2, 0x20C3, 0x20C4, 0x20C5, 0x20C6, 0x20C7,
+    0x20C8, 0x20C9, 0x20CA, 0x20CB, 0x20CC, 0x20CD, 0x20CE, 0x20CF,
+    /* D */ 0x20D0, 0x20D1, 0x20D2, 0x20D3, 0x20D4, 0x20D5, 0x20D6, 0x20D7,
+    0x20D8, 0x20D9, 0x20DA, 0x20DB, 0x20DC, 0x20DD, 0x20DE, 0x20DF,
+    /* E */ 0x20E0, 0x20E1, 0x20E2, 0x20E3, 0x20E4, 0x20E5, 0x20E6, 0x20E7,
+    0x20E8, 0x20E9, 0x20EA, 0x20EB, 0x20EC, 0x20ED, 0x20EE, 0x20EF,
+    /* F */ 0x20F0, 0x20F1, 0x20F2, 0x20F3, 0x20F4, 0x20F5, 0x20F6, 0x20F7,
+    0x20F8, 0x20F9, 0x20FA, 0x20FB, 0x20FC, 0x20FD, 0x20FE, 0x20FF,
 
-  // Table 8 (for high byte 0x21)
+    // Table 8 (for high byte 0x21)
 
-  /* 0 */ 0x2100, 0x2101, 0x2102, 0x2103, 0x2104, 0x2105, 0x2106, 0x2107,
-          0x2108, 0x2109, 0x210A, 0x210B, 0x210C, 0x210D, 0x210E, 0x210F,
-  /* 1 */ 0x2110, 0x2111, 0x2112, 0x2113, 0x2114, 0x2115, 0x2116, 0x2117,
-          0x2118, 0x2119, 0x211A, 0x211B, 0x211C, 0x211D, 0x211E, 0x211F,
-  /* 2 */ 0x2120, 0x2121, 0x2122, 0x2123, 0x2124, 0x2125, 0x2126, 0x2127,
-          0x2128, 0x2129, 0x212A, 0x212B, 0x212C, 0x212D, 0x212E, 0x212F,
-  /* 3 */ 0x2130, 0x2131, 0x2132, 0x2133, 0x2134, 0x2135, 0x2136, 0x2137,
-          0x2138, 0x2139, 0x213A, 0x213B, 0x213C, 0x213D, 0x213E, 0x213F,
-  /* 4 */ 0x2140, 0x2141, 0x2142, 0x2143, 0x2144, 0x2145, 0x2146, 0x2147,
-          0x2148, 0x2149, 0x214A, 0x214B, 0x214C, 0x214D, 0x214E, 0x214F,
-  /* 5 */ 0x2150, 0x2151, 0x2152, 0x2153, 0x2154, 0x2155, 0x2156, 0x2157,
-          0x2158, 0x2159, 0x215A, 0x215B, 0x215C, 0x215D, 0x215E, 0x215F,
-  /* 6 */ 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177,
-          0x2178, 0x2179, 0x217A, 0x217B, 0x217C, 0x217D, 0x217E, 0x217F,
-  /* 7 */ 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177,
-          0x2178, 0x2179, 0x217A, 0x217B, 0x217C, 0x217D, 0x217E, 0x217F,
-  /* 8 */ 0x2180, 0x2181, 0x2182, 0x2183, 0x2184, 0x2185, 0x2186, 0x2187,
-          0x2188, 0x2189, 0x218A, 0x218B, 0x218C, 0x218D, 0x218E, 0x218F,
-  /* 9 */ 0x2190, 0x2191, 0x2192, 0x2193, 0x2194, 0x2195, 0x2196, 0x2197,
-          0x2198, 0x2199, 0x219A, 0x219B, 0x219C, 0x219D, 0x219E, 0x219F,
-  /* A */ 0x21A0, 0x21A1, 0x21A2, 0x21A3, 0x21A4, 0x21A5, 0x21A6, 0x21A7,
-          0x21A8, 0x21A9, 0x21AA, 0x21AB, 0x21AC, 0x21AD, 0x21AE, 0x21AF,
-  /* B */ 0x21B0, 0x21B1, 0x21B2, 0x21B3, 0x21B4, 0x21B5, 0x21B6, 0x21B7,
-          0x21B8, 0x21B9, 0x21BA, 0x21BB, 0x21BC, 0x21BD, 0x21BE, 0x21BF,
-  /* C */ 0x21C0, 0x21C1, 0x21C2, 0x21C3, 0x21C4, 0x21C5, 0x21C6, 0x21C7,
-          0x21C8, 0x21C9, 0x21CA, 0x21CB, 0x21CC, 0x21CD, 0x21CE, 0x21CF,
-  /* D */ 0x21D0, 0x21D1, 0x21D2, 0x21D3, 0x21D4, 0x21D5, 0x21D6, 0x21D7,
-          0x21D8, 0x21D9, 0x21DA, 0x21DB, 0x21DC, 0x21DD, 0x21DE, 0x21DF,
-  /* E */ 0x21E0, 0x21E1, 0x21E2, 0x21E3, 0x21E4, 0x21E5, 0x21E6, 0x21E7,
-          0x21E8, 0x21E9, 0x21EA, 0x21EB, 0x21EC, 0x21ED, 0x21EE, 0x21EF,
-  /* F */ 0x21F0, 0x21F1, 0x21F2, 0x21F3, 0x21F4, 0x21F5, 0x21F6, 0x21F7,
-          0x21F8, 0x21F9, 0x21FA, 0x21FB, 0x21FC, 0x21FD, 0x21FE, 0x21FF,
+    /* 0 */ 0x2100, 0x2101, 0x2102, 0x2103, 0x2104, 0x2105, 0x2106, 0x2107,
+    0x2108, 0x2109, 0x210A, 0x210B, 0x210C, 0x210D, 0x210E, 0x210F,
+    /* 1 */ 0x2110, 0x2111, 0x2112, 0x2113, 0x2114, 0x2115, 0x2116, 0x2117,
+    0x2118, 0x2119, 0x211A, 0x211B, 0x211C, 0x211D, 0x211E, 0x211F,
+    /* 2 */ 0x2120, 0x2121, 0x2122, 0x2123, 0x2124, 0x2125, 0x2126, 0x2127,
+    0x2128, 0x2129, 0x212A, 0x212B, 0x212C, 0x212D, 0x212E, 0x212F,
+    /* 3 */ 0x2130, 0x2131, 0x2132, 0x2133, 0x2134, 0x2135, 0x2136, 0x2137,
+    0x2138, 0x2139, 0x213A, 0x213B, 0x213C, 0x213D, 0x213E, 0x213F,
+    /* 4 */ 0x2140, 0x2141, 0x2142, 0x2143, 0x2144, 0x2145, 0x2146, 0x2147,
+    0x2148, 0x2149, 0x214A, 0x214B, 0x214C, 0x214D, 0x214E, 0x214F,
+    /* 5 */ 0x2150, 0x2151, 0x2152, 0x2153, 0x2154, 0x2155, 0x2156, 0x2157,
+    0x2158, 0x2159, 0x215A, 0x215B, 0x215C, 0x215D, 0x215E, 0x215F,
+    /* 6 */ 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177,
+    0x2178, 0x2179, 0x217A, 0x217B, 0x217C, 0x217D, 0x217E, 0x217F,
+    /* 7 */ 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177,
+    0x2178, 0x2179, 0x217A, 0x217B, 0x217C, 0x217D, 0x217E, 0x217F,
+    /* 8 */ 0x2180, 0x2181, 0x2182, 0x2183, 0x2184, 0x2185, 0x2186, 0x2187,
+    0x2188, 0x2189, 0x218A, 0x218B, 0x218C, 0x218D, 0x218E, 0x218F,
+    /* 9 */ 0x2190, 0x2191, 0x2192, 0x2193, 0x2194, 0x2195, 0x2196, 0x2197,
+    0x2198, 0x2199, 0x219A, 0x219B, 0x219C, 0x219D, 0x219E, 0x219F,
+    /* A */ 0x21A0, 0x21A1, 0x21A2, 0x21A3, 0x21A4, 0x21A5, 0x21A6, 0x21A7,
+    0x21A8, 0x21A9, 0x21AA, 0x21AB, 0x21AC, 0x21AD, 0x21AE, 0x21AF,
+    /* B */ 0x21B0, 0x21B1, 0x21B2, 0x21B3, 0x21B4, 0x21B5, 0x21B6, 0x21B7,
+    0x21B8, 0x21B9, 0x21BA, 0x21BB, 0x21BC, 0x21BD, 0x21BE, 0x21BF,
+    /* C */ 0x21C0, 0x21C1, 0x21C2, 0x21C3, 0x21C4, 0x21C5, 0x21C6, 0x21C7,
+    0x21C8, 0x21C9, 0x21CA, 0x21CB, 0x21CC, 0x21CD, 0x21CE, 0x21CF,
+    /* D */ 0x21D0, 0x21D1, 0x21D2, 0x21D3, 0x21D4, 0x21D5, 0x21D6, 0x21D7,
+    0x21D8, 0x21D9, 0x21DA, 0x21DB, 0x21DC, 0x21DD, 0x21DE, 0x21DF,
+    /* E */ 0x21E0, 0x21E1, 0x21E2, 0x21E3, 0x21E4, 0x21E5, 0x21E6, 0x21E7,
+    0x21E8, 0x21E9, 0x21EA, 0x21EB, 0x21EC, 0x21ED, 0x21EE, 0x21EF,
+    /* F */ 0x21F0, 0x21F1, 0x21F2, 0x21F3, 0x21F4, 0x21F5, 0x21F6, 0x21F7,
+    0x21F8, 0x21F9, 0x21FA, 0x21FB, 0x21FC, 0x21FD, 0x21FE, 0x21FF,
 
-  // Table 9 (for high byte 0xFE)
+    // Table 9 (for high byte 0xFE)
 
-  /* 0 */ 0xFE00, 0xFE01, 0xFE02, 0xFE03, 0xFE04, 0xFE05, 0xFE06, 0xFE07,
-          0xFE08, 0xFE09, 0xFE0A, 0xFE0B, 0xFE0C, 0xFE0D, 0xFE0E, 0xFE0F,
-  /* 1 */ 0xFE10, 0xFE11, 0xFE12, 0xFE13, 0xFE14, 0xFE15, 0xFE16, 0xFE17,
-          0xFE18, 0xFE19, 0xFE1A, 0xFE1B, 0xFE1C, 0xFE1D, 0xFE1E, 0xFE1F,
-  /* 2 */ 0xFE20, 0xFE21, 0xFE22, 0xFE23, 0xFE24, 0xFE25, 0xFE26, 0xFE27,
-          0xFE28, 0xFE29, 0xFE2A, 0xFE2B, 0xFE2C, 0xFE2D, 0xFE2E, 0xFE2F,
-  /* 3 */ 0xFE30, 0xFE31, 0xFE32, 0xFE33, 0xFE34, 0xFE35, 0xFE36, 0xFE37,
-          0xFE38, 0xFE39, 0xFE3A, 0xFE3B, 0xFE3C, 0xFE3D, 0xFE3E, 0xFE3F,
-  /* 4 */ 0xFE40, 0xFE41, 0xFE42, 0xFE43, 0xFE44, 0xFE45, 0xFE46, 0xFE47,
-          0xFE48, 0xFE49, 0xFE4A, 0xFE4B, 0xFE4C, 0xFE4D, 0xFE4E, 0xFE4F,
-  /* 5 */ 0xFE50, 0xFE51, 0xFE52, 0xFE53, 0xFE54, 0xFE55, 0xFE56, 0xFE57,
-          0xFE58, 0xFE59, 0xFE5A, 0xFE5B, 0xFE5C, 0xFE5D, 0xFE5E, 0xFE5F,
-  /* 6 */ 0xFE60, 0xFE61, 0xFE62, 0xFE63, 0xFE64, 0xFE65, 0xFE66, 0xFE67,
-          0xFE68, 0xFE69, 0xFE6A, 0xFE6B, 0xFE6C, 0xFE6D, 0xFE6E, 0xFE6F,
-  /* 7 */ 0xFE70, 0xFE71, 0xFE72, 0xFE73, 0xFE74, 0xFE75, 0xFE76, 0xFE77,
-          0xFE78, 0xFE79, 0xFE7A, 0xFE7B, 0xFE7C, 0xFE7D, 0xFE7E, 0xFE7F,
-  /* 8 */ 0xFE80, 0xFE81, 0xFE82, 0xFE83, 0xFE84, 0xFE85, 0xFE86, 0xFE87,
-          0xFE88, 0xFE89, 0xFE8A, 0xFE8B, 0xFE8C, 0xFE8D, 0xFE8E, 0xFE8F,
-  /* 9 */ 0xFE90, 0xFE91, 0xFE92, 0xFE93, 0xFE94, 0xFE95, 0xFE96, 0xFE97,
-          0xFE98, 0xFE99, 0xFE9A, 0xFE9B, 0xFE9C, 0xFE9D, 0xFE9E, 0xFE9F,
-  /* A */ 0xFEA0, 0xFEA1, 0xFEA2, 0xFEA3, 0xFEA4, 0xFEA5, 0xFEA6, 0xFEA7,
-          0xFEA8, 0xFEA9, 0xFEAA, 0xFEAB, 0xFEAC, 0xFEAD, 0xFEAE, 0xFEAF,
-  /* B */ 0xFEB0, 0xFEB1, 0xFEB2, 0xFEB3, 0xFEB4, 0xFEB5, 0xFEB6, 0xFEB7,
-          0xFEB8, 0xFEB9, 0xFEBA, 0xFEBB, 0xFEBC, 0xFEBD, 0xFEBE, 0xFEBF,
-  /* C */ 0xFEC0, 0xFEC1, 0xFEC2, 0xFEC3, 0xFEC4, 0xFEC5, 0xFEC6, 0xFEC7,
-          0xFEC8, 0xFEC9, 0xFECA, 0xFECB, 0xFECC, 0xFECD, 0xFECE, 0xFECF,
-  /* D */ 0xFED0, 0xFED1, 0xFED2, 0xFED3, 0xFED4, 0xFED5, 0xFED6, 0xFED7,
-          0xFED8, 0xFED9, 0xFEDA, 0xFEDB, 0xFEDC, 0xFEDD, 0xFEDE, 0xFEDF,
-  /* E */ 0xFEE0, 0xFEE1, 0xFEE2, 0xFEE3, 0xFEE4, 0xFEE5, 0xFEE6, 0xFEE7,
-          0xFEE8, 0xFEE9, 0xFEEA, 0xFEEB, 0xFEEC, 0xFEED, 0xFEEE, 0xFEEF,
-  /* F */ 0xFEF0, 0xFEF1, 0xFEF2, 0xFEF3, 0xFEF4, 0xFEF5, 0xFEF6, 0xFEF7,
-          0xFEF8, 0xFEF9, 0xFEFA, 0xFEFB, 0xFEFC, 0xFEFD, 0xFEFE, 0x0000,
+    /* 0 */ 0xFE00, 0xFE01, 0xFE02, 0xFE03, 0xFE04, 0xFE05, 0xFE06, 0xFE07,
+    0xFE08, 0xFE09, 0xFE0A, 0xFE0B, 0xFE0C, 0xFE0D, 0xFE0E, 0xFE0F,
+    /* 1 */ 0xFE10, 0xFE11, 0xFE12, 0xFE13, 0xFE14, 0xFE15, 0xFE16, 0xFE17,
+    0xFE18, 0xFE19, 0xFE1A, 0xFE1B, 0xFE1C, 0xFE1D, 0xFE1E, 0xFE1F,
+    /* 2 */ 0xFE20, 0xFE21, 0xFE22, 0xFE23, 0xFE24, 0xFE25, 0xFE26, 0xFE27,
+    0xFE28, 0xFE29, 0xFE2A, 0xFE2B, 0xFE2C, 0xFE2D, 0xFE2E, 0xFE2F,
+    /* 3 */ 0xFE30, 0xFE31, 0xFE32, 0xFE33, 0xFE34, 0xFE35, 0xFE36, 0xFE37,
+    0xFE38, 0xFE39, 0xFE3A, 0xFE3B, 0xFE3C, 0xFE3D, 0xFE3E, 0xFE3F,
+    /* 4 */ 0xFE40, 0xFE41, 0xFE42, 0xFE43, 0xFE44, 0xFE45, 0xFE46, 0xFE47,
+    0xFE48, 0xFE49, 0xFE4A, 0xFE4B, 0xFE4C, 0xFE4D, 0xFE4E, 0xFE4F,
+    /* 5 */ 0xFE50, 0xFE51, 0xFE52, 0xFE53, 0xFE54, 0xFE55, 0xFE56, 0xFE57,
+    0xFE58, 0xFE59, 0xFE5A, 0xFE5B, 0xFE5C, 0xFE5D, 0xFE5E, 0xFE5F,
+    /* 6 */ 0xFE60, 0xFE61, 0xFE62, 0xFE63, 0xFE64, 0xFE65, 0xFE66, 0xFE67,
+    0xFE68, 0xFE69, 0xFE6A, 0xFE6B, 0xFE6C, 0xFE6D, 0xFE6E, 0xFE6F,
+    /* 7 */ 0xFE70, 0xFE71, 0xFE72, 0xFE73, 0xFE74, 0xFE75, 0xFE76, 0xFE77,
+    0xFE78, 0xFE79, 0xFE7A, 0xFE7B, 0xFE7C, 0xFE7D, 0xFE7E, 0xFE7F,
+    /* 8 */ 0xFE80, 0xFE81, 0xFE82, 0xFE83, 0xFE84, 0xFE85, 0xFE86, 0xFE87,
+    0xFE88, 0xFE89, 0xFE8A, 0xFE8B, 0xFE8C, 0xFE8D, 0xFE8E, 0xFE8F,
+    /* 9 */ 0xFE90, 0xFE91, 0xFE92, 0xFE93, 0xFE94, 0xFE95, 0xFE96, 0xFE97,
+    0xFE98, 0xFE99, 0xFE9A, 0xFE9B, 0xFE9C, 0xFE9D, 0xFE9E, 0xFE9F,
+    /* A */ 0xFEA0, 0xFEA1, 0xFEA2, 0xFEA3, 0xFEA4, 0xFEA5, 0xFEA6, 0xFEA7,
+    0xFEA8, 0xFEA9, 0xFEAA, 0xFEAB, 0xFEAC, 0xFEAD, 0xFEAE, 0xFEAF,
+    /* B */ 0xFEB0, 0xFEB1, 0xFEB2, 0xFEB3, 0xFEB4, 0xFEB5, 0xFEB6, 0xFEB7,
+    0xFEB8, 0xFEB9, 0xFEBA, 0xFEBB, 0xFEBC, 0xFEBD, 0xFEBE, 0xFEBF,
+    /* C */ 0xFEC0, 0xFEC1, 0xFEC2, 0xFEC3, 0xFEC4, 0xFEC5, 0xFEC6, 0xFEC7,
+    0xFEC8, 0xFEC9, 0xFECA, 0xFECB, 0xFECC, 0xFECD, 0xFECE, 0xFECF,
+    /* D */ 0xFED0, 0xFED1, 0xFED2, 0xFED3, 0xFED4, 0xFED5, 0xFED6, 0xFED7,
+    0xFED8, 0xFED9, 0xFEDA, 0xFEDB, 0xFEDC, 0xFEDD, 0xFEDE, 0xFEDF,
+    /* E */ 0xFEE0, 0xFEE1, 0xFEE2, 0xFEE3, 0xFEE4, 0xFEE5, 0xFEE6, 0xFEE7,
+    0xFEE8, 0xFEE9, 0xFEEA, 0xFEEB, 0xFEEC, 0xFEED, 0xFEEE, 0xFEEF,
+    /* F */ 0xFEF0, 0xFEF1, 0xFEF2, 0xFEF3, 0xFEF4, 0xFEF5, 0xFEF6, 0xFEF7,
+    0xFEF8, 0xFEF9, 0xFEFA, 0xFEFB, 0xFEFC, 0xFEFD, 0xFEFE, 0x0000,
 
-  // Table 10 (for high byte 0xFF)
+    // Table 10 (for high byte 0xFF)
 
-  /* 0 */ 0xFF00, 0xFF01, 0xFF02, 0xFF03, 0xFF04, 0xFF05, 0xFF06, 0xFF07,
-          0xFF08, 0xFF09, 0xFF0A, 0xFF0B, 0xFF0C, 0xFF0D, 0xFF0E, 0xFF0F,
-  /* 1 */ 0xFF10, 0xFF11, 0xFF12, 0xFF13, 0xFF14, 0xFF15, 0xFF16, 0xFF17,
-          0xFF18, 0xFF19, 0xFF1A, 0xFF1B, 0xFF1C, 0xFF1D, 0xFF1E, 0xFF1F,
-  /* 2 */ 0xFF20, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47,
-          0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F,
-  /* 3 */ 0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57,
-          0xFF58, 0xFF59, 0xFF5A, 0xFF3B, 0xFF3C, 0xFF3D, 0xFF3E, 0xFF3F,
-  /* 4 */ 0xFF40, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47,
-          0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F,
-  /* 5 */ 0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57,
-          0xFF58, 0xFF59, 0xFF5A, 0xFF5B, 0xFF5C, 0xFF5D, 0xFF5E, 0xFF5F,
-  /* 6 */ 0xFF60, 0xFF61, 0xFF62, 0xFF63, 0xFF64, 0xFF65, 0xFF66, 0xFF67,
-          0xFF68, 0xFF69, 0xFF6A, 0xFF6B, 0xFF6C, 0xFF6D, 0xFF6E, 0xFF6F,
-  /* 7 */ 0xFF70, 0xFF71, 0xFF72, 0xFF73, 0xFF74, 0xFF75, 0xFF76, 0xFF77,
-          0xFF78, 0xFF79, 0xFF7A, 0xFF7B, 0xFF7C, 0xFF7D, 0xFF7E, 0xFF7F,
-  /* 8 */ 0xFF80, 0xFF81, 0xFF82, 0xFF83, 0xFF84, 0xFF85, 0xFF86, 0xFF87,
-          0xFF88, 0xFF89, 0xFF8A, 0xFF8B, 0xFF8C, 0xFF8D, 0xFF8E, 0xFF8F,
-  /* 9 */ 0xFF90, 0xFF91, 0xFF92, 0xFF93, 0xFF94, 0xFF95, 0xFF96, 0xFF97,
-          0xFF98, 0xFF99, 0xFF9A, 0xFF9B, 0xFF9C, 0xFF9D, 0xFF9E, 0xFF9F,
-  /* A */ 0xFFA0, 0xFFA1, 0xFFA2, 0xFFA3, 0xFFA4, 0xFFA5, 0xFFA6, 0xFFA7,
-          0xFFA8, 0xFFA9, 0xFFAA, 0xFFAB, 0xFFAC, 0xFFAD, 0xFFAE, 0xFFAF,
-  /* B */ 0xFFB0, 0xFFB1, 0xFFB2, 0xFFB3, 0xFFB4, 0xFFB5, 0xFFB6, 0xFFB7,
-          0xFFB8, 0xFFB9, 0xFFBA, 0xFFBB, 0xFFBC, 0xFFBD, 0xFFBE, 0xFFBF,
-  /* C */ 0xFFC0, 0xFFC1, 0xFFC2, 0xFFC3, 0xFFC4, 0xFFC5, 0xFFC6, 0xFFC7,
-          0xFFC8, 0xFFC9, 0xFFCA, 0xFFCB, 0xFFCC, 0xFFCD, 0xFFCE, 0xFFCF,
-  /* D */ 0xFFD0, 0xFFD1, 0xFFD2, 0xFFD3, 0xFFD4, 0xFFD5, 0xFFD6, 0xFFD7,
-          0xFFD8, 0xFFD9, 0xFFDA, 0xFFDB, 0xFFDC, 0xFFDD, 0xFFDE, 0xFFDF,
-  /* E */ 0xFFE0, 0xFFE1, 0xFFE2, 0xFFE3, 0xFFE4, 0xFFE5, 0xFFE6, 0xFFE7,
-          0xFFE8, 0xFFE9, 0xFFEA, 0xFFEB, 0xFFEC, 0xFFED, 0xFFEE, 0xFFEF,
-  /* F */ 0xFFF0, 0xFFF1, 0xFFF2, 0xFFF3, 0xFFF4, 0xFFF5, 0xFFF6, 0xFFF7,
-          0xFFF8, 0xFFF9, 0xFFFA, 0xFFFB, 0xFFFC, 0xFFFD, 0xFFFE, 0xFFFF,
+    /* 0 */ 0xFF00, 0xFF01, 0xFF02, 0xFF03, 0xFF04, 0xFF05, 0xFF06, 0xFF07,
+    0xFF08, 0xFF09, 0xFF0A, 0xFF0B, 0xFF0C, 0xFF0D, 0xFF0E, 0xFF0F,
+    /* 1 */ 0xFF10, 0xFF11, 0xFF12, 0xFF13, 0xFF14, 0xFF15, 0xFF16, 0xFF17,
+    0xFF18, 0xFF19, 0xFF1A, 0xFF1B, 0xFF1C, 0xFF1D, 0xFF1E, 0xFF1F,
+    /* 2 */ 0xFF20, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47,
+    0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F,
+    /* 3 */ 0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57,
+    0xFF58, 0xFF59, 0xFF5A, 0xFF3B, 0xFF3C, 0xFF3D, 0xFF3E, 0xFF3F,
+    /* 4 */ 0xFF40, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47,
+    0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F,
+    /* 5 */ 0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57,
+    0xFF58, 0xFF59, 0xFF5A, 0xFF5B, 0xFF5C, 0xFF5D, 0xFF5E, 0xFF5F,
+    /* 6 */ 0xFF60, 0xFF61, 0xFF62, 0xFF63, 0xFF64, 0xFF65, 0xFF66, 0xFF67,
+    0xFF68, 0xFF69, 0xFF6A, 0xFF6B, 0xFF6C, 0xFF6D, 0xFF6E, 0xFF6F,
+    /* 7 */ 0xFF70, 0xFF71, 0xFF72, 0xFF73, 0xFF74, 0xFF75, 0xFF76, 0xFF77,
+    0xFF78, 0xFF79, 0xFF7A, 0xFF7B, 0xFF7C, 0xFF7D, 0xFF7E, 0xFF7F,
+    /* 8 */ 0xFF80, 0xFF81, 0xFF82, 0xFF83, 0xFF84, 0xFF85, 0xFF86, 0xFF87,
+    0xFF88, 0xFF89, 0xFF8A, 0xFF8B, 0xFF8C, 0xFF8D, 0xFF8E, 0xFF8F,
+    /* 9 */ 0xFF90, 0xFF91, 0xFF92, 0xFF93, 0xFF94, 0xFF95, 0xFF96, 0xFF97,
+    0xFF98, 0xFF99, 0xFF9A, 0xFF9B, 0xFF9C, 0xFF9D, 0xFF9E, 0xFF9F,
+    /* A */ 0xFFA0, 0xFFA1, 0xFFA2, 0xFFA3, 0xFFA4, 0xFFA5, 0xFFA6, 0xFFA7,
+    0xFFA8, 0xFFA9, 0xFFAA, 0xFFAB, 0xFFAC, 0xFFAD, 0xFFAE, 0xFFAF,
+    /* B */ 0xFFB0, 0xFFB1, 0xFFB2, 0xFFB3, 0xFFB4, 0xFFB5, 0xFFB6, 0xFFB7,
+    0xFFB8, 0xFFB9, 0xFFBA, 0xFFBB, 0xFFBC, 0xFFBD, 0xFFBE, 0xFFBF,
+    /* C */ 0xFFC0, 0xFFC1, 0xFFC2, 0xFFC3, 0xFFC4, 0xFFC5, 0xFFC6, 0xFFC7,
+    0xFFC8, 0xFFC9, 0xFFCA, 0xFFCB, 0xFFCC, 0xFFCD, 0xFFCE, 0xFFCF,
+    /* D */ 0xFFD0, 0xFFD1, 0xFFD2, 0xFFD3, 0xFFD4, 0xFFD5, 0xFFD6, 0xFFD7,
+    0xFFD8, 0xFFD9, 0xFFDA, 0xFFDB, 0xFFDC, 0xFFDD, 0xFFDE, 0xFFDF,
+    /* E */ 0xFFE0, 0xFFE1, 0xFFE2, 0xFFE3, 0xFFE4, 0xFFE5, 0xFFE6, 0xFFE7,
+    0xFFE8, 0xFFE9, 0xFFEA, 0xFFEB, 0xFFEC, 0xFFED, 0xFFEE, 0xFFEF,
+    /* F */ 0xFFF0, 0xFFF1, 0xFFF2, 0xFFF3, 0xFFF4, 0xFFF5, 0xFFF6, 0xFFF7,
+    0xFFF8, 0xFFF9, 0xFFFA, 0xFFFB, 0xFFFC, 0xFFFD, 0xFFFE, 0xFFFF,
 };
 
 // Returns the next non-ignorable codepoint within string starting from the
@@ -1157,12 +1152,10 @@
   int index2 = 0;
 
   for (;;) {
-    int codepoint1 = HFSReadNextNonIgnorableCodepoint(string1.data(),
-                                                      length1,
-                                                      &index1);
-    int codepoint2 = HFSReadNextNonIgnorableCodepoint(string2.data(),
-                                                      length2,
-                                                      &index2);
+    int codepoint1 =
+        HFSReadNextNonIgnorableCodepoint(string1.data(), length1, &index1);
+    int codepoint2 =
+        HFSReadNextNonIgnorableCodepoint(string2.data(), length2, &index2);
     if (codepoint1 != codepoint2)
       return (codepoint1 < codepoint2) ? -1 : 1;
     if (codepoint1 == 0) {
@@ -1175,14 +1168,9 @@
 
 StringType FilePath::GetHFSDecomposedForm(StringPieceType string) {
   StringType result;
-  ScopedCFTypeRef<CFStringRef> cfstring(
-      CFStringCreateWithBytesNoCopy(
-          NULL,
-          reinterpret_cast<const UInt8*>(string.data()),
-          string.length(),
-          kCFStringEncodingUTF8,
-          false,
-          kCFAllocatorNull));
+  ScopedCFTypeRef<CFStringRef> cfstring(CFStringCreateWithBytesNoCopy(
+      NULL, reinterpret_cast<const UInt8*>(string.data()), string.length(),
+      kCFStringEncodingUTF8, false, kCFAllocatorNull));
   if (cfstring) {
     // Query the maximum length needed to store the result. In most cases this
     // will overestimate the required space. The return value also already
@@ -1194,9 +1182,8 @@
     // (Increasing rather than decreasing it would clobber the string contents!)
     result.reserve(length);
     result.resize(length - 1);
-    Boolean success = CFStringGetFileSystemRepresentation(cfstring,
-                                                          &result[0],
-                                                          length);
+    Boolean success =
+        CFStringGetFileSystemRepresentation(cfstring, &result[0], length);
     if (success) {
       // Reduce result.length() to actual string length.
       result.resize(strlen(result.c_str()));
@@ -1223,25 +1210,13 @@
   // GetHFSDecomposedForm() returns an empty string in an error case.
   if (hfs1.empty() || hfs2.empty()) {
     NOTREACHED();
-    ScopedCFTypeRef<CFStringRef> cfstring1(
-        CFStringCreateWithBytesNoCopy(
-            NULL,
-            reinterpret_cast<const UInt8*>(string1.data()),
-            string1.length(),
-            kCFStringEncodingUTF8,
-            false,
-            kCFAllocatorNull));
-    ScopedCFTypeRef<CFStringRef> cfstring2(
-        CFStringCreateWithBytesNoCopy(
-            NULL,
-            reinterpret_cast<const UInt8*>(string2.data()),
-            string2.length(),
-            kCFStringEncodingUTF8,
-            false,
-            kCFAllocatorNull));
-    return CFStringCompare(cfstring1,
-                           cfstring2,
-                           kCFCompareCaseInsensitive);
+    ScopedCFTypeRef<CFStringRef> cfstring1(CFStringCreateWithBytesNoCopy(
+        NULL, reinterpret_cast<const UInt8*>(string1.data()), string1.length(),
+        kCFStringEncodingUTF8, false, kCFAllocatorNull));
+    ScopedCFTypeRef<CFStringRef> cfstring2(CFStringCreateWithBytesNoCopy(
+        NULL, reinterpret_cast<const UInt8*>(string2.data()), string2.length(),
+        kCFStringEncodingUTF8, false, kCFAllocatorNull));
+    return CFStringCompare(cfstring1, cfstring2, kCFCompareCaseInsensitive);
   }
 
   return HFSFastUnicodeCompare(hfs1, hfs2);
@@ -1253,8 +1228,8 @@
 int FilePath::CompareIgnoreCase(StringPieceType string1,
                                 StringPieceType string2) {
   // Specifically need null termianted strings for this API call.
-  int comparison = strcasecmp(string1.as_string().c_str(),
-                              string2.as_string().c_str());
+  int comparison =
+      strcasecmp(string1.as_string().c_str(), string2.as_string().c_str());
   if (comparison < 0)
     return -1;
   if (comparison > 0)
@@ -1264,7 +1239,6 @@
 
 #endif  // OS versions of CompareIgnoreCase()
 
-
 void FilePath::StripTrailingSeparatorsInternal() {
   // If there is no drive letter, start will be 1, which will prevent stripping
   // the leading separator if there is only one separator.  If there is a drive
@@ -1275,8 +1249,7 @@
 
   StringType::size_type last_stripped = StringType::npos;
   for (StringType::size_type pos = path_.length();
-       pos > start && IsSeparator(path_[pos - 1]);
-       --pos) {
+       pos > start && IsSeparator(path_[pos - 1]); --pos) {
     // If the string only has two separators and they're at the beginning,
     // don't strip them, unless the string began with more than two separators.
     if (pos != start + 1 || last_stripped == start + 2 ||
diff --git a/base/files/file_path.h b/base/files/file_path.h
index 8c153b4..63b21e8 100644
--- a/base/files/file_path.h
+++ b/base/files/file_path.h
@@ -191,9 +191,7 @@
   bool operator!=(const FilePath& that) const;
 
   // Required for some STL containers and operations
-  bool operator<(const FilePath& that) const {
-    return path_ < that.path_;
-  }
+  bool operator<(const FilePath& that) const { return path_ < that.path_; }
 
   const StringType& value() const { return path_; }
 
@@ -284,10 +282,10 @@
   // 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(
-      StringPieceType suffix) const WARN_UNUSED_RESULT;
-  FilePath InsertBeforeExtensionASCII(
-      StringPiece suffix) const WARN_UNUSED_RESULT;
+  FilePath InsertBeforeExtension(StringPieceType suffix) const
+      WARN_UNUSED_RESULT;
+  FilePath InsertBeforeExtensionASCII(StringPiece suffix) const
+      WARN_UNUSED_RESULT;
 
   // Adds |extension| to |file_name|. Returns the current FilePath if
   // |extension| is empty. Returns "" if BaseName() == "." or "..".
@@ -437,15 +435,14 @@
   StringType path_;
 };
 
-std::ostream& operator<<(std::ostream& out,
-                                     const FilePath& file_path);
+std::ostream& operator<<(std::ostream& out, const FilePath& file_path);
 
 }  // namespace base
 
 // Macros for string literal initialization of FilePath::CharType[], and for
 // using a FilePath::CharType[] in a printf-style format string.
 #if defined(OS_WIN)
-#define FILE_PATH_LITERAL(x) L ## x
+#define FILE_PATH_LITERAL(x) L##x
 #define PRFilePath "ls"
 #elif defined(OS_POSIX) || defined(OS_FUCHSIA)
 #define FILE_PATH_LITERAL(x) x
diff --git a/base/files/file_path_constants.cc b/base/files/file_path_constants.cc
index 0b74846..fc7d663 100644
--- a/base/files/file_path_constants.cc
+++ b/base/files/file_path_constants.cc
@@ -11,7 +11,7 @@
 
 #if defined(FILE_PATH_USES_WIN_SEPARATORS)
 const FilePath::CharType FilePath::kSeparators[] = FILE_PATH_LITERAL("\\/");
-#else  // FILE_PATH_USES_WIN_SEPARATORS
+#else   // FILE_PATH_USES_WIN_SEPARATORS
 const FilePath::CharType FilePath::kSeparators[] = FILE_PATH_LITERAL("/");
 #endif  // FILE_PATH_USES_WIN_SEPARATORS
 
diff --git a/base/files/file_posix.cc b/base/files/file_posix.cc
index 344621f..fcc10c6 100644
--- a/base/files/file_posix.cc
+++ b/base/files/file_posix.cc
@@ -26,11 +26,11 @@
 
 #if defined(OS_BSD) || defined(OS_MACOSX) || defined(OS_NACL) || \
     defined(OS_ANDROID) && __ANDROID_API__ < 21
-int CallFstat(int fd, stat_wrapper_t *sb) {
+int CallFstat(int fd, stat_wrapper_t* sb) {
   return fstat(fd, sb);
 }
 #else
-int CallFstat(int fd, stat_wrapper_t *sb) {
+int CallFstat(int fd, stat_wrapper_t* sb) {
   return fstat64(fd, sb);
 }
 #endif
@@ -52,9 +52,9 @@
   // http://pubs.opengroup.org/onlinepubs/9699919799/
 
   timespec ts_times[2];
-  ts_times[0].tv_sec  = times[0].tv_sec;
+  ts_times[0].tv_sec = times[0].tv_sec;
   ts_times[0].tv_nsec = times[0].tv_usec * 1000;
-  ts_times[1].tv_sec  = times[1].tv_sec;
+  ts_times[1].tv_sec = times[1].tv_sec;
   ts_times[1].tv_nsec = times[1].tv_usec * 1000;
 
   return futimens(file, ts_times);
@@ -126,20 +126,17 @@
 #error
 #endif
 
-  last_modified =
-      Time::FromTimeT(last_modified_sec) +
-      TimeDelta::FromMicroseconds(last_modified_nsec /
-                                  Time::kNanosecondsPerMicrosecond);
+  last_modified = Time::FromTimeT(last_modified_sec) +
+                  TimeDelta::FromMicroseconds(last_modified_nsec /
+                                              Time::kNanosecondsPerMicrosecond);
 
-  last_accessed =
-      Time::FromTimeT(last_accessed_sec) +
-      TimeDelta::FromMicroseconds(last_accessed_nsec /
-                                  Time::kNanosecondsPerMicrosecond);
+  last_accessed = Time::FromTimeT(last_accessed_sec) +
+                  TimeDelta::FromMicroseconds(last_accessed_nsec /
+                                              Time::kNanosecondsPerMicrosecond);
 
-  creation_time =
-      Time::FromTimeT(creation_time_sec) +
-      TimeDelta::FromMicroseconds(creation_time_nsec /
-                                  Time::kNanosecondsPerMicrosecond);
+  creation_time = Time::FromTimeT(creation_time_sec) +
+                  TimeDelta::FromMicroseconds(creation_time_nsec /
+                                              Time::kNanosecondsPerMicrosecond);
 }
 
 bool File::IsValid() const {
@@ -177,8 +174,8 @@
   int bytes_read = 0;
   int rv;
   do {
-    rv = HANDLE_EINTR(pread(file_.get(), data + bytes_read,
-                            size - bytes_read, offset + bytes_read));
+    rv = HANDLE_EINTR(pread(file_.get(), data + bytes_read, size - bytes_read,
+                            offset + bytes_read));
     if (rv <= 0)
       break;
 
@@ -249,8 +246,8 @@
   int bytes_written = 0;
   int rv;
   do {
-    rv = HANDLE_EINTR(write(file_.get(), data + bytes_written,
-                            size - bytes_written));
+    rv = HANDLE_EINTR(
+        write(file_.get(), data + bytes_written, size - bytes_written));
     if (rv <= 0)
       break;
 
@@ -399,10 +396,8 @@
     open_flags |= O_RDWR;
   } else if (flags & FLAG_WRITE) {
     open_flags |= O_WRONLY;
-  } else if (!(flags & FLAG_READ) &&
-             !(flags & FLAG_WRITE_ATTRIBUTES) &&
-             !(flags & FLAG_APPEND) &&
-             !(flags & FLAG_OPEN_ALWAYS)) {
+  } else if (!(flags & FLAG_READ) && !(flags & FLAG_WRITE_ATTRIBUTES) &&
+             !(flags & FLAG_APPEND) && !(flags & FLAG_OPEN_ALWAYS)) {
     NOTREACHED();
   }
 
@@ -423,7 +418,7 @@
     if (descriptor < 0) {
       open_flags |= O_CREAT;
       if (flags & FLAG_EXCLUSIVE_READ || flags & FLAG_EXCLUSIVE_WRITE)
-        open_flags |= O_EXCL;   // together with O_CREAT implies O_NOFOLLOW
+        open_flags |= O_EXCL;  // together with O_CREAT implies O_NOFOLLOW
 
       descriptor = HANDLE_EINTR(open(path.value().c_str(), open_flags, mode));
       if (descriptor >= 0)
diff --git a/base/files/file_util.cc b/base/files/file_util.cc
index 887139b..b30057e 100644
--- a/base/files/file_util.cc
+++ b/base/files/file_util.cc
@@ -69,8 +69,7 @@
     file1.read(buffer1, BUFFER_SIZE);
     file2.read(buffer2, BUFFER_SIZE);
 
-    if ((file1.eof() != file2.eof()) ||
-        (file1.gcount() != file2.gcount()) ||
+    if ((file1.eof() != file2.eof()) || (file1.gcount() != file2.gcount()) ||
         (memcmp(buffer1, buffer2, static_cast<size_t>(file1.gcount())))) {
       file1.close();
       file2.close();
@@ -98,8 +97,7 @@
     getline(file2, line2);
 
     // Check for mismatched EOF states, or any error state.
-    if ((file1.eof() != file2.eof()) ||
-        file1.bad() || file2.bad()) {
+    if ((file1.eof() != file2.eof()) || file1.bad() || file2.bad()) {
       return false;
     }
 
@@ -194,7 +192,7 @@
 #if !defined(OS_NACL_NONSFI)
 bool IsDirectoryEmpty(const FilePath& dir_path) {
   FileEnumerator files(dir_path, false,
-      FileEnumerator::FILES | FileEnumerator::DIRECTORIES);
+                       FileEnumerator::FILES | FileEnumerator::DIRECTORIES);
   if (files.Next().empty())
     return true;
   return false;
diff --git a/base/files/file_util.h b/base/files/file_util.h
index 1401108..6176073 100644
--- a/base/files/file_util.h
+++ b/base/files/file_util.h
@@ -90,8 +90,8 @@
 // Returns true on success, leaving *error unchanged.
 // Returns false on failure and sets *error appropriately, if it is non-NULL.
 bool ReplaceFile(const FilePath& from_path,
-                             const FilePath& to_path,
-                             File::Error* error);
+                 const FilePath& to_path,
+                 File::Error* error);
 
 // Copies a single file. Use CopyDirectory() to copy directories.
 // This function fails if either path contains traversal components ('..').
@@ -125,14 +125,14 @@
 //
 // If you only need to copy a file use CopyFile, it's faster.
 bool CopyDirectory(const FilePath& from_path,
-                               const FilePath& to_path,
-                               bool recursive);
+                   const FilePath& to_path,
+                   bool recursive);
 
 // Like CopyDirectory() except trying to overwrite an existing file will not
 // work and will return false.
 bool CopyDirectoryExcl(const FilePath& from_path,
-                                   const FilePath& to_path,
-                                   bool recursive);
+                       const FilePath& to_path,
+                       bool recursive);
 
 // Returns true if the given path exists on the local filesystem,
 // false otherwise.
@@ -146,13 +146,11 @@
 
 // Returns true if the contents of the two files given are equal, false
 // otherwise.  If either file can't be read, returns false.
-bool ContentsEqual(const FilePath& filename1,
-                               const FilePath& filename2);
+bool ContentsEqual(const FilePath& filename1, const FilePath& filename2);
 
 // Returns true if the contents of the two text files given are equal, false
 // otherwise.  This routine treats "\r\n" and "\n" as equivalent.
-bool TextContentsEqual(const FilePath& filename1,
-                                   const FilePath& filename2);
+bool TextContentsEqual(const FilePath& filename1, const FilePath& filename2);
 
 // Reads the file at |path| into |contents| and returns true on success and
 // false on error.  For security reasons, a |path| containing path traversal
@@ -173,8 +171,8 @@
 // |contents| may be NULL, in which case this function is useful for its side
 // effect of priming the disk cache (could be used for unit tests).
 bool ReadFileToStringWithMaxSize(const FilePath& path,
-                                             std::string* contents,
-                                             size_t max_size);
+                                 std::string* contents,
+                                 size_t max_size);
 
 #if defined(OS_POSIX) || defined(OS_FUCHSIA)
 
@@ -186,8 +184,7 @@
 // Performs the same function as CreateAndOpenTemporaryFileInDir(), but returns
 // the file-descriptor directly, rather than wrapping it into a FILE. Returns
 // -1 on failure.
-int CreateAndOpenFdForTemporaryFileInDir(const FilePath& dir,
-                                                     FilePath* path);
+int CreateAndOpenFdForTemporaryFileInDir(const FilePath& dir, FilePath* path);
 
 #endif  // OS_POSIX || OS_FUCHSIA
 
@@ -195,8 +192,7 @@
 
 // Creates a symbolic link at |symlink| pointing to |target|.  Returns
 // false on failure.
-bool CreateSymbolicLink(const FilePath& target,
-                                    const FilePath& symlink);
+bool CreateSymbolicLink(const FilePath& target, const FilePath& symlink);
 
 // Reads the given |symlink| and returns where it points to in |target|.
 // Returns false upon failure.
@@ -204,19 +200,19 @@
 
 // Bits and masks of the file permission.
 enum FilePermissionBits {
-  FILE_PERMISSION_MASK              = S_IRWXU | S_IRWXG | S_IRWXO,
-  FILE_PERMISSION_USER_MASK         = S_IRWXU,
-  FILE_PERMISSION_GROUP_MASK        = S_IRWXG,
-  FILE_PERMISSION_OTHERS_MASK       = S_IRWXO,
+  FILE_PERMISSION_MASK = S_IRWXU | S_IRWXG | S_IRWXO,
+  FILE_PERMISSION_USER_MASK = S_IRWXU,
+  FILE_PERMISSION_GROUP_MASK = S_IRWXG,
+  FILE_PERMISSION_OTHERS_MASK = S_IRWXO,
 
-  FILE_PERMISSION_READ_BY_USER      = S_IRUSR,
-  FILE_PERMISSION_WRITE_BY_USER     = S_IWUSR,
-  FILE_PERMISSION_EXECUTE_BY_USER   = S_IXUSR,
-  FILE_PERMISSION_READ_BY_GROUP     = S_IRGRP,
-  FILE_PERMISSION_WRITE_BY_GROUP    = S_IWGRP,
-  FILE_PERMISSION_EXECUTE_BY_GROUP  = S_IXGRP,
-  FILE_PERMISSION_READ_BY_OTHERS    = S_IROTH,
-  FILE_PERMISSION_WRITE_BY_OTHERS   = S_IWOTH,
+  FILE_PERMISSION_READ_BY_USER = S_IRUSR,
+  FILE_PERMISSION_WRITE_BY_USER = S_IWUSR,
+  FILE_PERMISSION_EXECUTE_BY_USER = S_IXUSR,
+  FILE_PERMISSION_READ_BY_GROUP = S_IRGRP,
+  FILE_PERMISSION_WRITE_BY_GROUP = S_IWGRP,
+  FILE_PERMISSION_EXECUTE_BY_GROUP = S_IXGRP,
+  FILE_PERMISSION_READ_BY_OTHERS = S_IROTH,
+  FILE_PERMISSION_WRITE_BY_OTHERS = S_IWOTH,
   FILE_PERMISSION_EXECUTE_BY_OTHERS = S_IXOTH,
 };
 
@@ -231,7 +227,7 @@
 // Returns true iff |executable| can be found in any directory specified by the
 // environment variable in |env|.
 bool ExecutableExistsInPath(Environment* env,
-                                        const FilePath::StringType& executable);
+                            const FilePath::StringType& executable);
 
 #endif  // OS_POSIX
 
@@ -260,8 +256,7 @@
 bool CreateTemporaryFile(FilePath* path);
 
 // Same as CreateTemporaryFile but the file is created in |dir|.
-bool CreateTemporaryFileInDir(const FilePath& dir,
-                                          FilePath* temp_file);
+bool CreateTemporaryFileInDir(const FilePath& dir, FilePath* temp_file);
 
 // Create and open a temporary file.  File is opened for read/write.
 // The full path is placed in |path|.
@@ -269,30 +264,28 @@
 FILE* CreateAndOpenTemporaryFile(FilePath* path);
 
 // Similar to CreateAndOpenTemporaryFile, but the file is created in |dir|.
-FILE* CreateAndOpenTemporaryFileInDir(const FilePath& dir,
-                                                  FilePath* path);
+FILE* CreateAndOpenTemporaryFileInDir(const FilePath& dir, FilePath* path);
 
 // Create a new directory. If prefix is provided, the new directory name is in
 // the format of prefixyyyy.
 // NOTE: prefix is ignored in the POSIX implementation.
 // If success, return true and output the full path of the directory created.
 bool CreateNewTempDirectory(const FilePath::StringType& prefix,
-                                        FilePath* new_temp_path);
+                            FilePath* new_temp_path);
 
 // Create a directory within another directory.
 // Extra characters will be appended to |prefix| to ensure that the
 // new directory does not have the same name as an existing directory.
 bool CreateTemporaryDirInDir(const FilePath& base_dir,
-                                         const FilePath::StringType& prefix,
-                                         FilePath* new_dir);
+                             const FilePath::StringType& prefix,
+                             FilePath* new_dir);
 
 // Creates a directory, as well as creating any parent directories, if they
 // don't exist. Returns 'true' on successful creation, or if the directory
 // already exists.  The directory is only readable by the current user.
 // Returns true on success, leaving *error unchanged.
 // Returns false on failure and sets *error appropriately, if it is non-NULL.
-bool CreateDirectoryAndGetError(const FilePath& full_path,
-                                            File::Error* error);
+bool CreateDirectoryAndGetError(const FilePath& full_path, File::Error* error);
 
 // Backward-compatible convenience method for the above.
 bool CreateDirectory(const FilePath& full_path);
@@ -314,14 +307,13 @@
 // return in |drive_letter_path| the equivalent path that starts with
 // a drive letter ("C:\...").  Return false if no such path exists.
 bool DevicePathToDriveLetterPath(const FilePath& device_path,
-                                             FilePath* drive_letter_path);
+                                 FilePath* drive_letter_path);
 
 // Given an existing file in |path|, set |real_path| to the path
 // in native NT format, of the form "\Device\HarddiskVolumeXX\..".
 // Returns false if the path can not be found. Empty files cannot
 // be resolved with this function.
-bool NormalizeToNativeFilePath(const FilePath& path,
-                                           FilePath* nt_path);
+bool NormalizeToNativeFilePath(const FilePath& path, FilePath* nt_path);
 #endif
 
 // This function will return if the given file is a symlink or not.
@@ -332,8 +324,8 @@
 
 // Sets the time of the last access and the time of the last modification.
 bool TouchFile(const FilePath& path,
-                           const Time& last_accessed,
-                           const Time& last_modified);
+               const Time& last_accessed,
+               const Time& last_modified);
 
 // Wrapper for fopen-like calls. Returns non-NULL FILE* on success. The
 // underlying file descriptor (POSIX) or handle (Windows) is unconditionally
@@ -357,8 +349,7 @@
 
 // Writes the given buffer into the file, overwriting any data that was
 // previously there.  Returns the number of bytes written, or -1 on error.
-int WriteFile(const FilePath& filename, const char* data,
-                          int size);
+int WriteFile(const FilePath& filename, const char* data, int size);
 
 #if defined(OS_POSIX) || defined(OS_FUCHSIA)
 // Appends |data| to |fd|. Does not close |fd| when done.  Returns true iff
@@ -368,9 +359,7 @@
 
 // Appends |data| to |filename|.  Returns true iff |size| bytes of |data| were
 // written to |filename|.
-bool AppendToFile(const FilePath& filename,
-                              const char* data,
-                              int size);
+bool AppendToFile(const FilePath& filename, const char* data, int size);
 
 // Gets the current working directory for the process.
 bool GetCurrentDirectory(FilePath* path);
@@ -383,7 +372,7 @@
 // a number, -1 is returned. If |suffix| is not empty, also checks the
 // existence of it with the given suffix.
 int GetUniquePathNumber(const FilePath& path,
-                                    const FilePath::StringType& suffix);
+                        const FilePath::StringType& suffix);
 
 // Sets the given |fd| to non-blocking mode.
 // Returns true if it was able to set it in the non-blocking mode, otherwise
@@ -414,9 +403,9 @@
 // This is useful for checking that a config file is administrator-controlled.
 // |base| must contain |path|.
 bool VerifyPathControlledByUser(const base::FilePath& base,
-                                            const base::FilePath& path,
-                                            uid_t owner_uid,
-                                            const std::set<gid_t>& group_gids);
+                                const base::FilePath& path,
+                                uid_t owner_uid,
+                                const std::set<gid_t>& group_gids);
 #endif  // defined(OS_POSIX) || defined(OS_FUCHSIA)
 
 #if defined(OS_MACOSX) && !defined(OS_IOS)
@@ -437,15 +426,15 @@
 #if defined(OS_LINUX) || defined(OS_AIX)
 // Broad categories of file systems as returned by statfs() on Linux.
 enum FileSystemType {
-  FILE_SYSTEM_UNKNOWN,  // statfs failed.
-  FILE_SYSTEM_0,        // statfs.f_type == 0 means unknown, may indicate AFS.
-  FILE_SYSTEM_ORDINARY,       // on-disk filesystem like ext2
+  FILE_SYSTEM_UNKNOWN,   // statfs failed.
+  FILE_SYSTEM_0,         // statfs.f_type == 0 means unknown, may indicate AFS.
+  FILE_SYSTEM_ORDINARY,  // on-disk filesystem like ext2
   FILE_SYSTEM_NFS,
   FILE_SYSTEM_SMB,
   FILE_SYSTEM_CODA,
-  FILE_SYSTEM_MEMORY,         // in-memory file system
-  FILE_SYSTEM_CGROUP,         // cgroup control.
-  FILE_SYSTEM_OTHER,          // any other value.
+  FILE_SYSTEM_MEMORY,  // in-memory file system
+  FILE_SYSTEM_CGROUP,  // cgroup control.
+  FILE_SYSTEM_OTHER,   // any other value.
   FILE_SYSTEM_TYPE_COUNT
 };
 
@@ -469,16 +458,14 @@
 
 // Same as Move but allows paths with traversal components.
 // Use only with extreme care.
-bool MoveUnsafe(const FilePath& from_path,
-                            const FilePath& to_path);
+bool MoveUnsafe(const FilePath& from_path, const FilePath& to_path);
 
 #if defined(OS_WIN)
 // Copy from_path to to_path recursively and then delete from_path recursively.
 // Returns true if all operations succeed.
 // This function simulates Move(), but unlike Move() it works across volumes.
 // This function is not transactional.
-bool CopyAndDeleteDirectory(const FilePath& from_path,
-                                        const FilePath& to_path);
+bool CopyAndDeleteDirectory(const FilePath& from_path, const FilePath& to_path);
 #endif  // defined(OS_WIN)
 
 }  // namespace internal
diff --git a/base/files/file_util_mac.mm b/base/files/file_util_mac.mm
index 0b2e2a0..35fd27a 100644
--- a/base/files/file_util_mac.mm
+++ b/base/files/file_util_mac.mm
@@ -19,8 +19,8 @@
 bool CopyFile(const FilePath& from_path, const FilePath& to_path) {
   if (from_path.ReferencesParent() || to_path.ReferencesParent())
     return false;
-  return (copyfile(from_path.value().c_str(),
-                   to_path.value().c_str(), NULL, COPYFILE_DATA) == 0);
+  return (copyfile(from_path.value().c_str(), to_path.value().c_str(), NULL,
+                   COPYFILE_DATA) == 0);
 }
 
 bool GetTempDir(base::FilePath* path) {
diff --git a/base/files/file_util_posix.cc b/base/files/file_util_posix.cc
index 6fb43bd..83cace9 100644
--- a/base/files/file_util_posix.cc
+++ b/base/files/file_util_posix.cc
@@ -76,8 +76,7 @@
                                         const std::set<gid_t>& group_gids) {
   stat_wrapper_t stat_info;
   if (CallLstat(path.value().c_str(), &stat_info) != 0) {
-    DPLOG(ERROR) << "Failed to get information on path "
-                 << path.value();
+    DPLOG(ERROR) << "Failed to get information on path " << path.value();
     return false;
   }
 
@@ -297,11 +296,11 @@
       open_flags |= O_EXCL;
     else
       open_flags |= O_TRUNC | O_NONBLOCK;
-    // Each platform has different default file opening modes for CopyFile which
-    // we want to replicate here. On OS X, we use copyfile(3) which takes the
-    // source file's permissions into account. On the other platforms, we just
-    // use the base::File constructor. On Chrome OS, base::File uses a different
-    // set of permissions than it does on other POSIX platforms.
+// Each platform has different default file opening modes for CopyFile which
+// we want to replicate here. On OS X, we use copyfile(3) which takes the
+// source file's permissions into account. On the other platforms, we just
+// use the base::File constructor. On Chrome OS, base::File uses a different
+// set of permissions than it does on other POSIX platforms.
 #if defined(OS_MACOSX)
     int mode = 0600 | (stat_at_use.st_mode & 0177);
 #else
@@ -367,8 +366,8 @@
   stack<std::string> directories;
   directories.push(path.value());
   FileEnumerator traversal(path, true,
-      FileEnumerator::FILES | FileEnumerator::DIRECTORIES |
-      FileEnumerator::SHOW_SYM_LINKS);
+                           FileEnumerator::FILES | FileEnumerator::DIRECTORIES |
+                               FileEnumerator::SHOW_SYM_LINKS);
   for (FilePath current = traversal.Next(); !current.empty();
        current = traversal.Next()) {
     if (traversal.GetInfo().IsDirectory())
@@ -503,8 +502,8 @@
                         const FilePath& symlink_path) {
   DCHECK(!symlink_path.empty());
   DCHECK(!target_path.empty());
-  return ::symlink(target_path.value().c_str(),
-                   symlink_path.value().c_str()) != -1;
+  return ::symlink(target_path.value().c_str(), symlink_path.value().c_str()) !=
+         -1;
 }
 
 bool ReadSymbolicLink(const FilePath& symlink_path, FilePath* target_path) {
@@ -535,8 +534,7 @@
   return true;
 }
 
-bool SetPosixFilePermissions(const FilePath& path,
-                             int mode) {
+bool SetPosixFilePermissions(const FilePath& path, int mode) {
   DCHECK_EQ(mode & ~FILE_PERMISSION_MASK, 0);
 
   // Calls stat() so that we can preserve the higher bits like S_ISGID.
@@ -668,15 +666,14 @@
   return CreateTemporaryDirInDirImpl(tmpdir, TempFileName(), new_temp_path);
 }
 
-bool CreateDirectoryAndGetError(const FilePath& full_path,
-                                File::Error* error) {
+bool CreateDirectoryAndGetError(const FilePath& full_path, File::Error* error) {
   std::vector<FilePath> subpaths;
 
   // Collect a list of all parent directories.
   FilePath last_path = full_path;
   subpaths.push_back(full_path);
-  for (FilePath path = full_path.DirName();
-       path.value() != last_path.value(); path = path.DirName()) {
+  for (FilePath path = full_path.DirName(); path.value() != last_path.value();
+       path = path.DirName()) {
     subpaths.push_back(path);
     last_path = path;
   }
@@ -800,9 +797,8 @@
   ssize_t bytes_written_total = 0;
   for (ssize_t bytes_written_partial = 0; bytes_written_total < size;
        bytes_written_total += bytes_written_partial) {
-    bytes_written_partial =
-        HANDLE_EINTR(write(fd, data + bytes_written_total,
-                           size - bytes_written_total));
+    bytes_written_partial = HANDLE_EINTR(
+        write(fd, data + bytes_written_total, size - bytes_written_total));
     if (bytes_written_partial < 0)
       return false;
   }
@@ -850,9 +846,9 @@
                                 uid_t owner_uid,
                                 const std::set<gid_t>& group_gids) {
   if (base != path && !base.IsParent(path)) {
-     DLOG(ERROR) << "|base| must be a subdirectory of |path|.  base = \""
-                 << base.value() << "\", path = \"" << path.value() << "\"";
-     return false;
+    DLOG(ERROR) << "|base| must be a subdirectory of |path|.  base = \""
+                << base.value() << "\", path = \"" << path.value() << "\"";
+    return false;
   }
 
   std::vector<FilePath::StringType> base_components;
@@ -877,8 +873,8 @@
 
   for (; ip != path_components.end(); ++ip) {
     current_path = current_path.Append(*ip);
-    if (!VerifySpecificPathControlledByUser(
-            current_path, owner_uid, group_gids))
+    if (!VerifySpecificPathControlledByUser(current_path, owner_uid,
+                                            group_gids))
       return false;
   }
   return true;
@@ -890,14 +886,11 @@
   const FilePath kFileSystemRoot("/");
 
   // The name of the administrator group on mac os.
-  const char* const kAdminGroupNames[] = {
-    "admin",
-    "wheel"
-  };
+  const char* const kAdminGroupNames[] = {"admin", "wheel"};
 
   std::set<gid_t> allowed_group_ids;
   for (int i = 0, ie = arraysize(kAdminGroupNames); i < ie; ++i) {
-    struct group *group_record = getgrnam(kAdminGroupNames[i]);
+    struct group* group_record = getgrnam(kAdminGroupNames[i]);
     if (!group_record) {
       DPLOG(ERROR) << "Could not get the group ID of group \""
                    << kAdminGroupNames[i] << "\".";
@@ -907,8 +900,8 @@
     allowed_group_ids.insert(group_record->gr_gid);
   }
 
-  return VerifyPathControlledByUser(
-      kFileSystemRoot, path, kRootUid, allowed_group_ids);
+  return VerifyPathControlledByUser(kFileSystemRoot, path, kRootUid,
+                                    allowed_group_ids);
 }
 #endif  // defined(OS_MACOSX) && !defined(OS_IOS)
 
diff --git a/base/files/file_util_win.cc b/base/files/file_util_win.cc
index d59b7e4..48190ad 100644
--- a/base/files/file_util_win.cc
+++ b/base/files/file_util_win.cc
@@ -5,6 +5,7 @@
 #include "base/files/file_util.h"
 
 #include <windows.h>
+
 #include <io.h>
 #include <psapi.h>
 #include <shellapi.h>
@@ -326,8 +327,8 @@
     return false;
 
   return MoveFileEx(path.value().c_str(), NULL,
-                    MOVEFILE_DELAY_UNTIL_REBOOT |
-                        MOVEFILE_REPLACE_EXISTING) != FALSE;
+                    MOVEFILE_DELAY_UNTIL_REBOOT | MOVEFILE_REPLACE_EXISTING) !=
+         FALSE;
 }
 
 bool ReplaceFile(const FilePath& from_path,
@@ -376,8 +377,8 @@
 
 bool PathIsWritable(const FilePath& path) {
   HANDLE dir =
-      CreateFile(path.value().c_str(), FILE_ADD_FILE, kFileShareAll,
-                 NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
+      CreateFile(path.value().c_str(), FILE_ADD_FILE, kFileShareAll, NULL,
+                 OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
 
   if (dir == INVALID_HANDLE_VALUE)
     return false;
@@ -528,8 +529,7 @@
   return CreateTemporaryDirInDir(system_temp_dir, prefix, new_temp_path);
 }
 
-bool CreateDirectoryAndGetError(const FilePath& full_path,
-                                File::Error* error) {
+bool CreateDirectoryAndGetError(const FilePath& full_path, File::Error* error) {
   // If the path exists, we've succeeded if it's a directory, failed otherwise.
   const wchar_t* full_path_str = full_path.value().c_str();
   DWORD fileattr = ::GetFileAttributes(full_path_str);
@@ -622,14 +622,16 @@
       FilePath device_path(device_path_as_string);
       if (device_path == nt_device_path ||
           device_path.IsParent(nt_device_path)) {
-        *out_drive_letter_path = FilePath(drive +
-            nt_device_path.value().substr(wcslen(device_path_as_string)));
+        *out_drive_letter_path =
+            FilePath(drive + nt_device_path.value().substr(
+                                 wcslen(device_path_as_string)));
         return true;
       }
     }
     // Move to the next drive letter string, which starts one
     // increment after the '\0' that terminates the current string.
-    while (*drive_map_ptr++) {}
+    while (*drive_map_ptr++) {
+    }
   }
 
   // No drive matched.  The path does not start with a device junction
@@ -644,14 +646,9 @@
   // code below to a call to GetFinalPathNameByHandle().  The method this
   // function uses is explained in the following msdn article:
   // http://msdn.microsoft.com/en-us/library/aa366789(VS.85).aspx
-  win::ScopedHandle file_handle(
-      ::CreateFile(path.value().c_str(),
-                   GENERIC_READ,
-                   kFileShareAll,
-                   NULL,
-                   OPEN_EXISTING,
-                   FILE_ATTRIBUTE_NORMAL,
-                   NULL));
+  win::ScopedHandle file_handle(::CreateFile(path.value().c_str(), GENERIC_READ,
+                                             kFileShareAll, NULL, OPEN_EXISTING,
+                                             FILE_ATTRIBUTE_NORMAL, NULL));
   if (!file_handle.IsValid())
     return false;
 
@@ -659,18 +656,15 @@
   // we only map the first byte, and need direct access to the handle. You can
   // not map an empty file, this call fails in that case.
   win::ScopedHandle file_map_handle(
-      ::CreateFileMapping(file_handle.Get(),
-                          NULL,
-                          PAGE_READONLY,
-                          0,
+      ::CreateFileMapping(file_handle.Get(), NULL, PAGE_READONLY, 0,
                           1,  // Just one byte.  No need to look at the data.
                           NULL));
   if (!file_map_handle.IsValid())
     return false;
 
   // Use a view of the file to get the path to the file.
-  void* file_view = MapViewOfFile(file_map_handle.Get(),
-                                  FILE_MAP_READ, 0, 0, 1);
+  void* file_view =
+      MapViewOfFile(file_map_handle.Get(), FILE_MAP_READ, 0, 0, 1);
   if (!file_view)
     return false;
 
@@ -700,8 +694,8 @@
 
 bool GetFileInfo(const FilePath& file_path, File::Info* results) {
   WIN32_FILE_ATTRIBUTE_DATA attr;
-  if (!GetFileAttributesEx(file_path.value().c_str(),
-                           GetFileExInfoStandard, &attr)) {
+  if (!GetFileAttributesEx(file_path.value().c_str(), GetFileExInfoStandard,
+                           &attr)) {
     return false;
   }
 
@@ -745,12 +739,9 @@
 }
 
 int ReadFile(const FilePath& filename, char* data, int max_size) {
-  win::ScopedHandle file(CreateFile(filename.value().c_str(),
-                                    GENERIC_READ,
-                                    FILE_SHARE_READ | FILE_SHARE_WRITE,
-                                    NULL,
-                                    OPEN_EXISTING,
-                                    FILE_FLAG_SEQUENTIAL_SCAN,
+  win::ScopedHandle file(CreateFile(filename.value().c_str(), GENERIC_READ,
+                                    FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
+                                    OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN,
                                     NULL));
   if (!file.IsValid())
     return -1;
@@ -790,13 +781,8 @@
 }
 
 bool AppendToFile(const FilePath& filename, const char* data, int size) {
-  win::ScopedHandle file(CreateFile(filename.value().c_str(),
-                                    FILE_APPEND_DATA,
-                                    0,
-                                    NULL,
-                                    OPEN_EXISTING,
-                                    0,
-                                    NULL));
+  win::ScopedHandle file(CreateFile(filename.value().c_str(), FILE_APPEND_DATA,
+                                    0, NULL, OPEN_EXISTING, 0, NULL));
   if (!file.IsValid()) {
     return false;
   }
@@ -830,8 +816,7 @@
 int GetMaximumPathComponentLength(const FilePath& path) {
   wchar_t volume_path[MAX_PATH];
   if (!GetVolumePathNameW(path.NormalizePathSeparators().value().c_str(),
-                          volume_path,
-                          arraysize(volume_path))) {
+                          volume_path, arraysize(volume_path))) {
     return -1;
   }
 
diff --git a/base/files/file_win.cc b/base/files/file_win.cc
index e922ad8..401ac33 100644
--- a/base/files/file_win.cc
+++ b/base/files/file_win.cc
@@ -226,7 +226,7 @@
                          GetPlatformFile(),
                          GetCurrentProcess(),  // hTargetProcessHandle
                          &other_handle,
-                         0,  // dwDesiredAccess ignored due to SAME_ACCESS
+                         0,      // dwDesiredAccess ignored due to SAME_ACCESS
                          FALSE,  // !bInheritHandle
                          DUPLICATE_SAME_ACCESS)) {
     return File(GetLastFileError());
@@ -355,8 +355,8 @@
   if (flags & FLAG_SEQUENTIAL_SCAN)
     create_flags |= FILE_FLAG_SEQUENTIAL_SCAN;
 
-  file_.Set(CreateFile(path.value().c_str(), access, sharing, NULL,
-                       disposition, create_flags, NULL));
+  file_.Set(CreateFile(path.value().c_str(), access, sharing, NULL, disposition,
+                       create_flags, NULL));
 
   if (file_.IsValid()) {
     error_details_ = FILE_OK;
diff --git a/base/files/scoped_file.h b/base/files/scoped_file.h
index c1a2988..f262f18 100644
--- a/base/files/scoped_file.h
+++ b/base/files/scoped_file.h
@@ -19,9 +19,7 @@
 
 #if defined(OS_POSIX) || defined(OS_FUCHSIA)
 struct ScopedFDCloseTraits {
-  static int InvalidValue() {
-    return -1;
-  }
+  static int InvalidValue() { return -1; }
   static void Free(int fd);
 };
 #endif
diff --git a/base/gtest_prod_util.h b/base/gtest_prod_util.h
index 6df62e2..664dded 100644
--- a/base/gtest_prod_util.h
+++ b/base/gtest_prod_util.h
@@ -6,11 +6,11 @@
 #define BASE_GTEST_PROD_UTIL_H_
 
 // TODO: Remove me.
-#define FRIEND_TEST_ALL_PREFIXES(test_case_name, test_name)                    \
+#define FRIEND_TEST_ALL_PREFIXES(test_case_name, test_name) \
   friend class test_case_name##test_name
 
 // TODO: Remove me.
-#define FORWARD_DECLARE_TEST(test_case_name, test_name)                        \
+#define FORWARD_DECLARE_TEST(test_case_name, test_name) \
   class test_case_name##test_name
 
 #endif  // BASE_GTEST_PROD_UTIL_H_
diff --git a/base/json/json_file_value_serializer.cc b/base/json/json_file_value_serializer.cc
index b0974c0..ac3ba7b 100644
--- a/base/json/json_file_value_serializer.cc
+++ b/base/json/json_file_value_serializer.cc
@@ -18,8 +18,7 @@
 
 JSONFileValueSerializer::JSONFileValueSerializer(
     const base::FilePath& json_file_path)
-    : json_file_path_(json_file_path) {
-}
+    : json_file_path_(json_file_path) {}
 
 JSONFileValueSerializer::~JSONFileValueSerializer() = default;
 
@@ -37,9 +36,9 @@
   std::string json_string;
   JSONStringValueSerializer serializer(&json_string);
   serializer.set_pretty_print(true);
-  bool result = omit_binary_values ?
-      serializer.SerializeAndOmitBinaryValues(root) :
-      serializer.Serialize(root);
+  bool result = omit_binary_values
+                    ? serializer.SerializeAndOmitBinaryValues(root)
+                    : serializer.Serialize(root);
   if (!result)
     return false;
 
diff --git a/base/json/json_file_value_serializer.h b/base/json/json_file_value_serializer.h
index db243b7..b260543 100644
--- a/base/json/json_file_value_serializer.h
+++ b/base/json/json_file_value_serializer.h
@@ -99,4 +99,3 @@
 };
 
 #endif  // BASE_JSON_JSON_FILE_VALUE_SERIALIZER_H_
-
diff --git a/base/json/json_parser.cc b/base/json/json_parser.cc
index e6483ee..713f692 100644
--- a/base/json/json_parser.cc
+++ b/base/json/json_parser.cc
@@ -35,9 +35,7 @@
     ++(*depth_);
     DCHECK_LE(*depth_, max_depth_);
   }
-  ~StackMarker() {
-    --(*depth_);
-  }
+  ~StackMarker() { --(*depth_); }
 
   bool IsTooDeep() const { return *depth_ >= max_depth_; }
 
@@ -112,7 +110,7 @@
 
 std::string JSONParser::GetErrorMessage() const {
   return FormatErrorMessage(error_line_, error_column_,
-      JSONReader::ErrorCodeToString(error_code_));
+                            JSONReader::ErrorCodeToString(error_code_));
 }
 
 int JSONParser::error_line() const {
@@ -454,8 +452,7 @@
   while (PeekChar()) {
     uint32_t next_char = 0;
     if (!ReadUnicodeCharacter(input_.data(),
-                              static_cast<int32_t>(input_.length()),
-                              &index_,
+                              static_cast<int32_t>(input_.length()), &index_,
                               &next_char) ||
         !IsValidCharacter(next_char)) {
       if ((options_ & JSON_REPLACE_INVALID_CHARACTERS) == 0) {
@@ -736,11 +733,12 @@
 }
 
 // static
-std::string JSONParser::FormatErrorMessage(int line, int column,
+std::string JSONParser::FormatErrorMessage(int line,
+                                           int column,
                                            const std::string& description) {
   if (line || column) {
-    return StringPrintf("Line: %i, column: %i, %s",
-        line, column, description.c_str());
+    return StringPrintf("Line: %i, column: %i, %s", line, column,
+                        description.c_str());
   }
   return description;
 }
diff --git a/base/json/json_parser.h b/base/json/json_parser.h
index b14a8d7..1289560 100644
--- a/base/json/json_parser.h
+++ b/base/json/json_parser.h
@@ -67,10 +67,10 @@
 
  private:
   enum Token {
-    T_OBJECT_BEGIN,           // {
-    T_OBJECT_END,             // }
-    T_ARRAY_BEGIN,            // [
-    T_ARRAY_END,              // ]
+    T_OBJECT_BEGIN,  // {
+    T_OBJECT_END,    // }
+    T_ARRAY_BEGIN,   // [
+    T_ARRAY_END,     // ]
     T_STRING,
     T_NUMBER,
     T_BOOL_TRUE,              // true
@@ -207,7 +207,8 @@
 
   // Given the line and column number of an error, formats one of the error
   // message contants from json_reader.h for human display.
-  static std::string FormatErrorMessage(int line, int column,
+  static std::string FormatErrorMessage(int line,
+                                        int column,
                                         const std::string& description);
 
   // base::JSONParserOptions that control parsing.
diff --git a/base/json/json_reader.cc b/base/json/json_reader.cc
index bf2a18a..3d5475e 100644
--- a/base/json/json_reader.cc
+++ b/base/json/json_reader.cc
@@ -22,24 +22,18 @@
 static_assert(JSONReader::JSON_PARSE_ERROR_COUNT < 1000,
               "JSONReader error out of bounds");
 
-const char JSONReader::kInvalidEscape[] =
-    "Invalid escape sequence.";
-const char JSONReader::kSyntaxError[] =
-    "Syntax error.";
-const char JSONReader::kUnexpectedToken[] =
-    "Unexpected token.";
-const char JSONReader::kTrailingComma[] =
-    "Trailing comma not allowed.";
-const char JSONReader::kTooMuchNesting[] =
-    "Too much nesting.";
+const char JSONReader::kInvalidEscape[] = "Invalid escape sequence.";
+const char JSONReader::kSyntaxError[] = "Syntax error.";
+const char JSONReader::kUnexpectedToken[] = "Unexpected token.";
+const char JSONReader::kTrailingComma[] = "Trailing comma not allowed.";
+const char JSONReader::kTooMuchNesting[] = "Too much nesting.";
 const char JSONReader::kUnexpectedDataAfterRoot[] =
     "Unexpected data after root element.";
 const char JSONReader::kUnsupportedEncoding[] =
     "Unsupported encoding. JSON must be UTF-8.";
 const char JSONReader::kUnquotedDictionaryKey[] =
     "Dictionary keys must be quoted.";
-const char JSONReader::kInputTooLarge[] =
-    "Input string is too large (>2GB).";
+const char JSONReader::kInputTooLarge[] = "Input string is too large (>2GB).";
 
 JSONReader::JSONReader(int options, int max_depth)
     : parser_(new internal::JSONParser(options, max_depth)) {}
@@ -55,7 +49,6 @@
   return root ? std::make_unique<Value>(std::move(*root)) : nullptr;
 }
 
-
 // static
 std::unique_ptr<Value> JSONReader::ReadAndReturnError(
     StringPiece json,
diff --git a/base/json/json_string_value_serializer.cc b/base/json/json_string_value_serializer.cc
index f9c45a4..0c979b7 100644
--- a/base/json/json_string_value_serializer.cc
+++ b/base/json/json_string_value_serializer.cc
@@ -11,9 +11,7 @@
 using base::Value;
 
 JSONStringValueSerializer::JSONStringValueSerializer(std::string* json_string)
-    : json_string_(json_string),
-      pretty_print_(false) {
-}
+    : json_string_(json_string), pretty_print_(false) {}
 
 JSONStringValueSerializer::~JSONStringValueSerializer() = default;
 
diff --git a/base/json/json_value_converter.cc b/base/json/json_value_converter.cc
index 6f772f3..55506e6 100644
--- a/base/json/json_value_converter.cc
+++ b/base/json/json_value_converter.cc
@@ -7,31 +7,30 @@
 namespace base {
 namespace internal {
 
-bool BasicValueConverter<int>::Convert(
-    const base::Value& value, int* field) const {
+bool BasicValueConverter<int>::Convert(const base::Value& value,
+                                       int* field) const {
   return value.GetAsInteger(field);
 }
 
-bool BasicValueConverter<std::string>::Convert(
-    const base::Value& value, std::string* field) const {
+bool BasicValueConverter<std::string>::Convert(const base::Value& value,
+                                               std::string* field) const {
   return value.GetAsString(field);
 }
 
-bool BasicValueConverter<string16>::Convert(
-    const base::Value& value, string16* field) const {
+bool BasicValueConverter<string16>::Convert(const base::Value& value,
+                                            string16* field) const {
   return value.GetAsString(field);
 }
 
-bool BasicValueConverter<double>::Convert(
-    const base::Value& value, double* field) const {
+bool BasicValueConverter<double>::Convert(const base::Value& value,
+                                          double* field) const {
   return value.GetAsDouble(field);
 }
 
-bool BasicValueConverter<bool>::Convert(
-    const base::Value& value, bool* field) const {
+bool BasicValueConverter<bool>::Convert(const base::Value& value,
+                                        bool* field) const {
   return value.GetAsBoolean(field);
 }
 
 }  // namespace internal
 }  // namespace base
-
diff --git a/base/json/json_value_converter.h b/base/json/json_value_converter.h
index 115e47a..d91bead 100644
--- a/base/json/json_value_converter.h
+++ b/base/json/json_value_converter.h
@@ -91,13 +91,13 @@
 
 namespace internal {
 
-template<typename StructType>
+template <typename StructType>
 class FieldConverterBase {
  public:
   explicit FieldConverterBase(const std::string& path) : field_path_(path) {}
   virtual ~FieldConverterBase() = default;
-  virtual bool ConvertField(const base::Value& value, StructType* obj)
-      const = 0;
+  virtual bool ConvertField(const base::Value& value,
+                            StructType* obj) const = 0;
   const std::string& field_path() const { return field_path_; }
 
  private:
@@ -116,19 +116,18 @@
 class FieldConverter : public FieldConverterBase<StructType> {
  public:
   explicit FieldConverter(const std::string& path,
-                          FieldType StructType::* field,
+                          FieldType StructType::*field,
                           ValueConverter<FieldType>* converter)
       : FieldConverterBase<StructType>(path),
         field_pointer_(field),
-        value_converter_(converter) {
-  }
+        value_converter_(converter) {}
 
   bool ConvertField(const base::Value& value, StructType* dst) const override {
     return value_converter_->Convert(value, &(dst->*field_pointer_));
   }
 
  private:
-  FieldType StructType::* field_pointer_;
+  FieldType StructType::*field_pointer_;
   std::unique_ptr<ValueConverter<FieldType>> value_converter_;
   DISALLOW_COPY_AND_ASSIGN(FieldConverter);
 };
@@ -148,8 +147,7 @@
 };
 
 template <>
-class BasicValueConverter<std::string>
-    : public ValueConverter<std::string> {
+class BasicValueConverter<std::string> : public ValueConverter<std::string> {
  public:
   BasicValueConverter() = default;
 
@@ -160,8 +158,7 @@
 };
 
 template <>
-class BasicValueConverter<string16>
-    : public ValueConverter<string16> {
+class BasicValueConverter<string16> : public ValueConverter<string16> {
  public:
   BasicValueConverter() = default;
 
@@ -196,7 +193,7 @@
 template <typename FieldType>
 class ValueFieldConverter : public ValueConverter<FieldType> {
  public:
-  typedef bool(*ConvertFunc)(const base::Value* value, FieldType* field);
+  typedef bool (*ConvertFunc)(const base::Value* value, FieldType* field);
 
   explicit ValueFieldConverter(ConvertFunc convert_func)
       : convert_func_(convert_func) {}
@@ -222,7 +219,7 @@
   bool Convert(const base::Value& value, FieldType* field) const override {
     std::string string_value;
     return value.GetAsString(&string_value) &&
-        convert_func_(string_value, field);
+           convert_func_(string_value, field);
   }
 
  private:
@@ -317,7 +314,7 @@
 class RepeatedCustomValueConverter
     : public ValueConverter<std::vector<std::unique_ptr<NestedType>>> {
  public:
-  typedef bool(*ConvertFunc)(const base::Value* value, NestedType* field);
+  typedef bool (*ConvertFunc)(const base::Value* value, NestedType* field);
 
   explicit RepeatedCustomValueConverter(ConvertFunc convert_func)
       : convert_func_(convert_func) {}
@@ -349,54 +346,50 @@
   DISALLOW_COPY_AND_ASSIGN(RepeatedCustomValueConverter);
 };
 
-
 }  // namespace internal
 
 template <class StructType>
 class JSONValueConverter {
  public:
-  JSONValueConverter() {
-    StructType::RegisterJSONConverter(this);
-  }
+  JSONValueConverter() { StructType::RegisterJSONConverter(this); }
 
-  void RegisterIntField(const std::string& field_name,
-                        int StructType::* field) {
+  void RegisterIntField(const std::string& field_name, int StructType::*field) {
     fields_.push_back(
         std::make_unique<internal::FieldConverter<StructType, int>>(
             field_name, field, new internal::BasicValueConverter<int>));
   }
 
   void RegisterStringField(const std::string& field_name,
-                           std::string StructType::* field) {
+                           std::string StructType::*field) {
     fields_.push_back(
         std::make_unique<internal::FieldConverter<StructType, std::string>>(
             field_name, field, new internal::BasicValueConverter<std::string>));
   }
 
   void RegisterStringField(const std::string& field_name,
-                           string16 StructType::* field) {
+                           string16 StructType::*field) {
     fields_.push_back(
         std::make_unique<internal::FieldConverter<StructType, string16>>(
             field_name, field, new internal::BasicValueConverter<string16>));
   }
 
   void RegisterBoolField(const std::string& field_name,
-                         bool StructType::* field) {
+                         bool StructType::*field) {
     fields_.push_back(
         std::make_unique<internal::FieldConverter<StructType, bool>>(
             field_name, field, new internal::BasicValueConverter<bool>));
   }
 
   void RegisterDoubleField(const std::string& field_name,
-                           double StructType::* field) {
+                           double StructType::*field) {
     fields_.push_back(
         std::make_unique<internal::FieldConverter<StructType, double>>(
             field_name, field, new internal::BasicValueConverter<double>));
   }
 
   template <class NestedType>
-  void RegisterNestedField(
-      const std::string& field_name, NestedType StructType::* field) {
+  void RegisterNestedField(const std::string& field_name,
+                           NestedType StructType::*field) {
     fields_.push_back(
         std::make_unique<internal::FieldConverter<StructType, NestedType>>(
             field_name, field, new internal::NestedValueConverter<NestedType>));
@@ -413,10 +406,10 @@
   }
 
   template <typename FieldType>
-  void RegisterCustomValueField(
-      const std::string& field_name,
-      FieldType StructType::* field,
-      bool (*convert_func)(const base::Value*, FieldType*)) {
+  void RegisterCustomValueField(const std::string& field_name,
+                                FieldType StructType::*field,
+                                bool (*convert_func)(const base::Value*,
+                                                     FieldType*)) {
     fields_.push_back(
         std::make_unique<internal::FieldConverter<StructType, FieldType>>(
             field_name, field,
diff --git a/base/json/string_escape.h b/base/json/string_escape.h
index 2f74836..d318b6a 100644
--- a/base/json/string_escape.h
+++ b/base/json/string_escape.h
@@ -25,16 +25,12 @@
 //
 // If |put_in_quotes| is true, then a leading and trailing double-quote mark
 // will be appended to |dest| as well.
-bool EscapeJSONString(StringPiece str,
-                                  bool put_in_quotes,
-                                  std::string* dest);
+bool EscapeJSONString(StringPiece str, bool put_in_quotes, std::string* dest);
 
 // Performs a similar function to the UTF-8 StringPiece version above,
 // converting UTF-16 code units to UTF-8 code units and escaping non-printing
 // control characters. On return, |dest| will contain a valid UTF-8 JSON string.
-bool EscapeJSONString(StringPiece16 str,
-                                  bool put_in_quotes,
-                                  std::string* dest);
+bool EscapeJSONString(StringPiece16 str, bool put_in_quotes, std::string* dest);
 
 // Helper functions that wrap the above two functions but return the value
 // instead of appending. |put_in_quotes| is always true.
@@ -52,8 +48,7 @@
 //
 // The output of this function takes the *appearance* of JSON but is not in
 // fact valid according to RFC 4627.
-std::string EscapeBytesAsInvalidJSONString(StringPiece str,
-                                                       bool put_in_quotes);
+std::string EscapeBytesAsInvalidJSONString(StringPiece str, bool put_in_quotes);
 
 }  // namespace base
 
diff --git a/base/logging.cc b/base/logging.cc
index 915f2e0..f6de944 100644
--- a/base/logging.cc
+++ b/base/logging.cc
@@ -42,9 +42,9 @@
 #endif
 
 #include <CoreFoundation/CoreFoundation.h>
+#include <mach-o/dyld.h>
 #include <mach/mach.h>
 #include <mach/mach_time.h>
-#include <mach-o/dyld.h>
 
 #elif defined(OS_POSIX) || defined(OS_FUCHSIA)
 #include <time.h>
@@ -198,13 +198,9 @@
 // LoggingLocks can not be nested.
 class LoggingLock {
  public:
-  LoggingLock() {
-    LockLogging();
-  }
+  LoggingLock() { LockLogging(); }
 
-  ~LoggingLock() {
-    UnlockLogging();
-  }
+  ~LoggingLock() { UnlockLogging(); }
 
   static void Init(LogLockingState lock_log, const PathChar* new_log_file) {
     if (initialized)
@@ -290,8 +286,8 @@
       // try the current directory
       wchar_t system_buffer[MAX_PATH];
       system_buffer[0] = 0;
-      DWORD len = ::GetCurrentDirectory(arraysize(system_buffer),
-                                        system_buffer);
+      DWORD len =
+          ::GetCurrentDirectory(arraysize(system_buffer), system_buffer);
       if (len == 0 || len > arraysize(system_buffer))
         return false;
 
@@ -403,8 +399,10 @@
          severity >= kAlwaysPrintErrorLevel;
 }
 
-void SetLogItems(bool enable_process_id, bool enable_thread_id,
-                 bool enable_timestamp, bool enable_tickcount) {
+void SetLogItems(bool enable_process_id,
+                 bool enable_thread_id,
+                 bool enable_timestamp,
+                 bool enable_tickcount) {
   g_log_process_id = enable_process_id;
   g_log_thread_id = enable_thread_id;
   g_log_timestamp = enable_timestamp;
@@ -424,16 +422,25 @@
 }
 
 // Explicit instantiations for commonly used comparisons.
-template std::string* MakeCheckOpString<int, int>(
-    const int&, const int&, const char* names);
+template std::string* MakeCheckOpString<int, int>(const int&,
+                                                  const int&,
+                                                  const char* names);
 template std::string* MakeCheckOpString<unsigned long, unsigned long>(
-    const unsigned long&, const unsigned long&, const char* names);
+    const unsigned long&,
+    const unsigned long&,
+    const char* names);
 template std::string* MakeCheckOpString<unsigned long, unsigned int>(
-    const unsigned long&, const unsigned int&, const char* names);
+    const unsigned long&,
+    const unsigned int&,
+    const char* names);
 template std::string* MakeCheckOpString<unsigned int, unsigned long>(
-    const unsigned int&, const unsigned long&, const char* names);
+    const unsigned int&,
+    const unsigned long&,
+    const char* names);
 template std::string* MakeCheckOpString<std::string, std::string>(
-    const std::string&, const std::string&, const char* name);
+    const std::string&,
+    const std::string&,
+    const char* name);
 
 void MakeCheckOpValueString(std::ostream* os, std::nullptr_t p) {
   (*os) << "nullptr";
@@ -462,8 +469,7 @@
 #endif  // !defined(NDEBUG)
 
 #if defined(OS_WIN)
-LogMessage::SaveLastError::SaveLastError() : last_error_(::GetLastError()) {
-}
+LogMessage::SaveLastError::SaveLastError() : last_error_(::GetLastError()) {}
 
 LogMessage::SaveLastError::~SaveLastError() {
   ::SetLastError(last_error_);
@@ -488,7 +494,9 @@
   delete result;
 }
 
-LogMessage::LogMessage(const char* file, int line, LogSeverity severity,
+LogMessage::LogMessage(const char* file,
+                       int line,
+                       LogSeverity severity,
                        std::string* result)
     : severity_(severity), file_(file), line_(line) {
   Init(file, line);
@@ -507,9 +515,8 @@
   std::string str_newline(stream_.str());
 
   // Give any log message handler first dibs on the message.
-  if (log_message_handler &&
-      log_message_handler(severity_, file_, line_,
-                          message_start_, str_newline)) {
+  if (log_message_handler && log_message_handler(severity_, file_, line_,
+                                                 message_start_, str_newline)) {
     // The handler took care of it, no further processing.
     return;
   }
@@ -603,9 +610,9 @@
 
       // Map Chrome log severities to ASL log levels.
       const char* const asl_level_string = [](LogSeverity severity) {
-        // ASL_LEVEL_* are ints, but ASL needs equivalent strings. This
-        // non-obvious two-step macro trick achieves what's needed.
-        // https://gcc.gnu.org/onlinedocs/cpp/Stringification.html
+// ASL_LEVEL_* are ints, but ASL needs equivalent strings. This
+// non-obvious two-step macro trick achieves what's needed.
+// https://gcc.gnu.org/onlinedocs/cpp/Stringification.html
 #define ASL_LEVEL_STR(level) ASL_LEVEL_STR_X(level)
 #define ASL_LEVEL_STR_X(level) #level
         switch (severity) {
@@ -677,13 +684,13 @@
 
   // write to log file
   if ((g_logging_destination & LOG_TO_FILE) != 0) {
-    // We can have multiple threads and/or processes, so try to prevent them
-    // from clobbering each other's writes.
-    // If the client app did not call InitLogging, and the lock has not
-    // been created do it now. We do this on demand, but if two threads try
-    // to do this at the same time, there will be a race condition to create
-    // the lock. This is why InitLogging should be called from the main
-    // thread at the beginning of execution.
+// We can have multiple threads and/or processes, so try to prevent them
+// from clobbering each other's writes.
+// If the client app did not call InitLogging, and the lock has not
+// been created do it now. We do this on demand, but if two threads try
+// to do this at the same time, there will be a race condition to create
+// the lock. This is why InitLogging should be called from the main
+// thread at the beginning of execution.
 #if defined(OS_POSIX) || defined(OS_FUCHSIA)
     LoggingLock::Init(LOCK_LOG_FILE, nullptr);
     LoggingLock logging_lock;
@@ -691,14 +698,12 @@
     if (InitializeLogFileHandle()) {
 #if defined(OS_WIN)
       DWORD num_written;
-      WriteFile(g_log_file,
-                static_cast<const void*>(str_newline.c_str()),
-                static_cast<DWORD>(str_newline.length()),
-                &num_written,
+      WriteFile(g_log_file, static_cast<const void*>(str_newline.c_str()),
+                static_cast<DWORD>(str_newline.length()), &num_written,
                 nullptr);
 #elif defined(OS_POSIX) || defined(OS_FUCHSIA)
-      ignore_result(fwrite(
-          str_newline.data(), str_newline.size(), 1, g_log_file));
+      ignore_result(
+          fwrite(str_newline.data(), str_newline.size(), 1, g_log_file));
       fflush(g_log_file);
 #else
 #error Unsupported platform
@@ -731,7 +736,7 @@
 
   // TODO(darin): It might be nice if the columns were fixed width.
 
-  stream_ <<  '[';
+  stream_ << '[';
   if (g_log_process_id)
     stream_ << CurrentProcessId() << ':';
   if (g_log_thread_id)
@@ -740,17 +745,11 @@
 #if defined(OS_WIN)
     SYSTEMTIME local_time;
     GetLocalTime(&local_time);
-    stream_ << std::setfill('0')
-            << std::setw(2) << local_time.wMonth
-            << std::setw(2) << local_time.wDay
-            << '/'
-            << std::setw(2) << local_time.wHour
-            << std::setw(2) << local_time.wMinute
-            << std::setw(2) << local_time.wSecond
-            << '.'
-            << std::setw(3)
-            << local_time.wMilliseconds
-            << ':';
+    stream_ << std::setfill('0') << std::setw(2) << local_time.wMonth
+            << std::setw(2) << local_time.wDay << '/' << std::setw(2)
+            << local_time.wHour << std::setw(2) << local_time.wMinute
+            << std::setw(2) << local_time.wSecond << '.' << std::setw(3)
+            << local_time.wMilliseconds << ':';
 #elif defined(OS_POSIX) || defined(OS_FUCHSIA)
     timeval tv;
     gettimeofday(&tv, nullptr);
@@ -758,16 +757,11 @@
     struct tm local_time;
     localtime_r(&t, &local_time);
     struct tm* tm_time = &local_time;
-    stream_ << std::setfill('0')
-            << std::setw(2) << 1 + tm_time->tm_mon
-            << std::setw(2) << tm_time->tm_mday
-            << '/'
-            << std::setw(2) << tm_time->tm_hour
-            << std::setw(2) << tm_time->tm_min
-            << std::setw(2) << tm_time->tm_sec
-            << '.'
-            << std::setw(6) << tv.tv_usec
-            << ':';
+    stream_ << std::setfill('0') << std::setw(2) << 1 + tm_time->tm_mon
+            << std::setw(2) << tm_time->tm_mday << '/' << std::setw(2)
+            << tm_time->tm_hour << std::setw(2) << tm_time->tm_min
+            << std::setw(2) << tm_time->tm_sec << '.' << std::setw(6)
+            << tv.tv_usec << ':';
 #else
 #error Unsupported platform
 #endif
@@ -819,15 +813,12 @@
 #endif  // defined(OS_WIN)
 }
 
-
 #if defined(OS_WIN)
 Win32ErrorLogMessage::Win32ErrorLogMessage(const char* file,
                                            int line,
                                            LogSeverity severity,
                                            SystemErrorCode err)
-    : err_(err),
-      log_message_(file, line, severity) {
-}
+    : err_(err), log_message_(file, line, severity) {}
 
 Win32ErrorLogMessage::~Win32ErrorLogMessage() {
   stream() << ": " << SystemErrorCodeToString(err_);
@@ -837,9 +828,7 @@
                                  int line,
                                  LogSeverity severity,
                                  SystemErrorCode err)
-    : err_(err),
-      log_message_(file, line, severity) {
-}
+    : err_(err), log_message_(file, line, severity) {}
 
 ErrnoLogMessage::~ErrnoLogMessage() {
   stream() << ": " << SystemErrorCodeToString(err_);
@@ -859,9 +848,8 @@
     const size_t message_len = strlen(message);
     int rv;
     while (bytes_written < message_len) {
-      rv = HANDLE_EINTR(
-          write(STDERR_FILENO, message + bytes_written,
-                message_len - bytes_written));
+      rv = HANDLE_EINTR(write(STDERR_FILENO, message + bytes_written,
+                              message_len - bytes_written));
       if (rv < 0) {
         // Give up, nothing we can do now.
         break;
@@ -900,8 +888,7 @@
 #endif
 
 void LogErrorNotReached(const char* file, int line) {
-  LogMessage(file, line, LOG_ERROR).stream()
-      << "NOTREACHED() hit.";
+  LogMessage(file, line, LOG_ERROR).stream() << "NOTREACHED() hit.";
 }
 
 }  // namespace logging
diff --git a/base/logging.h b/base/logging.h
index 36eb271..3fb3778 100644
--- a/base/logging.h
+++ b/base/logging.h
@@ -45,7 +45,6 @@
 // If DebugMessage.exe is not found, the logging code will use a normal
 // MessageBox, potentially causing the problems discussed above.
 
-
 // Instructions
 // ------------
 //
@@ -114,15 +113,15 @@
 // Where to record logging output? A flat file and/or system debug log
 // via OutputDebugString.
 enum LoggingDestination {
-  LOG_NONE                = 0,
-  LOG_TO_FILE             = 1 << 0,
+  LOG_NONE = 0,
+  LOG_TO_FILE = 1 << 0,
   LOG_TO_SYSTEM_DEBUG_LOG = 1 << 1,
 
   LOG_TO_ALL = LOG_TO_FILE | LOG_TO_SYSTEM_DEBUG_LOG,
 
-  // On Windows, use a file next to the exe; on POSIX platforms, where
-  // it may not even be possible to locate the executable on disk, use
-  // stderr.
+// On Windows, use a file next to the exe; on POSIX platforms, where
+// it may not even be possible to locate the executable on disk, use
+// stderr.
 #if defined(OS_WIN)
   LOG_DEFAULT = LOG_TO_FILE,
 #elif defined(OS_POSIX) || defined(OS_FUCHSIA)
@@ -210,8 +209,10 @@
 // process and thread IDs default to off, the timestamp defaults to on.
 // If this function is not called, logging defaults to writing the timestamp
 // only.
-void SetLogItems(bool enable_process_id, bool enable_thread_id,
-                             bool enable_timestamp, bool enable_tickcount);
+void SetLogItems(bool enable_process_id,
+                 bool enable_thread_id,
+                 bool enable_timestamp,
+                 bool enable_tickcount);
 
 // Sets whether or not you'd like to see fatal debug messages popped up in
 // a dialog box or not.
@@ -223,7 +224,10 @@
 // Returns true to signal that it handled the message and the message
 // should not be sent to other log destinations.
 typedef bool (*LogMessageHandlerFunction)(int severity,
-    const char* file, int line, size_t message_start, const std::string& str);
+                                          const char* file,
+                                          int line,
+                                          size_t message_start,
+                                          const std::string& str);
 void SetLogMessageHandler(LogMessageHandlerFunction handler);
 LogMessageHandlerFunction GetLogMessageHandler();
 
@@ -308,7 +312,7 @@
 // the Windows SDK does for consistency.
 #define ERROR 0
 #define COMPACT_GOOGLE_LOG_EX_0(ClassName, ...) \
-  COMPACT_GOOGLE_LOG_EX_ERROR(ClassName , ##__VA_ARGS__)
+  COMPACT_GOOGLE_LOG_EX_ERROR(ClassName, ##__VA_ARGS__)
 #define COMPACT_GOOGLE_LOG_0 COMPACT_GOOGLE_LOG_ERROR
 // Needed for LOG_IS_ON(ERROR).
 const LogSeverity LOG_0 = LOG_ERROR;
@@ -322,8 +326,8 @@
 
 // Helper macro which avoids evaluating the arguments to a stream if
 // the condition doesn't hold. Condition is evaluated once and only once.
-#define LAZY_STREAM(stream, condition)                                  \
-  !(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
+#define LAZY_STREAM(stream, condition) \
+  !(condition) ? (void)0 : ::logging::LogMessageVoidify() & (stream)
 
 // We use the preprocessor's merging operator, "##", so that, e.g.,
 // LOG(INFO) becomes the token COMPACT_GOOGLE_LOG_INFO.  There's some funny
@@ -333,7 +337,7 @@
 // impossible to stream something like a string directly to an unnamed
 // ostream. We employ a neat hack by calling the stream() member
 // function of LogMessage which seems to avoid the problem.
-#define LOG_STREAM(severity) COMPACT_GOOGLE_LOG_ ## severity.stream()
+#define LOG_STREAM(severity) COMPACT_GOOGLE_LOG_##severity.stream()
 
 #define LOG(severity) LAZY_STREAM(LOG_STREAM(severity), LOG_IS_ON(severity))
 #define LOG_IF(severity, condition) \
@@ -344,17 +348,18 @@
       << "Assert failed: " #condition ". "
 
 #if defined(OS_WIN)
-#define PLOG_STREAM(severity) \
-  COMPACT_GOOGLE_LOG_EX_ ## severity(Win32ErrorLogMessage, \
-      ::logging::GetLastSystemErrorCode()).stream()
+#define PLOG_STREAM(severity)                                           \
+  COMPACT_GOOGLE_LOG_EX_##severity(Win32ErrorLogMessage,                \
+                                   ::logging::GetLastSystemErrorCode()) \
+      .stream()
 #elif defined(OS_POSIX) || defined(OS_FUCHSIA)
-#define PLOG_STREAM(severity) \
-  COMPACT_GOOGLE_LOG_EX_ ## severity(ErrnoLogMessage, \
-      ::logging::GetLastSystemErrorCode()).stream()
+#define PLOG_STREAM(severity)                                           \
+  COMPACT_GOOGLE_LOG_EX_##severity(ErrnoLogMessage,                     \
+                                   ::logging::GetLastSystemErrorCode()) \
+      .stream()
 #endif
 
-#define PLOG(severity)                                          \
-  LAZY_STREAM(PLOG_STREAM(severity), LOG_IS_ON(severity))
+#define PLOG(severity) LAZY_STREAM(PLOG_STREAM(severity), LOG_IS_ON(severity))
 
 #define PLOG_IF(severity, condition) \
   LAZY_STREAM(PLOG_STREAM(severity), LOG_IS_ON(severity) && (condition))
@@ -517,7 +522,7 @@
   LAZY_STREAM(PLOG_STREAM(FATAL), UNLIKELY(!(condition))); \
   EAT_STREAM_PARAMETERS
 
-#define CHECK_OP(name, op, val1, val2) CHECK((val1) op (val2))
+#define CHECK_OP(name, op, val1, val2) CHECK((val1)op(val2))
 
 #else  // !(OFFICIAL_BUILD && NDEBUG)
 
@@ -529,15 +534,13 @@
 // __analysis_assume gets confused on some conditions:
 // http://randomascii.wordpress.com/2011/09/13/analyze-for-visual-studio-the-ugly-part-5/
 
-#define CHECK(condition)                    \
-  __analysis_assume(!!(condition)),         \
-      LAZY_STREAM(LOG_STREAM(FATAL), false) \
-          << "Check failed: " #condition ". "
+#define CHECK(condition)                                                  \
+  __analysis_assume(!!(condition)), LAZY_STREAM(LOG_STREAM(FATAL), false) \
+                                        << "Check failed: " #condition ". "
 
-#define PCHECK(condition)                    \
-  __analysis_assume(!!(condition)),          \
-      LAZY_STREAM(PLOG_STREAM(FATAL), false) \
-          << "Check failed: " #condition ". "
+#define PCHECK(condition)                                                  \
+  __analysis_assume(!!(condition)), LAZY_STREAM(PLOG_STREAM(FATAL), false) \
+                                        << "Check failed: " #condition ". "
 
 #else  // _PREFAST_
 
@@ -558,14 +561,17 @@
 // macro is used in an 'if' clause such as:
 // if (a == 1)
 //   CHECK_EQ(2, a);
-#define CHECK_OP(name, op, val1, val2)                                         \
-  switch (0) case 0: default:                                                  \
-  if (::logging::CheckOpResult true_if_passed =                                \
-      ::logging::Check##name##Impl((val1), (val2),                             \
-                                   #val1 " " #op " " #val2))                   \
-   ;                                                                           \
-  else                                                                         \
-    ::logging::LogMessage(__FILE__, __LINE__, true_if_passed.message()).stream()
+#define CHECK_OP(name, op, val1, val2)                                    \
+  switch (0)                                                              \
+  case 0:                                                                 \
+  default:                                                                \
+    if (::logging::CheckOpResult true_if_passed =                         \
+            ::logging::Check##name##Impl((val1), (val2),                  \
+                                         #val1 " " #op " " #val2))        \
+      ;                                                                   \
+    else                                                                  \
+      ::logging::LogMessage(__FILE__, __LINE__, true_if_passed.message()) \
+          .stream()
 
 #endif  // !(OFFICIAL_BUILD && NDEBUG)
 
@@ -611,7 +617,7 @@
 // function template because it is not performance critical and so can
 // be out of line, while the "Impl" code should be inline.  Caller
 // takes ownership of the returned string.
-template<class t1, class t2>
+template <class t1, class t2>
 std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
   std::ostringstream ss;
   ss << names << " (";
@@ -625,20 +631,25 @@
 
 // Commonly used instantiations of MakeCheckOpString<>. Explicitly instantiated
 // in logging.cc.
-extern template std::string* MakeCheckOpString<int, int>(
-    const int&, const int&, const char* names);
-extern template
-std::string* MakeCheckOpString<unsigned long, unsigned long>(
-    const unsigned long&, const unsigned long&, const char* names);
-extern template
-std::string* MakeCheckOpString<unsigned long, unsigned int>(
-    const unsigned long&, const unsigned int&, const char* names);
-extern template
-std::string* MakeCheckOpString<unsigned int, unsigned long>(
-    const unsigned int&, const unsigned long&, const char* names);
-extern template
-std::string* MakeCheckOpString<std::string, std::string>(
-    const std::string&, const std::string&, const char* name);
+extern template std::string* MakeCheckOpString<int, int>(const int&,
+                                                         const int&,
+                                                         const char* names);
+extern template std::string* MakeCheckOpString<unsigned long, unsigned long>(
+    const unsigned long&,
+    const unsigned long&,
+    const char* names);
+extern template std::string* MakeCheckOpString<unsigned long, unsigned int>(
+    const unsigned long&,
+    const unsigned int&,
+    const char* names);
+extern template std::string* MakeCheckOpString<unsigned int, unsigned long>(
+    const unsigned int&,
+    const unsigned long&,
+    const char* names);
+extern template std::string* MakeCheckOpString<std::string, std::string>(
+    const std::string&,
+    const std::string&,
+    const char* name);
 
 // Helper functions for CHECK_OP macro.
 // The (int, int) specialization works around the issue that the compiler
@@ -666,17 +677,17 @@
 DEFINE_CHECK_OP_IMPL(EQ, ==)
 DEFINE_CHECK_OP_IMPL(NE, !=)
 DEFINE_CHECK_OP_IMPL(LE, <=)
-DEFINE_CHECK_OP_IMPL(LT, < )
+DEFINE_CHECK_OP_IMPL(LT, <)
 DEFINE_CHECK_OP_IMPL(GE, >=)
-DEFINE_CHECK_OP_IMPL(GT, > )
+DEFINE_CHECK_OP_IMPL(GT, >)
 #undef DEFINE_CHECK_OP_IMPL
 
 #define CHECK_EQ(val1, val2) CHECK_OP(EQ, ==, val1, val2)
 #define CHECK_NE(val1, val2) CHECK_OP(NE, !=, val1, val2)
 #define CHECK_LE(val1, val2) CHECK_OP(LE, <=, val1, val2)
-#define CHECK_LT(val1, val2) CHECK_OP(LT, < , val1, val2)
+#define CHECK_LT(val1, val2) CHECK_OP(LT, <, val1, val2)
 #define CHECK_GE(val1, val2) CHECK_OP(GE, >=, val1, val2)
-#define CHECK_GT(val1, val2) CHECK_OP(GT, > , val1, val2)
+#define CHECK_GT(val1, val2) CHECK_OP(GT, >, val1, val2)
 
 #if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)
 #define DCHECK_IS_ON() 0
@@ -706,11 +717,9 @@
 
 #endif  // DCHECK_IS_ON()
 
-#define DLOG(severity)                                          \
-  LAZY_STREAM(LOG_STREAM(severity), DLOG_IS_ON(severity))
+#define DLOG(severity) LAZY_STREAM(LOG_STREAM(severity), DLOG_IS_ON(severity))
 
-#define DPLOG(severity)                                         \
-  LAZY_STREAM(PLOG_STREAM(severity), DLOG_IS_ON(severity))
+#define DPLOG(severity) LAZY_STREAM(PLOG_STREAM(severity), DLOG_IS_ON(severity))
 
 // Definitions for DCHECK et al.
 
@@ -742,15 +751,13 @@
 #if defined(_PREFAST_) && defined(OS_WIN)
 // See comments on the previous use of __analysis_assume.
 
-#define DCHECK(condition)                    \
-  __analysis_assume(!!(condition)),          \
-      LAZY_STREAM(LOG_STREAM(DCHECK), false) \
-          << "Check failed: " #condition ". "
+#define DCHECK(condition)                                                  \
+  __analysis_assume(!!(condition)), LAZY_STREAM(LOG_STREAM(DCHECK), false) \
+                                        << "Check failed: " #condition ". "
 
-#define DPCHECK(condition)                    \
-  __analysis_assume(!!(condition)),           \
-      LAZY_STREAM(PLOG_STREAM(DCHECK), false) \
-          << "Check failed: " #condition ". "
+#define DPCHECK(condition)                                                  \
+  __analysis_assume(!!(condition)), LAZY_STREAM(PLOG_STREAM(DCHECK), false) \
+                                        << "Check failed: " #condition ". "
 
 #else  // !(defined(_PREFAST_) && defined(OS_WIN))
 
@@ -780,16 +787,19 @@
 //   DCHECK_EQ(2, a);
 #if DCHECK_IS_ON()
 
-#define DCHECK_OP(name, op, val1, val2)                                \
-  switch (0) case 0: default:                                          \
-  if (::logging::CheckOpResult true_if_passed =                        \
-      DCHECK_IS_ON() ?                                                 \
-      ::logging::Check##name##Impl((val1), (val2),                     \
-                                   #val1 " " #op " " #val2) : nullptr) \
-   ;                                                                   \
-  else                                                                 \
-    ::logging::LogMessage(__FILE__, __LINE__, ::logging::LOG_DCHECK,   \
-                          true_if_passed.message()).stream()
+#define DCHECK_OP(name, op, val1, val2)                                   \
+  switch (0)                                                              \
+  case 0:                                                                 \
+  default:                                                                \
+    if (::logging::CheckOpResult true_if_passed =                         \
+            DCHECK_IS_ON() ? ::logging::Check##name##Impl(                \
+                                 (val1), (val2), #val1 " " #op " " #val2) \
+                           : nullptr)                                     \
+      ;                                                                   \
+    else                                                                  \
+      ::logging::LogMessage(__FILE__, __LINE__, ::logging::LOG_DCHECK,    \
+                            true_if_passed.message())                     \
+          .stream()
 
 #else  // DCHECK_IS_ON()
 
@@ -833,9 +843,9 @@
 #define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2)
 #define DCHECK_NE(val1, val2) DCHECK_OP(NE, !=, val1, val2)
 #define DCHECK_LE(val1, val2) DCHECK_OP(LE, <=, val1, val2)
-#define DCHECK_LT(val1, val2) DCHECK_OP(LT, < , val1, val2)
+#define DCHECK_LT(val1, val2) DCHECK_OP(LT, <, val1, val2)
 #define DCHECK_GE(val1, val2) DCHECK_OP(GE, >=, val1, val2)
-#define DCHECK_GT(val1, val2) DCHECK_OP(GT, > , val1, val2)
+#define DCHECK_GT(val1, val2) DCHECK_OP(GT, >, val1, val2)
 
 #if !DCHECK_IS_ON() && defined(OS_CHROMEOS)
 // Implement logging of NOTREACHED() as a dedicated function to get function
@@ -873,7 +883,9 @@
   LogMessage(const char* file, int line, std::string* result);
 
   // Used for DCHECK_EQ(), etc. Takes ownership of the given string.
-  LogMessage(const char* file, int line, LogSeverity severity,
+  LogMessage(const char* file,
+             int line,
+             LogSeverity severity,
              std::string* result);
 
   ~LogMessage();
@@ -925,7 +937,7 @@
   LogMessageVoidify() = default;
   // This has to be an operator with a precedence lower than << but
   // higher than ?:
-  void operator&(std::ostream&) { }
+  void operator&(std::ostream&) {}
 };
 
 #if defined(OS_WIN)
diff --git a/base/mac/bind_objc_block.h b/base/mac/bind_objc_block.h
index 9a481ed..87d38bf 100644
--- a/base/mac/bind_objc_block.h
+++ b/base/mac/bind_objc_block.h
@@ -41,9 +41,9 @@
 namespace internal {
 
 // Helper function to run the block contained in the parameter.
-template<typename R, typename... Args>
-R RunBlock(base::mac::ScopedBlock<R(^)(Args...)> block, Args... args) {
-  R(^extracted_block)(Args...) = block.get();
+template <typename R, typename... Args>
+R RunBlock(base::mac::ScopedBlock<R (^)(Args...)> block, Args... args) {
+  R (^extracted_block)(Args...) = block.get();
   return extracted_block(args...);
 }
 
@@ -53,8 +53,8 @@
 
 // Construct a callback from an objective-C block with up to six arguments (see
 // note above).
-template<typename R, typename... Args>
-base::Callback<R(Args...)> BindBlock(R(^block)(Args...)) {
+template <typename R, typename... Args>
+base::Callback<R(Args...)> BindBlock(R (^block)(Args...)) {
   return base::Bind(
       &base::internal::RunBlock<R, Args...>,
       base::mac::ScopedBlock<R (^)(Args...)>(
diff --git a/base/mac/bundle_locations.h b/base/mac/bundle_locations.h
index 86ff1a4..2bda76e 100644
--- a/base/mac/bundle_locations.h
+++ b/base/mac/bundle_locations.h
@@ -9,7 +9,7 @@
 
 #if defined(__OBJC__)
 #import <Foundation/Foundation.h>
-#else  // __OBJC__
+#else   // __OBJC__
 class NSBundle;
 #endif  // __OBJC__
 
diff --git a/base/mac/dispatch_source_mach.cc b/base/mac/dispatch_source_mach.cc
index 0858f30..50da7e4 100644
--- a/base/mac/dispatch_source_mach.cc
+++ b/base/mac/dispatch_source_mach.cc
@@ -24,11 +24,13 @@
                                        void (^event_handler)())
     : queue_(queue, base::scoped_policy::RETAIN),
       source_(dispatch_source_create(DISPATCH_SOURCE_TYPE_MACH_RECV,
-          port, 0, queue_)),
+                                     port,
+                                     0,
+                                     queue_)),
       source_canceled_(dispatch_semaphore_create(0)) {
   dispatch_source_set_event_handler(source_, event_handler);
   dispatch_source_set_cancel_handler(source_, ^{
-      dispatch_semaphore_signal(source_canceled_);
+    dispatch_semaphore_signal(source_canceled_);
   });
 }
 
diff --git a/base/mac/foundation_util.h b/base/mac/foundation_util.h
index 29f281b..c5cead4 100644
--- a/base/mac/foundation_util.h
+++ b/base/mac/foundation_util.h
@@ -35,8 +35,9 @@
 // Adapted from NSObjCRuntime.h NS_ENUM definition (used in Foundation starting
 // with the OS X 10.8 SDK and the iOS 6.0 SDK).
 #if __has_extension(cxx_strong_enums) && \
-    (defined(OS_IOS) || (defined(MAC_OS_X_VERSION_10_8) && \
-                         MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8))
+    (defined(OS_IOS) ||                  \
+     (defined(MAC_OS_X_VERSION_10_8) &&  \
+      MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8))
 #define CR_FORWARD_ENUM(_type, _name) enum _name : _type _name
 #else
 #define CR_FORWARD_ENUM(_type, _name) _type _name
@@ -102,20 +103,18 @@
 // If found, fills result (which must always be non-NULL) with the
 // first found directory and returns true.  Otherwise, returns false.
 bool GetSearchPathDirectory(NSSearchPathDirectory directory,
-                                        NSSearchPathDomainMask domain_mask,
-                                        FilePath* result);
+                            NSSearchPathDomainMask domain_mask,
+                            FilePath* result);
 
 // Searches for directories for the given key in only the local domain.
 // If found, fills result (which must always be non-NULL) with the
 // first found directory and returns true.  Otherwise, returns false.
-bool GetLocalDirectory(NSSearchPathDirectory directory,
-                                   FilePath* result);
+bool GetLocalDirectory(NSSearchPathDirectory directory, FilePath* result);
 
 // Searches for directories for the given key in only the user domain.
 // If found, fills result (which must always be non-NULL) with the
 // first found directory and returns true.  Otherwise, returns false.
-bool GetUserDirectory(NSSearchPathDirectory directory,
-                                  FilePath* result);
+bool GetUserDirectory(NSSearchPathDirectory directory, FilePath* result);
 
 // Returns the ~/Library directory.
 FilePath GetUserLibraryPath();
@@ -128,7 +127,7 @@
 FilePath GetAppBundlePath(const FilePath& exec_name);
 
 #define TYPE_NAME_FOR_CF_TYPE_DECL(TypeCF) \
-std::string TypeNameForCFType(TypeCF##Ref);
+  std::string TypeNameForCFType(TypeCF##Ref);
 
 TYPE_NAME_FOR_CF_TYPE_DECL(CFArray);
 TYPE_NAME_FOR_CF_TYPE_DECL(CFBag);
@@ -208,25 +207,25 @@
 // of macros and function overloading is used instead.
 
 #define CF_TO_NS_CAST_DECL(TypeCF, TypeNS) \
-OBJC_CPP_CLASS_DECL(TypeNS) \
-\
-namespace base { \
-namespace mac { \
-TypeNS* CFToNSCast(TypeCF##Ref cf_val); \
-TypeCF##Ref NSToCFCast(TypeNS* ns_val); \
-} \
-}
+  OBJC_CPP_CLASS_DECL(TypeNS)              \
+                                           \
+  namespace base {                         \
+  namespace mac {                          \
+  TypeNS* CFToNSCast(TypeCF##Ref cf_val);  \
+  TypeCF##Ref NSToCFCast(TypeNS* ns_val);  \
+  }                                        \
+  }
 
-#define CF_TO_NS_MUTABLE_CAST_DECL(name) \
-CF_TO_NS_CAST_DECL(CF##name, NS##name) \
-OBJC_CPP_CLASS_DECL(NSMutable##name) \
-\
-namespace base { \
-namespace mac { \
-NSMutable##name* CFToNSCast(CFMutable##name##Ref cf_val); \
-CFMutable##name##Ref NSToCFCast(NSMutable##name* ns_val); \
-} \
-}
+#define CF_TO_NS_MUTABLE_CAST_DECL(name)                    \
+  CF_TO_NS_CAST_DECL(CF##name, NS##name)                    \
+  OBJC_CPP_CLASS_DECL(NSMutable##name)                      \
+                                                            \
+  namespace base {                                          \
+  namespace mac {                                           \
+  NSMutable##name* CFToNSCast(CFMutable##name##Ref cf_val); \
+  CFMutable##name##Ref NSToCFCast(NSMutable##name* ns_val); \
+  }                                                         \
+  }
 
 // List of toll-free bridged types taken from:
 // http://www.cocoadev.com/index.pl?TollFreeBridged
@@ -278,18 +277,18 @@
 // CFTypeRef hello = CFSTR("hello world");
 // CFStringRef some_string = base::mac::CFCastStrict<CFStringRef>(hello);
 
-template<typename T>
+template <typename T>
 T CFCast(const CFTypeRef& cf_val);
 
-template<typename T>
+template <typename T>
 T CFCastStrict(const CFTypeRef& cf_val);
 
-#define CF_CAST_DECL(TypeCF) \
-template<> TypeCF##Ref \
-CFCast<TypeCF##Ref>(const CFTypeRef& cf_val);\
-\
-template<> TypeCF##Ref \
-CFCastStrict<TypeCF##Ref>(const CFTypeRef& cf_val);
+#define CF_CAST_DECL(TypeCF)                                \
+  template <>                                               \
+  TypeCF##Ref CFCast<TypeCF##Ref>(const CFTypeRef& cf_val); \
+                                                            \
+  template <>                                               \
+  TypeCF##Ref CFCastStrict<TypeCF##Ref>(const CFTypeRef& cf_val);
 
 CF_CAST_DECL(CFArray);
 CF_CAST_DECL(CFBag);
@@ -341,7 +340,7 @@
 //
 // NSString* str = base::mac::ObjCCastStrict<NSString>(
 //     [ns_arr_of_ns_strs objectAtIndex:0]);
-template<typename T>
+template <typename T>
 T* ObjCCast(id objc_val) {
   if ([objc_val isKindOfClass:[T class]]) {
     return reinterpret_cast<T*>(objc_val);
@@ -349,7 +348,7 @@
   return nil;
 }
 
-template<typename T>
+template <typename T>
 T* ObjCCastStrict(id objc_val) {
   T* rv = ObjCCast<T>(objc_val);
   DCHECK(objc_val == nil || rv);
@@ -360,20 +359,20 @@
 
 // Helper function for GetValueFromDictionary to create the error message
 // that appears when a type mismatch is encountered.
-std::string GetValueFromDictionaryErrorMessage(
-    CFStringRef key, const std::string& expected_type, CFTypeRef value);
+std::string GetValueFromDictionaryErrorMessage(CFStringRef key,
+                                               const std::string& expected_type,
+                                               CFTypeRef value);
 
 // Utility function to pull out a value from a dictionary, check its type, and
 // return it. Returns NULL if the key is not present or of the wrong type.
-template<typename T>
+template <typename T>
 T GetValueFromDictionary(CFDictionaryRef dict, CFStringRef key) {
   CFTypeRef value = CFDictionaryGetValue(dict, key);
   T value_specific = CFCast<T>(value);
 
   if (value && !value_specific) {
     std::string expected_type = TypeNameForCFType(value_specific);
-    DLOG(WARNING) << GetValueFromDictionaryErrorMessage(key,
-                                                        expected_type,
+    DLOG(WARNING) << GetValueFromDictionaryErrorMessage(key, expected_type,
                                                         value);
   }
 
@@ -390,8 +389,7 @@
 // Converts |range| to an NSRange, returning the new range in |range_out|.
 // Returns true if conversion was successful, false if the values of |range|
 // could not be converted to NSUIntegers.
-bool CFRangeToNSRange(CFRange range,
-                                  NSRange* range_out) WARN_UNUSED_RESULT;
+bool CFRangeToNSRange(CFRange range, NSRange* range_out) WARN_UNUSED_RESULT;
 #endif  // defined(__OBJC__)
 
 }  // namespace mac
@@ -402,9 +400,7 @@
 // e.g. LOG(INFO) << base::mac::NSToCFCast(@"foo");
 // Operator << can not be overloaded for ObjectiveC types as the compiler
 // can not distinguish between overloads for id with overloads for void*.
-extern std::ostream& operator<<(std::ostream& o,
-                                            const CFErrorRef err);
-extern std::ostream& operator<<(std::ostream& o,
-                                            const CFStringRef str);
+extern std::ostream& operator<<(std::ostream& o, const CFErrorRef err);
+extern std::ostream& operator<<(std::ostream& o, const CFStringRef str);
 
 #endif  // BASE_MAC_FOUNDATION_UTIL_H_
diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
index a0c5cec..1fb91a9 100644
--- a/base/mac/foundation_util.mm
+++ b/base/mac/foundation_util.mm
@@ -94,8 +94,8 @@
 
 FilePath PathForFrameworkBundleResource(CFStringRef resourceName) {
   NSBundle* bundle = base::mac::FrameworkBundle();
-  NSString* resourcePath = [bundle pathForResource:(NSString*)resourceName
-                                            ofType:nil];
+  NSString* resourcePath =
+      [bundle pathForResource:(NSString*)resourceName ofType:nil];
   return NSStringToFilePath(resourcePath);
 }
 
@@ -192,9 +192,7 @@
 }
 
 #define TYPE_NAME_FOR_CF_TYPE_DEFN(TypeCF) \
-std::string TypeNameForCFType(TypeCF##Ref) { \
-  return #TypeCF; \
-}
+  std::string TypeNameForCFType(TypeCF##Ref) { return #TypeCF; }
 
 TYPE_NAME_FOR_CF_TYPE_DEFN(CFArray);
 TYPE_NAME_FOR_CF_TYPE_DEFN(CFBag);
@@ -222,12 +220,12 @@
 #undef TYPE_NAME_FOR_CF_TYPE_DEFN
 
 void NSObjectRetain(void* obj) {
-  id<NSObject> nsobj = static_cast<id<NSObject> >(obj);
+  id<NSObject> nsobj = static_cast<id<NSObject>>(obj);
   [nsobj retain];
 }
 
 void NSObjectRelease(void* obj) {
-  id<NSObject> nsobj = static_cast<id<NSObject> >(obj);
+  id<NSObject> nsobj = static_cast<id<NSObject>>(obj);
   [nsobj release];
 }
 
@@ -265,36 +263,36 @@
 
 // Definitions for the corresponding CF_TO_NS_CAST_DECL macros in
 // foundation_util.h.
-#define CF_TO_NS_CAST_DEFN(TypeCF, TypeNS) \
-\
-TypeNS* CFToNSCast(TypeCF##Ref cf_val) { \
-  DCHECK(!cf_val || TypeCF##GetTypeID() == CFGetTypeID(cf_val)); \
-  TypeNS* ns_val = \
-      const_cast<TypeNS*>(reinterpret_cast<const TypeNS*>(cf_val)); \
-  return ns_val; \
-} \
-\
-TypeCF##Ref NSToCFCast(TypeNS* ns_val) { \
-  TypeCF##Ref cf_val = reinterpret_cast<TypeCF##Ref>(ns_val); \
-  DCHECK(!cf_val || TypeCF##GetTypeID() == CFGetTypeID(cf_val)); \
-  return cf_val; \
-}
+#define CF_TO_NS_CAST_DEFN(TypeCF, TypeNS)                            \
+                                                                      \
+  TypeNS* CFToNSCast(TypeCF##Ref cf_val) {                            \
+    DCHECK(!cf_val || TypeCF##GetTypeID() == CFGetTypeID(cf_val));    \
+    TypeNS* ns_val =                                                  \
+        const_cast<TypeNS*>(reinterpret_cast<const TypeNS*>(cf_val)); \
+    return ns_val;                                                    \
+  }                                                                   \
+                                                                      \
+  TypeCF##Ref NSToCFCast(TypeNS* ns_val) {                            \
+    TypeCF##Ref cf_val = reinterpret_cast<TypeCF##Ref>(ns_val);       \
+    DCHECK(!cf_val || TypeCF##GetTypeID() == CFGetTypeID(cf_val));    \
+    return cf_val;                                                    \
+  }
 
-#define CF_TO_NS_MUTABLE_CAST_DEFN(name) \
-CF_TO_NS_CAST_DEFN(CF##name, NS##name) \
-\
-NSMutable##name* CFToNSCast(CFMutable##name##Ref cf_val) { \
-  DCHECK(!cf_val || CF##name##GetTypeID() == CFGetTypeID(cf_val)); \
-  NSMutable##name* ns_val = reinterpret_cast<NSMutable##name*>(cf_val); \
-  return ns_val; \
-} \
-\
-CFMutable##name##Ref NSToCFCast(NSMutable##name* ns_val) { \
-  CFMutable##name##Ref cf_val = \
-      reinterpret_cast<CFMutable##name##Ref>(ns_val); \
-  DCHECK(!cf_val || CF##name##GetTypeID() == CFGetTypeID(cf_val)); \
-  return cf_val; \
-}
+#define CF_TO_NS_MUTABLE_CAST_DEFN(name)                                  \
+  CF_TO_NS_CAST_DEFN(CF##name, NS##name)                                  \
+                                                                          \
+  NSMutable##name* CFToNSCast(CFMutable##name##Ref cf_val) {              \
+    DCHECK(!cf_val || CF##name##GetTypeID() == CFGetTypeID(cf_val));      \
+    NSMutable##name* ns_val = reinterpret_cast<NSMutable##name*>(cf_val); \
+    return ns_val;                                                        \
+  }                                                                       \
+                                                                          \
+  CFMutable##name##Ref NSToCFCast(NSMutable##name* ns_val) {              \
+    CFMutable##name##Ref cf_val =                                         \
+        reinterpret_cast<CFMutable##name##Ref>(ns_val);                   \
+    DCHECK(!cf_val || CF##name##GetTypeID() == CFGetTypeID(cf_val));      \
+    return cf_val;                                                        \
+  }
 
 CF_TO_NS_MUTABLE_CAST_DEFN(Array);
 CF_TO_NS_MUTABLE_CAST_DEFN(AttributedString);
@@ -321,10 +319,8 @@
 // checking, so do some special-casing.
 // http://www.openradar.me/15341349 rdar://15341349
 NSFont* CFToNSCast(CTFontRef cf_val) {
-  NSFont* ns_val =
-      const_cast<NSFont*>(reinterpret_cast<const NSFont*>(cf_val));
-  DCHECK(!cf_val ||
-         CTFontGetTypeID() == CFGetTypeID(cf_val) ||
+  NSFont* ns_val = const_cast<NSFont*>(reinterpret_cast<const NSFont*>(cf_val));
+  DCHECK(!cf_val || CTFontGetTypeID() == CFGetTypeID(cf_val) ||
          (_CFIsObjC(CTFontGetTypeID(), cf_val) &&
           [ns_val isKindOfClass:[NSFont class]]));
   return ns_val;
@@ -332,8 +328,7 @@
 
 CTFontRef NSToCFCast(NSFont* ns_val) {
   CTFontRef cf_val = reinterpret_cast<CTFontRef>(ns_val);
-  DCHECK(!cf_val ||
-         CTFontGetTypeID() == CFGetTypeID(cf_val) ||
+  DCHECK(!cf_val || CTFontGetTypeID() == CFGetTypeID(cf_val) ||
          [ns_val isKindOfClass:[NSFont class]]);
   return cf_val;
 }
@@ -342,24 +337,24 @@
 #undef CF_TO_NS_CAST_DEFN
 #undef CF_TO_NS_MUTABLE_CAST_DEFN
 
-#define CF_CAST_DEFN(TypeCF) \
-template<> TypeCF##Ref \
-CFCast<TypeCF##Ref>(const CFTypeRef& cf_val) { \
-  if (cf_val == NULL) { \
-    return NULL; \
-  } \
-  if (CFGetTypeID(cf_val) == TypeCF##GetTypeID()) { \
-    return (TypeCF##Ref)(cf_val); \
-  } \
-  return NULL; \
-} \
-\
-template<> TypeCF##Ref \
-CFCastStrict<TypeCF##Ref>(const CFTypeRef& cf_val) { \
-  TypeCF##Ref rv = CFCast<TypeCF##Ref>(cf_val); \
-  DCHECK(cf_val == NULL || rv); \
-  return rv; \
-}
+#define CF_CAST_DEFN(TypeCF)                                       \
+  template <>                                                      \
+  TypeCF##Ref CFCast<TypeCF##Ref>(const CFTypeRef& cf_val) {       \
+    if (cf_val == NULL) {                                          \
+      return NULL;                                                 \
+    }                                                              \
+    if (CFGetTypeID(cf_val) == TypeCF##GetTypeID()) {              \
+      return (TypeCF##Ref)(cf_val);                                \
+    }                                                              \
+    return NULL;                                                   \
+  }                                                                \
+                                                                   \
+  template <>                                                      \
+  TypeCF##Ref CFCastStrict<TypeCF##Ref>(const CFTypeRef& cf_val) { \
+    TypeCF##Ref rv = CFCast<TypeCF##Ref>(cf_val);                  \
+    DCHECK(cf_val == NULL || rv);                                  \
+    return rv;                                                     \
+  }
 
 CF_CAST_DEFN(CFArray);
 CF_CAST_DEFN(CFBag);
@@ -385,8 +380,8 @@
 // The NSFont/CTFont toll-free bridging is broken when it comes to type
 // checking, so do some special-casing.
 // http://www.openradar.me/15341349 rdar://15341349
-template<> CTFontRef
-CFCast<CTFontRef>(const CFTypeRef& cf_val) {
+template <>
+CTFontRef CFCast<CTFontRef>(const CFTypeRef& cf_val) {
   if (cf_val == NULL) {
     return NULL;
   }
@@ -404,8 +399,8 @@
   return NULL;
 }
 
-template<> CTFontRef
-CFCastStrict<CTFontRef>(const CFTypeRef& cf_val) {
+template <>
+CTFontRef CFCastStrict<CTFontRef>(const CFTypeRef& cf_val) {
   CTFontRef rv = CFCast<CTFontRef>(cf_val);
   DCHECK(cf_val == NULL || rv);
   return rv;
@@ -421,17 +416,14 @@
 
 #undef CF_CAST_DEFN
 
-std::string GetValueFromDictionaryErrorMessage(
-    CFStringRef key, const std::string& expected_type, CFTypeRef value) {
+std::string GetValueFromDictionaryErrorMessage(CFStringRef key,
+                                               const std::string& expected_type,
+                                               CFTypeRef value) {
   ScopedCFTypeRef<CFStringRef> actual_type_ref(
       CFCopyTypeIDDescription(CFGetTypeID(value)));
-  return "Expected value for key " +
-      base::SysCFStringRefToUTF8(key) +
-      " to be " +
-      expected_type +
-      " but it was " +
-      base::SysCFStringRefToUTF8(actual_type_ref) +
-      " instead";
+  return "Expected value for key " + base::SysCFStringRefToUTF8(key) +
+         " to be " + expected_type + " but it was " +
+         base::SysCFStringRefToUTF8(actual_type_ref) + " instead";
 }
 
 NSString* FilePathToNSString(const FilePath& path) {
@@ -474,10 +466,9 @@
     errorDesc = reinterpret_cast<CFStringRef>(
         CFDictionaryGetValue(user_info.get(), kCFErrorDescriptionKey));
   }
-  o << "Code: " << CFErrorGetCode(err)
-    << " Domain: " << CFErrorGetDomain(err)
+  o << "Code: " << CFErrorGetCode(err) << " Domain: " << CFErrorGetDomain(err)
     << " Desc: " << desc.get();
-  if(errorDesc) {
+  if (errorDesc) {
     o << "(" << errorDesc << ")";
   }
   return o;
diff --git a/base/mac/mac_logging.h b/base/mac/mac_logging.h
index 148b383..9891d69 100644
--- a/base/mac/mac_logging.h
+++ b/base/mac/mac_logging.h
@@ -48,23 +48,23 @@
 }  // namespace logging
 
 #define OSSTATUS_LOG_STREAM(severity, status) \
-    COMPACT_GOOGLE_LOG_EX_ ## severity(OSStatusLogMessage, status).stream()
+  COMPACT_GOOGLE_LOG_EX_##severity(OSStatusLogMessage, status).stream()
 
 #define OSSTATUS_LOG(severity, status) \
-    LAZY_STREAM(OSSTATUS_LOG_STREAM(severity, status), LOG_IS_ON(severity))
+  LAZY_STREAM(OSSTATUS_LOG_STREAM(severity, status), LOG_IS_ON(severity))
 #define OSSTATUS_LOG_IF(severity, condition, status) \
-    LAZY_STREAM(OSSTATUS_LOG_STREAM(severity, status), \
-                LOG_IS_ON(severity) && (condition))
+  LAZY_STREAM(OSSTATUS_LOG_STREAM(severity, status), \
+              LOG_IS_ON(severity) && (condition))
 
-#define OSSTATUS_CHECK(condition, status) \
-    LAZY_STREAM(OSSTATUS_LOG_STREAM(FATAL, status), !(condition)) \
-    << "Check failed: " # condition << ". "
+#define OSSTATUS_CHECK(condition, status)                       \
+  LAZY_STREAM(OSSTATUS_LOG_STREAM(FATAL, status), !(condition)) \
+      << "Check failed: " #condition << ". "
 
 #define OSSTATUS_DLOG(severity, status) \
-    LAZY_STREAM(OSSTATUS_LOG_STREAM(severity, status), DLOG_IS_ON(severity))
+  LAZY_STREAM(OSSTATUS_LOG_STREAM(severity, status), DLOG_IS_ON(severity))
 #define OSSTATUS_DLOG_IF(severity, condition, status) \
-    LAZY_STREAM(OSSTATUS_LOG_STREAM(severity, status), \
-                DLOG_IS_ON(severity) && (condition))
+  LAZY_STREAM(OSSTATUS_LOG_STREAM(severity, status),  \
+              DLOG_IS_ON(severity) && (condition))
 
 #define OSSTATUS_DCHECK(condition, status)        \
   LAZY_STREAM(OSSTATUS_LOG_STREAM(FATAL, status), \
diff --git a/base/mac/mac_logging.mm b/base/mac/mac_logging.mm
index 1f9682d..ff311e3 100644
--- a/base/mac/mac_logging.mm
+++ b/base/mac/mac_logging.mm
@@ -26,9 +26,7 @@
                                        int line,
                                        LogSeverity severity,
                                        OSStatus status)
-    : LogMessage(file_path, line, severity),
-      status_(status) {
-}
+    : LogMessage(file_path, line, severity), status_(status) {}
 
 OSStatusLogMessage::~OSStatusLogMessage() {
 #if defined(OS_IOS)
@@ -36,10 +34,7 @@
   // to try to get a description of the failure.
   stream() << ": " << status_;
 #else
-  stream() << ": "
-           << DescriptionFromOSStatus(status_)
-           << " ("
-           << status_
+  stream() << ": " << DescriptionFromOSStatus(status_) << " (" << status_
            << ")";
 #endif
 }
diff --git a/base/mac/mac_util.h b/base/mac/mac_util.h
index 96dda1d..c4fcd33 100644
--- a/base/mac/mac_util.h
+++ b/base/mac/mac_util.h
@@ -10,7 +10,6 @@
 
 #import <CoreGraphics/CoreGraphics.h>
 
-
 namespace base {
 
 class FilePath;
@@ -59,8 +58,7 @@
 // Convenience method to switch the current fullscreen mode.  This has the same
 // net effect as a ReleaseFullScreen(from_mode) call followed immediately by a
 // RequestFullScreen(to_mode).  Must be called on the main thread.
-void SwitchFullScreenModes(FullScreenMode from_mode,
-                                       FullScreenMode to_mode);
+void SwitchFullScreenModes(FullScreenMode from_mode, FullScreenMode to_mode);
 
 // Excludes the file given by |file_path| from being backed up by Time Machine.
 bool SetFileBackupExclusion(const FilePath& file_path);
@@ -171,9 +169,9 @@
 // Parse a model identifier string; for example, into ("MacBookPro", 6, 1).
 // If any error occurs, none of the input pointers are touched.
 bool ParseModelIdentifier(const std::string& ident,
-                                      std::string* type,
-                                      int32_t* major,
-                                      int32_t* minor);
+                          std::string* type,
+                          int32_t* major,
+                          int32_t* minor);
 
 }  // namespace mac
 }  // namespace base
diff --git a/base/mac/mac_util.mm b/base/mac/mac_util.mm
index a8308be..bb8797d 100644
--- a/base/mac/mac_util.mm
+++ b/base/mac/mac_util.mm
@@ -32,7 +32,7 @@
 
 // The current count of outstanding requests for full screen mode from browser
 // windows, plugins, etc.
-int g_full_screen_requests[kNumFullScreenModes] = { 0 };
+int g_full_screen_requests[kNumFullScreenModes] = {0};
 
 // Sets the appropriate application presentation option based on the current
 // full screen requests.  Since only one presentation option can be active at a
@@ -82,8 +82,8 @@
 // representing the current application.  If such an item is found, returns a
 // retained reference to it. Caller is responsible for releasing the reference.
 LSSharedFileListItemRef GetLoginItemForApp() {
-  ScopedCFTypeRef<LSSharedFileListRef> login_items(LSSharedFileListCreate(
-      NULL, kLSSharedFileListSessionLoginItems, NULL));
+  ScopedCFTypeRef<LSSharedFileListRef> login_items(
+      LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL));
 
   if (!login_items.get()) {
     DLOG(ERROR) << "Couldn't get a Login Items list.";
@@ -95,7 +95,7 @@
 
   NSURL* url = [NSURL fileURLWithPath:[base::mac::MainBundle() bundlePath]];
 
-  for(NSUInteger i = 0; i < [login_items_array count]; ++i) {
+  for (NSUInteger i = 0; i < [login_items_array count]; ++i) {
     LSSharedFileListItemRef item =
         reinterpret_cast<LSSharedFileListItemRef>(login_items_array[i]);
     CFURLRef item_url_ref = NULL;
@@ -117,8 +117,9 @@
 }
 
 bool IsHiddenLoginItem(LSSharedFileListItemRef item) {
-  ScopedCFTypeRef<CFBooleanRef> hidden(reinterpret_cast<CFBooleanRef>(
-      LSSharedFileListItemCopyProperty(item,
+  ScopedCFTypeRef<CFBooleanRef> hidden(
+      reinterpret_cast<CFBooleanRef>(LSSharedFileListItemCopyProperty(
+          item,
           reinterpret_cast<CFStringRef>(kLSSharedFileListLoginItemHidden))));
 
   return hidden && hidden == kCFBooleanTrue;
@@ -130,8 +131,8 @@
   // Leaked. That's OK, it's scoped to the lifetime of the application.
   static CGColorSpaceRef g_color_space_generic_rgb(
       CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB));
-  DLOG_IF(ERROR, !g_color_space_generic_rgb) <<
-      "Couldn't get the generic RGB color space";
+  DLOG_IF(ERROR, !g_color_space_generic_rgb)
+      << "Couldn't get the generic RGB color space";
   return g_color_space_generic_rgb;
 }
 
@@ -154,8 +155,8 @@
     g_system_color_space = CGColorSpaceCreateDeviceRGB();
 
     if (g_system_color_space) {
-      DLOG(WARNING) <<
-          "Couldn't get the main display's color space, using generic";
+      DLOG(WARNING)
+          << "Couldn't get the main display's color space, using generic";
     } else {
       DLOG(ERROR) << "Couldn't get any color space";
     }
@@ -247,8 +248,8 @@
     return;  // Already is a login item with required hide flag.
   }
 
-  ScopedCFTypeRef<LSSharedFileListRef> login_items(LSSharedFileListCreate(
-      NULL, kLSSharedFileListSessionLoginItems, NULL));
+  ScopedCFTypeRef<LSSharedFileListRef> login_items(
+      LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL));
 
   if (!login_items.get()) {
     DLOG(ERROR) << "Couldn't get a Login Items list.";
@@ -263,10 +264,9 @@
   NSURL* url = [NSURL fileURLWithPath:[base::mac::MainBundle() bundlePath]];
 
   BOOL hide = hide_on_startup ? YES : NO;
-  NSDictionary* properties =
-      [NSDictionary
-        dictionaryWithObject:[NSNumber numberWithBool:hide]
-                      forKey:(NSString*)kLSSharedFileListLoginItemHidden];
+  NSDictionary* properties = [NSDictionary
+      dictionaryWithObject:[NSNumber numberWithBool:hide]
+                    forKey:(NSString*)kLSSharedFileListLoginItemHidden];
 
   ScopedCFTypeRef<LSSharedFileListItemRef> new_item;
   new_item.reset(LSSharedFileListInsertItemURL(
@@ -284,8 +284,8 @@
   if (!item.get())
     return;
 
-  ScopedCFTypeRef<LSSharedFileListRef> login_items(LSSharedFileListCreate(
-      NULL, kLSSharedFileListSessionLoginItems, NULL));
+  ScopedCFTypeRef<LSSharedFileListRef> login_items(
+      LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL));
 
   if (!login_items.get()) {
     DLOG(ERROR) << "Couldn't get a Login Items list.";
@@ -296,7 +296,7 @@
 }
 
 bool WasLaunchedAsLoginOrResumeItem() {
-  ProcessSerialNumber psn = { 0, kCurrentProcess };
+  ProcessSerialNumber psn = {0, kCurrentProcess};
   ProcessInfoRec info = {};
   info.processInfoLength = sizeof(info);
 
@@ -393,9 +393,9 @@
   int darwin_major_version = 0;
   char* dot = strchr(uname_info.release, '.');
   if (dot) {
-    if (!base::StringToInt(base::StringPiece(uname_info.release,
-                                             dot - uname_info.release),
-                           &darwin_major_version)) {
+    if (!base::StringToInt(
+            base::StringPiece(uname_info.release, dot - uname_info.release),
+            &darwin_major_version)) {
       dot = NULL;
     }
   }
@@ -440,16 +440,12 @@
 
 std::string GetModelIdentifier() {
   std::string return_string;
-  ScopedIOObject<io_service_t> platform_expert(
-      IOServiceGetMatchingService(kIOMasterPortDefault,
-                                  IOServiceMatching("IOPlatformExpertDevice")));
+  ScopedIOObject<io_service_t> platform_expert(IOServiceGetMatchingService(
+      kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice")));
   if (platform_expert) {
     ScopedCFTypeRef<CFDataRef> model_data(
         static_cast<CFDataRef>(IORegistryEntryCreateCFProperty(
-            platform_expert,
-            CFSTR("model"),
-            kCFAllocatorDefault,
-            0)));
+            platform_expert, CFSTR("model"), kCFAllocatorDefault, 0)));
     if (model_data) {
       return_string =
           reinterpret_cast<const char*>(CFDataGetBytePtr(model_data));
@@ -470,10 +466,9 @@
     return false;
   int32_t major_tmp, minor_tmp;
   std::string::const_iterator begin = ident.begin();
-  if (!StringToInt(
-          StringPiece(begin + number_loc, begin + comma_loc), &major_tmp) ||
-      !StringToInt(
-          StringPiece(begin + comma_loc + 1, ident.end()), &minor_tmp))
+  if (!StringToInt(StringPiece(begin + number_loc, begin + comma_loc),
+                   &major_tmp) ||
+      !StringToInt(StringPiece(begin + comma_loc + 1, ident.end()), &minor_tmp))
     return false;
   *type = ident.substr(0, number_loc);
   *major = major_tmp;
diff --git a/base/mac/mach_logging.cc b/base/mac/mach_logging.cc
index fbd0134..b708ded 100644
--- a/base/mac/mach_logging.cc
+++ b/base/mac/mach_logging.cc
@@ -34,13 +34,10 @@
                                int line,
                                LogSeverity severity,
                                mach_error_t mach_err)
-    : LogMessage(file_path, line, severity),
-      mach_err_(mach_err) {
-}
+    : LogMessage(file_path, line, severity), mach_err_(mach_err) {}
 
 MachLogMessage::~MachLogMessage() {
-  stream() << ": "
-           << mach_error_string(mach_err_)
+  stream() << ": " << mach_error_string(mach_err_)
            << FormatMachErrorNumber(mach_err_);
 }
 
@@ -50,13 +47,10 @@
                                          int line,
                                          LogSeverity severity,
                                          kern_return_t bootstrap_err)
-    : LogMessage(file_path, line, severity),
-      bootstrap_err_(bootstrap_err) {
-}
+    : LogMessage(file_path, line, severity), bootstrap_err_(bootstrap_err) {}
 
 BootstrapLogMessage::~BootstrapLogMessage() {
-  stream() << ": "
-           << bootstrap_strerror(bootstrap_err_);
+  stream() << ": " << bootstrap_strerror(bootstrap_err_);
 
   switch (bootstrap_err_) {
     case BOOTSTRAP_SUCCESS:
diff --git a/base/mac/mach_logging.h b/base/mac/mach_logging.h
index e32e1db..1f20b85 100644
--- a/base/mac/mach_logging.h
+++ b/base/mac/mach_logging.h
@@ -49,23 +49,23 @@
 }  // namespace logging
 
 #define MACH_LOG_STREAM(severity, mach_err) \
-    COMPACT_GOOGLE_LOG_EX_ ## severity(MachLogMessage, mach_err).stream()
+  COMPACT_GOOGLE_LOG_EX_##severity(MachLogMessage, mach_err).stream()
 
 #define MACH_LOG(severity, mach_err) \
-    LAZY_STREAM(MACH_LOG_STREAM(severity, mach_err), LOG_IS_ON(severity))
+  LAZY_STREAM(MACH_LOG_STREAM(severity, mach_err), LOG_IS_ON(severity))
 #define MACH_LOG_IF(severity, condition, mach_err) \
-    LAZY_STREAM(MACH_LOG_STREAM(severity, mach_err), \
-                LOG_IS_ON(severity) && (condition))
+  LAZY_STREAM(MACH_LOG_STREAM(severity, mach_err), \
+              LOG_IS_ON(severity) && (condition))
 
-#define MACH_CHECK(condition, mach_err) \
-    LAZY_STREAM(MACH_LOG_STREAM(FATAL, mach_err), !(condition)) \
-    << "Check failed: " # condition << ". "
+#define MACH_CHECK(condition, mach_err)                       \
+  LAZY_STREAM(MACH_LOG_STREAM(FATAL, mach_err), !(condition)) \
+      << "Check failed: " #condition << ". "
 
 #define MACH_DLOG(severity, mach_err) \
-    LAZY_STREAM(MACH_LOG_STREAM(severity, mach_err), DLOG_IS_ON(severity))
+  LAZY_STREAM(MACH_LOG_STREAM(severity, mach_err), DLOG_IS_ON(severity))
 #define MACH_DLOG_IF(severity, condition, mach_err) \
-    LAZY_STREAM(MACH_LOG_STREAM(severity, mach_err), \
-                DLOG_IS_ON(severity) && (condition))
+  LAZY_STREAM(MACH_LOG_STREAM(severity, mach_err),  \
+              DLOG_IS_ON(severity) && (condition))
 
 #define MACH_DCHECK(condition, mach_err)        \
   LAZY_STREAM(MACH_LOG_STREAM(FATAL, mach_err), \
@@ -93,25 +93,24 @@
 }  // namespace logging
 
 #define BOOTSTRAP_LOG_STREAM(severity, bootstrap_err) \
-    COMPACT_GOOGLE_LOG_EX_ ## severity(BootstrapLogMessage, \
-                                       bootstrap_err).stream()
-#define BOOTSTRAP_LOG(severity, bootstrap_err) \
-    LAZY_STREAM(BOOTSTRAP_LOG_STREAM(severity, \
-                                     bootstrap_err), LOG_IS_ON(severity))
+  COMPACT_GOOGLE_LOG_EX_##severity(BootstrapLogMessage, bootstrap_err).stream()
+#define BOOTSTRAP_LOG(severity, bootstrap_err)               \
+  LAZY_STREAM(BOOTSTRAP_LOG_STREAM(severity, bootstrap_err), \
+              LOG_IS_ON(severity))
 #define BOOTSTRAP_LOG_IF(severity, condition, bootstrap_err) \
-    LAZY_STREAM(BOOTSTRAP_LOG_STREAM(severity, bootstrap_err), \
-                LOG_IS_ON(severity) && (condition))
+  LAZY_STREAM(BOOTSTRAP_LOG_STREAM(severity, bootstrap_err), \
+              LOG_IS_ON(severity) && (condition))
 
-#define BOOTSTRAP_CHECK(condition, bootstrap_err) \
-    LAZY_STREAM(BOOTSTRAP_LOG_STREAM(FATAL, bootstrap_err), !(condition)) \
-    << "Check failed: " # condition << ". "
+#define BOOTSTRAP_CHECK(condition, bootstrap_err)                       \
+  LAZY_STREAM(BOOTSTRAP_LOG_STREAM(FATAL, bootstrap_err), !(condition)) \
+      << "Check failed: " #condition << ". "
 
-#define BOOTSTRAP_DLOG(severity, bootstrap_err) \
-    LAZY_STREAM(BOOTSTRAP_LOG_STREAM(severity, bootstrap_err), \
-                DLOG_IS_ON(severity))
+#define BOOTSTRAP_DLOG(severity, bootstrap_err)              \
+  LAZY_STREAM(BOOTSTRAP_LOG_STREAM(severity, bootstrap_err), \
+              DLOG_IS_ON(severity))
 #define BOOTSTRAP_DLOG_IF(severity, condition, bootstrap_err) \
-    LAZY_STREAM(BOOTSTRAP_LOG_STREAM(severity, bootstrap_err), \
-                DLOG_IS_ON(severity) && (condition))
+  LAZY_STREAM(BOOTSTRAP_LOG_STREAM(severity, bootstrap_err),  \
+              DLOG_IS_ON(severity) && (condition))
 
 #define BOOTSTRAP_DCHECK(condition, bootstrap_err)        \
   LAZY_STREAM(BOOTSTRAP_LOG_STREAM(FATAL, bootstrap_err), \
diff --git a/base/mac/scoped_cftyperef.h b/base/mac/scoped_cftyperef.h
index ccbc5cf..a602fd9 100644
--- a/base/mac/scoped_cftyperef.h
+++ b/base/mac/scoped_cftyperef.h
@@ -27,21 +27,19 @@
 
 namespace internal {
 
-template<typename CFT>
+template <typename CFT>
 struct ScopedCFTypeRefTraits {
   static CFT InvalidValue() { return nullptr; }
   static CFT Retain(CFT object) {
     CFRetain(object);
     return object;
   }
-  static void Release(CFT object) {
-    CFRelease(object);
-  }
+  static void Release(CFT object) { CFRelease(object); }
 };
 
 }  // namespace internal
 
-template<typename CFT>
+template <typename CFT>
 using ScopedCFTypeRef =
     ScopedTypeRef<CFT, internal::ScopedCFTypeRefTraits<CFT>>;
 
diff --git a/base/mac/scoped_dispatch_object.h b/base/mac/scoped_dispatch_object.h
index cd2daf2..43d057b 100644
--- a/base/mac/scoped_dispatch_object.h
+++ b/base/mac/scoped_dispatch_object.h
@@ -20,12 +20,10 @@
     dispatch_retain(object);
     return object;
   }
-  static void Release(T object) {
-    dispatch_release(object);
-  }
+  static void Release(T object) { dispatch_release(object); }
 };
 
-}  // namepsace internal
+}  // namespace internal
 
 template <typename T>
 using ScopedDispatchObject =
diff --git a/base/mac/scoped_ioobject.h b/base/mac/scoped_ioobject.h
index c948cb5..d656175 100644
--- a/base/mac/scoped_ioobject.h
+++ b/base/mac/scoped_ioobject.h
@@ -24,7 +24,7 @@
   static void Release(IOT iot) { IOObjectRelease(iot); }
 };
 
-}  // namespce internal
+}  // namespace internal
 
 // Just like ScopedCFTypeRef but for io_object_t and subclasses.
 template <typename IOT>
diff --git a/base/mac/scoped_mach_port.h b/base/mac/scoped_mach_port.h
index 9b4470d..64d6765 100644
--- a/base/mac/scoped_mach_port.h
+++ b/base/mac/scoped_mach_port.h
@@ -15,25 +15,19 @@
 namespace internal {
 
 struct SendRightTraits {
-  static mach_port_t InvalidValue() {
-    return MACH_PORT_NULL;
-  }
+  static mach_port_t InvalidValue() { return MACH_PORT_NULL; }
 
   static void Free(mach_port_t port);
 };
 
 struct ReceiveRightTraits {
-  static mach_port_t InvalidValue() {
-    return MACH_PORT_NULL;
-  }
+  static mach_port_t InvalidValue() { return MACH_PORT_NULL; }
 
   static void Free(mach_port_t port);
 };
 
 struct PortSetTraits {
-  static mach_port_t InvalidValue() {
-    return MACH_PORT_NULL;
-  }
+  static mach_port_t InvalidValue() { return MACH_PORT_NULL; }
 
   static void Free(mach_port_t port);
 };
diff --git a/base/mac/scoped_nsautorelease_pool.h b/base/mac/scoped_nsautorelease_pool.h
index 017f1c0..fd4ae66 100644
--- a/base/mac/scoped_nsautorelease_pool.h
+++ b/base/mac/scoped_nsautorelease_pool.h
@@ -9,7 +9,7 @@
 
 #if defined(__OBJC__)
 @class NSAutoreleasePool;
-#else  // __OBJC__
+#else   // __OBJC__
 class NSAutoreleasePool;
 #endif  // __OBJC__
 
@@ -31,6 +31,7 @@
   // Only use then when you're certain the items currently in the pool are
   // no longer needed.
   void Recycle();
+
  private:
   NSAutoreleasePool* autorelease_pool_;
 
diff --git a/base/mac/scoped_nsobject.h b/base/mac/scoped_nsobject.h
index 45ab325..a5da218 100644
--- a/base/mac/scoped_nsobject.h
+++ b/base/mac/scoped_nsobject.h
@@ -191,7 +191,7 @@
 };
 
 // Specialization to make scoped_nsobject<id> work.
-template<>
+template <>
 class scoped_nsobject<id> : public scoped_nsprotocol<id> {
  public:
   using Traits = typename scoped_nsprotocol<id>::Traits;
diff --git a/base/mac/scoped_typeref.h b/base/mac/scoped_typeref.h
index dd9841d..659ee34 100644
--- a/base/mac/scoped_typeref.h
+++ b/base/mac/scoped_typeref.h
@@ -45,10 +45,10 @@
 // with |ASSUME| for the former and |RETAIN| for the latter. The default policy
 // is to |ASSUME|.
 
-template<typename T>
+template <typename T>
 struct ScopedTypeRefTraits;
 
-template<typename T, typename Traits = ScopedTypeRefTraits<T>>
+template <typename T, typename Traits = ScopedTypeRefTraits<T>>
 class ScopedTypeRef {
  public:
   typedef T element_type;
@@ -61,8 +61,7 @@
       object_ = Traits::Retain(object_);
   }
 
-  ScopedTypeRef(const ScopedTypeRef<T, Traits>& that)
-      : object_(that.object_) {
+  ScopedTypeRef(const ScopedTypeRef<T, Traits>& that) : object_(that.object_) {
     if (object_)
       object_ = Traits::Retain(object_);
   }
diff --git a/base/macros.h b/base/macros.h
index 3064a1b..f59fa6c 100644
--- a/base/macros.h
+++ b/base/macros.h
@@ -23,8 +23,7 @@
 #endif
 
 // Put this in the declarations for a class to be uncopyable.
-#define DISALLOW_COPY(TypeName) \
-  TypeName(const TypeName&) = delete
+#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
@@ -53,7 +52,8 @@
 //
 // DEPRECATED, please use base::size(array) instead.
 // TODO(https://crbug.com/837308): Replace existing arraysize usages.
-template <typename T, size_t N> char (&ArraySizeHelper(T (&array)[N]))[N];
+template <typename T, size_t N>
+char (&ArraySizeHelper(T (&array)[N]))[N];
 #define arraysize(array) (sizeof(ArraySizeHelper(array)))
 
 // Used to explicitly mark the return value of a function as unused. If you are
@@ -64,9 +64,8 @@
 //   if (TakeOwnership(my_var.get()) == SUCCESS)
 //     ignore_result(my_var.release());
 //
-template<typename T>
-inline void ignore_result(const T&) {
-}
+template <typename T>
+inline void ignore_result(const T&) {}
 
 namespace base {
 
diff --git a/base/md5.cc b/base/md5.cc
index 72c774d..c66f7b2 100644
--- a/base/md5.cc
+++ b/base/md5.cc
@@ -38,9 +38,9 @@
  */
 void byteReverse(uint8_t* buf, unsigned longs) {
   do {
-    uint32_t temp = static_cast<uint32_t>(
-        static_cast<unsigned>(buf[3]) << 8 |
-        buf[2]) << 16 |
+    uint32_t temp =
+        static_cast<uint32_t>(static_cast<unsigned>(buf[3]) << 8 | buf[2])
+            << 16 |
         (static_cast<unsigned>(buf[1]) << 8 | buf[0]);
     *reinterpret_cast<uint32_t*>(buf) = temp;
     buf += 4;
diff --git a/base/md5.h b/base/md5.h
index e6345b1..16a0a6f 100644
--- a/base/md5.h
+++ b/base/md5.h
@@ -59,8 +59,7 @@
 // MD5IntermediateFinal() generates a digest without finalizing the MD5
 // operation.  Can be used to generate digests for the input seen thus far,
 // without affecting the digest generated for the entire input.
-void MD5IntermediateFinal(MD5Digest* digest,
-                                      const MD5Context* context);
+void MD5IntermediateFinal(MD5Digest* digest, const MD5Context* context);
 
 // Converts a digest into human-readable hexadecimal.
 std::string MD5DigestToBase16(const MD5Digest& digest);
diff --git a/base/memory/free_deleter.h b/base/memory/free_deleter.h
index 5604118..e12795c 100644
--- a/base/memory/free_deleter.h
+++ b/base/memory/free_deleter.h
@@ -15,9 +15,7 @@
 // std::unique_ptr<int, base::FreeDeleter> foo_ptr(
 //     static_cast<int*>(malloc(sizeof(int))));
 struct FreeDeleter {
-  inline void operator()(void* ptr) const {
-    free(ptr);
-  }
+  inline void operator()(void* ptr) const { free(ptr); }
 };
 
 }  // namespace base
diff --git a/base/memory/ref_counted.h b/base/memory/ref_counted.h
index 9447d51..a897171 100644
--- a/base/memory/ref_counted.h
+++ b/base/memory/ref_counted.h
@@ -24,18 +24,13 @@
   bool HasOneRef() const { return ref_count_ == 1; }
 
  protected:
-  explicit RefCountedBase(StartRefCountFromZeroTag) {
-  }
+  explicit RefCountedBase(StartRefCountFromZeroTag) {}
 
-  explicit RefCountedBase(StartRefCountFromOneTag) : ref_count_(1) {
-  }
+  explicit RefCountedBase(StartRefCountFromOneTag) : ref_count_(1) {}
 
-  ~RefCountedBase() {
-  }
+  ~RefCountedBase() {}
 
-  void AddRef() const {
-    AddRefImpl();
-  }
+  void AddRef() const { AddRefImpl(); }
 
   // Returns true if the object should self-delete.
   bool Release() const {
@@ -62,16 +57,13 @@
   // the sending thread), but will trap if the sending thread holds onto a
   // reference, or if the object is accessed from multiple threads
   // simultaneously.
-  bool IsOnValidSequence() const {
-    return true;
-  }
+  bool IsOnValidSequence() const { return true; }
 
  private:
   template <typename U>
   friend scoped_refptr<U> base::AdoptRef(U*);
 
-  void Adopted() const {
-  }
+  void Adopted() const {}
 
 #if defined(ARCH_CPU_64_BIT)
   void AddRefImpl() const;
@@ -91,8 +83,7 @@
  protected:
   explicit constexpr RefCountedThreadSafeBase(StartRefCountFromZeroTag) {}
   explicit constexpr RefCountedThreadSafeBase(StartRefCountFromOneTag)
-      : ref_count_(1) {
-  }
+      : ref_count_(1) {}
 
   ~RefCountedThreadSafeBase() = default;
 
@@ -113,12 +104,9 @@
   template <typename U>
   friend scoped_refptr<U> base::AdoptRef(U*);
 
-  void Adopted() const {
-  }
+  void Adopted() const {}
 
-  ALWAYS_INLINE void AddRefImpl() const {
-    ref_count_.Increment();
-  }
+  ALWAYS_INLINE void AddRefImpl() const { ref_count_.Increment(); }
 
   ALWAYS_INLINE bool ReleaseImpl() const {
     if (!ref_count_.Decrement()) {
@@ -216,9 +204,7 @@
 
   RefCounted() : subtle::RefCountedBase(T::kRefCountPreference) {}
 
-  void AddRef() const {
-    subtle::RefCountedBase::AddRef();
-  }
+  void AddRef() const { subtle::RefCountedBase::AddRef(); }
 
   void Release() const {
     if (subtle::RefCountedBase::Release()) {
@@ -245,18 +231,19 @@
 };
 
 // Forward declaration.
-template <class T, typename Traits> class RefCountedThreadSafe;
+template <class T, typename Traits>
+class RefCountedThreadSafe;
 
 // Default traits for RefCountedThreadSafe<T>.  Deletes the object when its ref
 // count reaches 0.  Overload to delete it on a different thread etc.
-template<typename T>
+template <typename T>
 struct DefaultRefCountedThreadSafeTraits {
   static void Destruct(const T* x) {
     // Delete through RefCountedThreadSafe to make child classes only need to be
     // friend with RefCountedThreadSafe instead of this struct, which is an
     // implementation detail.
-    RefCountedThreadSafe<T,
-                         DefaultRefCountedThreadSafeTraits>::DeleteInternal(x);
+    RefCountedThreadSafe<T, DefaultRefCountedThreadSafeTraits>::DeleteInternal(
+        x);
   }
 };
 
@@ -275,7 +262,7 @@
 //
 // We can use REQUIRE_ADOPTION_FOR_REFCOUNTED_TYPE() with RefCountedThreadSafe
 // too. See the comment above the RefCounted definition for details.
-template <class T, typename Traits = DefaultRefCountedThreadSafeTraits<T> >
+template <class T, typename Traits = DefaultRefCountedThreadSafeTraits<T>>
 class RefCountedThreadSafe : public subtle::RefCountedThreadSafeBase {
  public:
   static constexpr subtle::StartRefCountFromZeroTag kRefCountPreference =
@@ -284,9 +271,7 @@
   explicit RefCountedThreadSafe()
       : subtle::RefCountedThreadSafeBase(T::kRefCountPreference) {}
 
-  void AddRef() const {
-    subtle::RefCountedThreadSafeBase::AddRef();
-  }
+  void AddRef() const { subtle::RefCountedThreadSafeBase::AddRef(); }
 
   void Release() const {
     if (subtle::RefCountedThreadSafeBase::Release()) {
@@ -312,9 +297,9 @@
 // A thread-safe wrapper for some piece of data so we can place other
 // things in scoped_refptrs<>.
 //
-template<typename T>
+template <typename T>
 class RefCountedData
-    : public base::RefCountedThreadSafe< base::RefCountedData<T> > {
+    : public base::RefCountedThreadSafe<base::RefCountedData<T>> {
  public:
   RefCountedData() : data() {}
   RefCountedData(const T& in_value) : data(in_value) {}
@@ -323,7 +308,7 @@
   T data;
 
  private:
-  friend class base::RefCountedThreadSafe<base::RefCountedData<T> >;
+  friend class base::RefCountedThreadSafe<base::RefCountedData<T>>;
   ~RefCountedData() = default;
 };
 
diff --git a/base/memory/weak_ptr.cc b/base/memory/weak_ptr.cc
index 1186829..4abeb7f 100644
--- a/base/memory/weak_ptr.cc
+++ b/base/memory/weak_ptr.cc
@@ -7,8 +7,7 @@
 namespace base {
 namespace internal {
 
-WeakReference::Flag::Flag() : is_valid_(true) {
-}
+WeakReference::Flag::Flag() : is_valid_(true) {}
 
 void WeakReference::Flag::Invalidate() {
   is_valid_ = false;
diff --git a/base/memory/weak_ptr.h b/base/memory/weak_ptr.h
index 2a42692..3b2a0af 100644
--- a/base/memory/weak_ptr.h
+++ b/base/memory/weak_ptr.h
@@ -79,8 +79,10 @@
 
 namespace base {
 
-template <typename T> class SupportsWeakPtr;
-template <typename T> class WeakPtr;
+template <typename T>
+class SupportsWeakPtr;
+template <typename T>
+class WeakPtr;
 
 namespace internal {
 // These classes are part of the WeakPtr implementation.
@@ -175,7 +177,7 @@
   // function that makes calling this easier.
   //
   // Precondition: t != nullptr
-  template<typename Derived>
+  template <typename Derived>
   static WeakPtr<Derived> StaticAsWeakPtr(Derived* t) {
     static_assert(
         std::is_base_of<internal::SupportsWeakPtrBase, Derived>::value,
@@ -197,7 +199,8 @@
 
 }  // namespace internal
 
-template <typename T> class WeakPtrFactory;
+template <typename T>
+class WeakPtrFactory;
 
 // The WeakPtr class holds a weak reference to |T*|.
 //
@@ -254,7 +257,8 @@
 
  private:
   friend class internal::SupportsWeakPtrBase;
-  template <typename U> friend class WeakPtr;
+  template <typename U>
+  friend class WeakPtr;
   friend class SupportsWeakPtr<T>;
   friend class WeakPtrFactory<T>;
 
diff --git a/base/numerics/safe_conversions_impl.h b/base/numerics/safe_conversions_impl.h
index 2516204..3355b34 100644
--- a/base/numerics/safe_conversions_impl.h
+++ b/base/numerics/safe_conversions_impl.h
@@ -691,9 +691,8 @@
                           const RangeCheck l_range,
                           const RangeCheck r_range) {
   return l_range.IsUnderflow() || r_range.IsOverflow() ||
-         (l_range == r_range &&
-          static_cast<decltype(lhs + rhs)>(lhs) <
-              static_cast<decltype(lhs + rhs)>(rhs));
+         (l_range == r_range && static_cast<decltype(lhs + rhs)>(lhs) <
+                                    static_cast<decltype(lhs + rhs)>(rhs));
 }
 
 template <typename L, typename R>
@@ -712,9 +711,8 @@
                                  const RangeCheck l_range,
                                  const RangeCheck r_range) {
   return l_range.IsUnderflow() || r_range.IsOverflow() ||
-         (l_range == r_range &&
-          static_cast<decltype(lhs + rhs)>(lhs) <=
-              static_cast<decltype(lhs + rhs)>(rhs));
+         (l_range == r_range && static_cast<decltype(lhs + rhs)>(lhs) <=
+                                    static_cast<decltype(lhs + rhs)>(rhs));
 }
 
 template <typename L, typename R>
@@ -733,9 +731,8 @@
                              const RangeCheck l_range,
                              const RangeCheck r_range) {
   return l_range.IsOverflow() || r_range.IsUnderflow() ||
-         (l_range == r_range &&
-          static_cast<decltype(lhs + rhs)>(lhs) >
-              static_cast<decltype(lhs + rhs)>(rhs));
+         (l_range == r_range && static_cast<decltype(lhs + rhs)>(lhs) >
+                                    static_cast<decltype(lhs + rhs)>(rhs));
 }
 
 template <typename L, typename R>
@@ -754,9 +751,8 @@
                                     const RangeCheck l_range,
                                     const RangeCheck r_range) {
   return l_range.IsOverflow() || r_range.IsUnderflow() ||
-         (l_range == r_range &&
-          static_cast<decltype(lhs + rhs)>(lhs) >=
-              static_cast<decltype(lhs + rhs)>(rhs));
+         (l_range == r_range && static_cast<decltype(lhs + rhs)>(lhs) >=
+                                    static_cast<decltype(lhs + rhs)>(rhs));
 }
 
 template <typename L, typename R>
diff --git a/base/optional.h b/base/optional.h
index c1d11ca..14aa4be 100644
--- a/base/optional.h
+++ b/base/optional.h
@@ -629,7 +629,7 @@
   }
 
   template <class U>
-  constexpr T value_or(U&& default_value) const& {
+  constexpr T value_or(U&& default_value) const & {
     // TODO(mlamouri): add the following assert when possible:
     // static_assert(std::is_copy_constructible<T>::value,
     //               "T must be copy constructible");
diff --git a/base/posix/eintr_wrapper.h b/base/posix/eintr_wrapper.h
index c3565da..5c24e03 100644
--- a/base/posix/eintr_wrapper.h
+++ b/base/posix/eintr_wrapper.h
@@ -25,38 +25,41 @@
 
 #if defined(NDEBUG)
 
-#define HANDLE_EINTR(x) ({ \
-  decltype(x) eintr_wrapper_result; \
-  do { \
-    eintr_wrapper_result = (x); \
-  } while (eintr_wrapper_result == -1 && errno == EINTR); \
-  eintr_wrapper_result; \
-})
+#define HANDLE_EINTR(x)                                     \
+  ({                                                        \
+    decltype(x) eintr_wrapper_result;                       \
+    do {                                                    \
+      eintr_wrapper_result = (x);                           \
+    } while (eintr_wrapper_result == -1 && errno == EINTR); \
+    eintr_wrapper_result;                                   \
+  })
 
 #else
 
-#define HANDLE_EINTR(x) ({ \
-  int eintr_wrapper_counter = 0; \
-  decltype(x) eintr_wrapper_result; \
-  do { \
-    eintr_wrapper_result = (x); \
-  } while (eintr_wrapper_result == -1 && errno == EINTR && \
-           eintr_wrapper_counter++ < 100); \
-  eintr_wrapper_result; \
-})
+#define HANDLE_EINTR(x)                                      \
+  ({                                                         \
+    int eintr_wrapper_counter = 0;                           \
+    decltype(x) eintr_wrapper_result;                        \
+    do {                                                     \
+      eintr_wrapper_result = (x);                            \
+    } while (eintr_wrapper_result == -1 && errno == EINTR && \
+             eintr_wrapper_counter++ < 100);                 \
+    eintr_wrapper_result;                                    \
+  })
 
 #endif  // NDEBUG
 
-#define IGNORE_EINTR(x) ({ \
-  decltype(x) eintr_wrapper_result; \
-  do { \
-    eintr_wrapper_result = (x); \
-    if (eintr_wrapper_result == -1 && errno == EINTR) { \
-      eintr_wrapper_result = 0; \
-    } \
-  } while (0); \
-  eintr_wrapper_result; \
-})
+#define IGNORE_EINTR(x)                                   \
+  ({                                                      \
+    decltype(x) eintr_wrapper_result;                     \
+    do {                                                  \
+      eintr_wrapper_result = (x);                         \
+      if (eintr_wrapper_result == -1 && errno == EINTR) { \
+        eintr_wrapper_result = 0;                         \
+      }                                                   \
+    } while (0);                                          \
+    eintr_wrapper_result;                                 \
+  })
 
 #else  // !OS_POSIX || OS_FUCHSIA
 
diff --git a/base/posix/file_descriptor_shuffle.cc b/base/posix/file_descriptor_shuffle.cc
index d2fd39a..f628bec 100644
--- a/base/posix/file_descriptor_shuffle.cc
+++ b/base/posix/file_descriptor_shuffle.cc
@@ -4,17 +4,17 @@
 
 #include "base/posix/file_descriptor_shuffle.h"
 
-#include <unistd.h>
 #include <stddef.h>
+#include <unistd.h>
 #include <ostream>
 
-#include "base/posix/eintr_wrapper.h"
 #include "base/logging.h"
+#include "base/posix/eintr_wrapper.h"
 
 namespace base {
 
-bool PerformInjectiveMultimapDestructive(
-    InjectiveMultimap* m, InjectionDelegate* delegate) {
+bool PerformInjectiveMultimapDestructive(InjectiveMultimap* m,
+                                         InjectionDelegate* delegate) {
   static const size_t kMaxExtraFDs = 16;
   int extra_fds[kMaxExtraFDs];
   unsigned next_extra_fd = 0;
@@ -29,8 +29,8 @@
     // We DCHECK the injectiveness of the mapping.
     for (size_t j_index = i_index + 1; j_index < m->size(); ++j_index) {
       InjectiveMultimap::value_type* j = &(*m)[j_index];
-      DCHECK(i->dest != j->dest) << "Both fd " << i->source
-          << " and " << j->source << " map to " << i->dest;
+      DCHECK(i->dest != j->dest) << "Both fd " << i->source << " and "
+                                 << j->source << " map to " << i->dest;
     }
 
     const bool is_identity = i->source == i->dest;
@@ -44,8 +44,9 @@
           if (next_extra_fd < kMaxExtraFDs) {
             extra_fds[next_extra_fd++] = temp_fd;
           } else {
-            RAW_LOG(ERROR, "PerformInjectiveMultimapDestructive overflowed "
-                           "extra_fds. Leaking file descriptors!");
+            RAW_LOG(ERROR,
+                    "PerformInjectiveMultimapDestructive overflowed "
+                    "extra_fds. Leaking file descriptors!");
           }
         }
 
diff --git a/base/posix/file_descriptor_shuffle.h b/base/posix/file_descriptor_shuffle.h
index f2e8877..6843498 100644
--- a/base/posix/file_descriptor_shuffle.h
+++ b/base/posix/file_descriptor_shuffle.h
@@ -55,10 +55,7 @@
 // A single arc of the directed graph which describes an injective multimapping.
 struct InjectionArc {
   InjectionArc(int in_source, int in_dest, bool in_close)
-      : source(in_source),
-        dest(in_dest),
-        close(in_close) {
-  }
+      : source(in_source), dest(in_dest), close(in_close) {}
 
   int source;
   int dest;
@@ -69,11 +66,10 @@
 typedef std::vector<InjectionArc> InjectiveMultimap;
 
 bool PerformInjectiveMultimap(const InjectiveMultimap& map,
-                                          InjectionDelegate* delegate);
+                              InjectionDelegate* delegate);
 
-bool PerformInjectiveMultimapDestructive(
-    InjectiveMultimap* map,
-    InjectionDelegate* delegate);
+bool PerformInjectiveMultimapDestructive(InjectiveMultimap* map,
+                                         InjectionDelegate* delegate);
 
 // This function will not call malloc but will mutate |map|
 static inline bool ShuffleFileDescriptors(InjectiveMultimap* map) {
diff --git a/base/posix/safe_strerror.cc b/base/posix/safe_strerror.cc
index aa18098..3ae684f 100644
--- a/base/posix/safe_strerror.cc
+++ b/base/posix/safe_strerror.cc
@@ -39,13 +39,13 @@
 // glibc has two strerror_r functions: a historical GNU-specific one that
 // returns type char *, and a POSIX.1-2001 compliant one available since 2.3.4
 // that returns int. This wraps the GNU-specific one.
-static void POSSIBLY_UNUSED wrap_posix_strerror_r(
-    char *(*strerror_r_ptr)(int, char *, size_t),
-    int err,
-    char *buf,
-    size_t len) {
+static void POSSIBLY_UNUSED
+wrap_posix_strerror_r(char* (*strerror_r_ptr)(int, char*, size_t),
+                      int err,
+                      char* buf,
+                      size_t len) {
   // GNU version.
-  char *rc = (*strerror_r_ptr)(err, buf, len);
+  char* rc = (*strerror_r_ptr)(err, buf, len);
   if (rc != buf) {
     // glibc did not use buf and returned a static string instead. Copy it
     // into buf.
@@ -62,11 +62,12 @@
 // guarantee that they are handled. This is compiled on all POSIX platforms, but
 // it will only be used on Linux if the POSIX strerror_r implementation is
 // being used (see below).
-static void POSSIBLY_UNUSED wrap_posix_strerror_r(
-    int (*strerror_r_ptr)(int, char *, size_t),
-    int err,
-    char *buf,
-    size_t len) {
+static void POSSIBLY_UNUSED wrap_posix_strerror_r(int (*strerror_r_ptr)(int,
+                                                                        char*,
+                                                                        size_t),
+                                                  int err,
+                                                  char* buf,
+                                                  size_t len) {
   int old_errno = errno;
   // Have to cast since otherwise we get an error if this is the GNU version
   // (but in such a scenario this function is never called). Sadly we can't use
@@ -98,16 +99,13 @@
       strerror_error = result;
     }
     // snprintf truncates and always null-terminates.
-    snprintf(buf,
-             len,
-             "Error %d while retrieving error %d",
-             strerror_error,
+    snprintf(buf, len, "Error %d while retrieving error %d", strerror_error,
              err);
   }
   errno = old_errno;
 }
 
-void safe_strerror_r(int err, char *buf, size_t len) {
+void safe_strerror_r(int err, char* buf, size_t len) {
   if (buf == nullptr || len <= 0) {
     return;
   }
diff --git a/base/posix/safe_strerror.h b/base/posix/safe_strerror.h
index 5a2f888..48e9db9 100644
--- a/base/posix/safe_strerror.h
+++ b/base/posix/safe_strerror.h
@@ -9,7 +9,6 @@
 
 #include <string>
 
-
 namespace base {
 
 // BEFORE using anything from this file, first look at PLOG and friends in
@@ -28,7 +27,7 @@
 // result is always null-terminated. The value of errno is never changed.
 //
 // Use this instead of strerror_r().
-void safe_strerror_r(int err, char *buf, size_t len);
+void safe_strerror_r(int err, char* buf, size_t len);
 
 // Calls safe_strerror_r with a buffer of suitable size and returns the result
 // in a C++ string.
diff --git a/base/process/internal_linux.cc b/base/process/internal_linux.cc
index 69a1a5b..6c2cafa 100644
--- a/base/process/internal_linux.cc
+++ b/base/process/internal_linux.cc
@@ -89,14 +89,13 @@
   // PID.
   proc_stats->push_back(stats_data.substr(0, open_parens_idx));
   // Process name without parentheses.
-  proc_stats->push_back(
-      stats_data.substr(open_parens_idx + 1,
-                        close_parens_idx - (open_parens_idx + 1)));
+  proc_stats->push_back(stats_data.substr(
+      open_parens_idx + 1, close_parens_idx - (open_parens_idx + 1)));
 
   // Split the rest.
-  std::vector<std::string> other_stats = SplitString(
-      stats_data.substr(close_parens_idx + 2), " ",
-      base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
+  std::vector<std::string> other_stats =
+      SplitString(stats_data.substr(close_parens_idx + 2), " ",
+                  base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
   for (size_t i = 0; i < other_stats.size(); ++i)
     proc_stats->push_back(other_stats[i]);
   return true;
@@ -150,8 +149,7 @@
   return ReadStatFileAndGetFieldAsInt64(stat_file, field_num);
 }
 
-size_t ReadProcStatsAndGetFieldAsSizeT(pid_t pid,
-                                       ProcStatsFields field_num) {
+size_t ReadProcStatsAndGetFieldAsSizeT(pid_t pid, ProcStatsFields field_num) {
   std::string stats_data;
   if (!ReadProcStats(pid, &stats_data))
     return 0;
@@ -214,8 +212,8 @@
   // It may be the case that this value is always 100.
   static const int kHertz = sysconf(_SC_CLK_TCK);
 
-  return TimeDelta::FromMicroseconds(
-      Time::kMicrosecondsPerSecond * clock_ticks / kHertz);
+  return TimeDelta::FromMicroseconds(Time::kMicrosecondsPerSecond *
+                                     clock_ticks / kHertz);
 }
 
 }  // namespace internal
diff --git a/base/process/internal_linux.h b/base/process/internal_linux.h
index d8904fd..56c08e6 100644
--- a/base/process/internal_linux.h
+++ b/base/process/internal_linux.h
@@ -82,8 +82,7 @@
 int64_t ReadProcSelfStatsAndGetFieldAsInt64(ProcStatsFields field_num);
 
 // Same as ReadProcStatsAndGetFieldAsInt64() but for size_t values.
-size_t ReadProcStatsAndGetFieldAsSizeT(pid_t pid,
-                                       ProcStatsFields field_num);
+size_t ReadProcStatsAndGetFieldAsSizeT(pid_t pid, ProcStatsFields field_num);
 
 // Returns the time that the OS started. Clock ticks are relative to this.
 Time GetBootTime();
diff --git a/base/process/kill.h b/base/process/kill.h
index 4bed1e5..89ab97b 100644
--- a/base/process/kill.h
+++ b/base/process/kill.h
@@ -46,13 +46,13 @@
 // exit code arguments to KillProcess*(), use platform/application
 // specific values instead.
 enum TerminationStatus {
-  TERMINATION_STATUS_NORMAL_TERMINATION,   // zero exit status
-  TERMINATION_STATUS_ABNORMAL_TERMINATION, // non-zero exit status
-  TERMINATION_STATUS_PROCESS_WAS_KILLED,   // e.g. SIGKILL or task manager kill
-  TERMINATION_STATUS_PROCESS_CRASHED,      // e.g. Segmentation fault
-  TERMINATION_STATUS_STILL_RUNNING,        // child hasn't exited yet
-  TERMINATION_STATUS_LAUNCH_FAILED,        // child process never launched
-  TERMINATION_STATUS_OOM,                  // Process died due to oom
+  TERMINATION_STATUS_NORMAL_TERMINATION,    // zero exit status
+  TERMINATION_STATUS_ABNORMAL_TERMINATION,  // non-zero exit status
+  TERMINATION_STATUS_PROCESS_WAS_KILLED,    // e.g. SIGKILL or task manager kill
+  TERMINATION_STATUS_PROCESS_CRASHED,       // e.g. Segmentation fault
+  TERMINATION_STATUS_STILL_RUNNING,         // child hasn't exited yet
+  TERMINATION_STATUS_LAUNCH_FAILED,         // child process never launched
+  TERMINATION_STATUS_OOM,                   // Process died due to oom
   TERMINATION_STATUS_MAX_ENUM
 };
 
@@ -62,8 +62,8 @@
 // Returns true if all processes were able to be killed off, false if at least
 // one couldn't be killed.
 bool KillProcesses(const FilePath::StringType& executable_name,
-                               int exit_code,
-                               const ProcessFilter* filter);
+                   int exit_code,
+                   const ProcessFilter* filter);
 
 #if defined(OS_POSIX)
 // Attempts to kill the process group identified by |process_group_id|. Returns
@@ -78,8 +78,7 @@
 // will only return a useful result the first time it is called after
 // the child exits (because it will reap the child and the information
 // will no longer be available).
-TerminationStatus GetTerminationStatus(ProcessHandle handle,
-                                                   int* exit_code);
+TerminationStatus GetTerminationStatus(ProcessHandle handle, int* exit_code);
 
 #if defined(OS_POSIX) && !defined(OS_FUCHSIA)
 // Send a kill signal to the process and then wait for the process to exit
@@ -97,8 +96,8 @@
 // GetTerminationStatus as the child will be reaped when WaitForExitCode
 // returns, and this information will be lost.
 //
-TerminationStatus GetKnownDeadTerminationStatus(
-    ProcessHandle handle, int* exit_code);
+TerminationStatus GetKnownDeadTerminationStatus(ProcessHandle handle,
+                                                int* exit_code);
 
 #if defined(OS_LINUX)
 // Spawns a thread to wait asynchronously for the child |process| to exit
@@ -114,10 +113,9 @@
 // is non-null, then only processes selected by the filter are waited on.
 // Returns after all processes have exited or wait_milliseconds have expired.
 // Returns true if all the processes exited, false otherwise.
-bool WaitForProcessesToExit(
-    const FilePath::StringType& executable_name,
-    base::TimeDelta wait,
-    const ProcessFilter* filter);
+bool WaitForProcessesToExit(const FilePath::StringType& executable_name,
+                            base::TimeDelta wait,
+                            const ProcessFilter* filter);
 
 // Waits a certain amount of time (can be 0) for all the processes with a given
 // executable name to exit, then kills off any of them that are still around.
@@ -126,9 +124,9 @@
 // any processes needed to be killed, true if they all exited cleanly within
 // the wait_milliseconds delay.
 bool CleanupProcesses(const FilePath::StringType& executable_name,
-                                  base::TimeDelta wait,
-                                  int exit_code,
-                                  const ProcessFilter* filter);
+                      base::TimeDelta wait,
+                      int exit_code,
+                      const ProcessFilter* filter);
 #endif  // !defined(OS_FUCHSIA)
 
 }  // namespace base
diff --git a/base/process/kill_posix.cc b/base/process/kill_posix.cc
index e6d658c..0e4e84d 100644
--- a/base/process/kill_posix.cc
+++ b/base/process/kill_posix.cc
@@ -28,8 +28,8 @@
   DCHECK(exit_code);
 
   int status = 0;
-  const pid_t result = HANDLE_EINTR(waitpid(handle, &status,
-                                            can_block ? 0 : WNOHANG));
+  const pid_t result =
+      HANDLE_EINTR(waitpid(handle, &status, can_block ? 0 : WNOHANG));
   if (result == -1) {
     DPLOG(ERROR) << "waitpid(" << handle << ")";
     *exit_code = 0;
diff --git a/base/process/kill_win.cc b/base/process/kill_win.cc
index 7a66442..f598c13 100644
--- a/base/process/kill_win.cc
+++ b/base/process/kill_win.cc
@@ -6,9 +6,9 @@
 
 #include <algorithm>
 
-#include <windows.h>
 #include <io.h>
 #include <stdint.h>
+#include <windows.h>
 
 #include "base/logging.h"
 #include "base/macros.h"
@@ -92,9 +92,7 @@
     DWORD remaining_wait = static_cast<DWORD>(
         std::max(static_cast<int64_t>(0),
                  wait.InMilliseconds() - (GetTickCount() - start_time)));
-    HANDLE process = OpenProcess(SYNCHRONIZE,
-                                 FALSE,
-                                 entry->th32ProcessID);
+    HANDLE process = OpenProcess(SYNCHRONIZE, FALSE, entry->th32ProcessID);
     DWORD wait_result = WaitForSingleObject(process, remaining_wait);
     CloseHandle(process);
     result &= (wait_result == WAIT_OBJECT_0);
diff --git a/base/process/memory.cc b/base/process/memory.cc
index 84305e0..2e87fea 100644
--- a/base/process/memory.cc
+++ b/base/process/memory.cc
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "base/logging.h"
 #include "base/process/memory.h"
+#include "base/logging.h"
 #include "build_config.h"
 
 namespace base {
diff --git a/base/process/memory.h b/base/process/memory.h
index 49dad5d..bbcff68 100644
--- a/base/process/memory.h
+++ b/base/process/memory.h
@@ -71,11 +71,10 @@
 // specifically ASan and other sanitizers.
 // Return value tells whether the allocation succeeded. If it fails |result| is
 // set to NULL, otherwise it holds the memory address.
-WARN_UNUSED_RESULT bool UncheckedMalloc(size_t size,
-                                                    void** result);
+WARN_UNUSED_RESULT bool UncheckedMalloc(size_t size, void** result);
 WARN_UNUSED_RESULT bool UncheckedCalloc(size_t num_items,
-                                                    size_t size,
-                                                    void** result);
+                                        size_t size,
+                                        void** result);
 
 }  // namespace base
 
diff --git a/base/process/memory_stubs.cc b/base/process/memory_stubs.cc
index 787d9ae..df4657f 100644
--- a/base/process/memory_stubs.cc
+++ b/base/process/memory_stubs.cc
@@ -9,11 +9,9 @@
 
 namespace base {
 
-void EnableTerminationOnOutOfMemory() {
-}
+void EnableTerminationOnOutOfMemory() {}
 
-void EnableTerminationOnHeapCorruption() {
-}
+void EnableTerminationOnHeapCorruption() {}
 
 bool AdjustOOMScore(ProcessId process, int score) {
   return false;
diff --git a/base/process/memory_win.cc b/base/process/memory_win.cc
index c3fe758..77a2398 100644
--- a/base/process/memory_win.cc
+++ b/base/process/memory_win.cc
@@ -40,7 +40,7 @@
 namespace {
 
 #pragma warning(push)
-#pragma warning(disable: 4702)  // Unreachable code after the _exit.
+#pragma warning(disable : 4702)  // Unreachable code after the _exit.
 
 NOINLINE int OnNoMemory(size_t size) {
   // Kill the process. This is important for security since most of code
diff --git a/base/process/process.h b/base/process/process.h
index bef0aef..857bd6d 100644
--- a/base/process/process.h
+++ b/base/process/process.h
@@ -81,10 +81,10 @@
   // Close the process handle. This will not terminate the process.
   void Close();
 
-  // Returns true if this process is still running. This is only safe on Windows
-  // (and maybe Fuchsia?), because the ProcessHandle will keep the zombie
-  // process information available until itself has been released. But on Posix,
-  // the OS may reuse the ProcessId.
+// Returns true if this process is still running. This is only safe on Windows
+// (and maybe Fuchsia?), because the ProcessHandle will keep the zombie
+// process information available until itself has been released. But on Posix,
+// the OS may reuse the ProcessId.
 #if defined(OS_WIN)
   bool IsRunning() const {
     return !WaitForExitWithTimeout(base::TimeDelta(), nullptr);
diff --git a/base/process/process_handle.h b/base/process/process_handle.h
index f241391..0ec6bf4 100644
--- a/base/process/process_handle.h
+++ b/base/process/process_handle.h
@@ -61,8 +61,7 @@
 // WARNING: To avoid inconsistent results from GetUniqueIdForProcess, this
 // should only be called very early after process startup - ideally as soon
 // after process creation as possible.
-void InitUniqueIdForProcessInPidNamespace(
-    ProcessId pid_outside_of_namespace);
+void InitUniqueIdForProcessInPidNamespace(ProcessId pid_outside_of_namespace);
 #endif
 
 // Returns the ProcessHandle of the current process.
diff --git a/base/process/process_handle_freebsd.cc b/base/process/process_handle_freebsd.cc
index 192d72b..bbbf660 100644
--- a/base/process/process_handle_freebsd.cc
+++ b/base/process/process_handle_freebsd.cc
@@ -17,7 +17,7 @@
 ProcessId GetParentProcessId(ProcessHandle process) {
   struct kinfo_proc info;
   size_t length;
-  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process };
+  int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, process};
 
   if (sysctl(mib, arraysize(mib), &info, &length, NULL, 0) < 0)
     return -1;
@@ -28,7 +28,7 @@
 FilePath GetProcessExecutablePath(ProcessHandle process) {
   char pathname[PATH_MAX];
   size_t length;
-  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, process };
+  int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, process};
 
   length = sizeof(pathname);
 
diff --git a/base/process/process_handle_mac.cc b/base/process/process_handle_mac.cc
index d9d22f7..6b62406 100644
--- a/base/process/process_handle_mac.cc
+++ b/base/process/process_handle_mac.cc
@@ -16,7 +16,7 @@
 ProcessId GetParentProcessId(ProcessHandle process) {
   struct kinfo_proc info;
   size_t length = sizeof(struct kinfo_proc);
-  int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process };
+  int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, process};
   if (sysctl(mib, 4, &info, &length, NULL, 0) < 0) {
     DPLOG(ERROR) << "sysctl";
     return -1;
diff --git a/base/process/process_handle_openbsd.cc b/base/process/process_handle_openbsd.cc
index 045e720..0e85770 100644
--- a/base/process/process_handle_openbsd.cc
+++ b/base/process/process_handle_openbsd.cc
@@ -15,8 +15,9 @@
 ProcessId GetParentProcessId(ProcessHandle process) {
   struct kinfo_proc info;
   size_t length;
-  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process,
-                sizeof(struct kinfo_proc), 0 };
+  int mib[] = {
+      CTL_KERN, KERN_PROC, KERN_PROC_PID, process, sizeof(struct kinfo_proc),
+      0};
 
   if (sysctl(mib, arraysize(mib), NULL, &length, NULL, 0) < 0)
     return -1;
@@ -32,8 +33,9 @@
 FilePath GetProcessExecutablePath(ProcessHandle process) {
   struct kinfo_proc kp;
   size_t len;
-  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process,
-                sizeof(struct kinfo_proc), 0 };
+  int mib[] = {
+      CTL_KERN, KERN_PROC, KERN_PROC_PID, process, sizeof(struct kinfo_proc),
+      0};
 
   if (sysctl(mib, arraysize(mib), NULL, &len, NULL, 0) == -1)
     return FilePath();
diff --git a/base/process/process_handle_win.cc b/base/process/process_handle_win.cc
index 67986cd..cf7ab2c 100644
--- a/base/process/process_handle_win.cc
+++ b/base/process/process_handle_win.cc
@@ -5,6 +5,7 @@
 #include "base/process/process_handle.h"
 
 #include <windows.h>
+
 #include <tlhelp32.h>
 
 #include "base/win/scoped_handle.h"
@@ -28,7 +29,7 @@
 ProcessId GetParentProcessId(ProcessHandle process) {
   ProcessId child_pid = GetProcId(process);
   PROCESSENTRY32 process_entry;
-      process_entry.dwSize = sizeof(PROCESSENTRY32);
+  process_entry.dwSize = sizeof(PROCESSENTRY32);
 
   win::ScopedHandle snapshot(CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0));
   if (snapshot.IsValid() && Process32First(snapshot.Get(), &process_entry)) {
diff --git a/base/process/process_info_mac.cc b/base/process/process_info_mac.cc
index 27b9623..3083e53 100644
--- a/base/process/process_info_mac.cc
+++ b/base/process/process_info_mac.cc
@@ -19,7 +19,7 @@
 
 // static
 const Time CurrentProcessInfo::CreationTime() {
-  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid() };
+  int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid()};
   size_t len = 0;
   if (sysctl(mib, arraysize(mib), NULL, &len, NULL, 0) < 0)
     return Time();
diff --git a/base/process/process_iterator.cc b/base/process/process_iterator.cc
index 792237b..e56b349 100644
--- a/base/process/process_iterator.cc
+++ b/base/process/process_iterator.cc
@@ -37,9 +37,8 @@
 
 NamedProcessIterator::NamedProcessIterator(
     const FilePath::StringType& executable_name,
-    const ProcessFilter* filter) : ProcessIterator(filter),
-                                   executable_name_(executable_name) {
-}
+    const ProcessFilter* filter)
+    : ProcessIterator(filter), executable_name_(executable_name) {}
 
 NamedProcessIterator::~NamedProcessIterator() = default;
 
diff --git a/base/process/process_iterator.h b/base/process/process_iterator.h
index 532104a..b0d96e4 100644
--- a/base/process/process_iterator.h
+++ b/base/process/process_iterator.h
@@ -20,6 +20,7 @@
 
 #if defined(OS_WIN)
 #include <windows.h>
+
 #include <tlhelp32.h>
 #elif defined(OS_MACOSX) || defined(OS_OPENBSD)
 #include <sys/sysctl.h>
@@ -141,7 +142,7 @@
 // given executable name.  If filter is non-null, then only processes selected
 // by the filter will be counted.
 int GetProcessCount(const FilePath::StringType& executable_name,
-                                const ProcessFilter* filter);
+                    const ProcessFilter* filter);
 
 }  // namespace base
 
diff --git a/base/process/process_iterator_freebsd.cc b/base/process/process_iterator_freebsd.cc
index 4df0d90..a69b2f0 100644
--- a/base/process/process_iterator_freebsd.cc
+++ b/base/process/process_iterator_freebsd.cc
@@ -5,9 +5,9 @@
 #include "base/process/process_iterator.h"
 
 #include <errno.h>
-#include <sys/types.h>
 #include <stddef.h>
 #include <sys/sysctl.h>
+#include <sys/types.h>
 #include <unistd.h>
 
 #include "base/logging.h"
@@ -18,10 +18,8 @@
 namespace base {
 
 ProcessIterator::ProcessIterator(const ProcessFilter* filter)
-    : index_of_kinfo_proc_(),
-      filter_(filter) {
-
-  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_UID, getuid() };
+    : index_of_kinfo_proc_(), filter_(filter) {
+  int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_UID, getuid()};
 
   bool done = false;
   int try_num = 1;
@@ -40,7 +38,7 @@
       num_of_kinfo_proc += 16;
       kinfo_procs_.resize(num_of_kinfo_proc);
       len = num_of_kinfo_proc * sizeof(struct kinfo_proc);
-      if (sysctl(mib, arraysize(mib), &kinfo_procs_[0], &len, NULL, 0) <0) {
+      if (sysctl(mib, arraysize(mib), &kinfo_procs_[0], &len, NULL, 0) < 0) {
         // If we get a mem error, it just means we need a bigger buffer, so
         // loop around again.  Anything else is a real error and give up.
         if (errno != ENOMEM) {
@@ -63,8 +61,7 @@
   }
 }
 
-ProcessIterator::~ProcessIterator() {
-}
+ProcessIterator::~ProcessIterator() {}
 
 bool ProcessIterator::CheckForNextProcess() {
   std::string data;
@@ -72,7 +69,7 @@
   for (; index_of_kinfo_proc_ < kinfo_procs_.size(); ++index_of_kinfo_proc_) {
     size_t length;
     struct kinfo_proc kinfo = kinfo_procs_[index_of_kinfo_proc_];
-    int mib[] = { CTL_KERN, KERN_PROC_ARGS, kinfo.ki_pid };
+    int mib[] = {CTL_KERN, KERN_PROC_ARGS, kinfo.ki_pid};
 
     if ((kinfo.ki_pid > 0) && (kinfo.ki_stat == SZOMB))
       continue;
@@ -92,8 +89,8 @@
 
     std::string delimiters;
     delimiters.push_back('\0');
-    entry_.cmd_line_args_ = SplitString(data, delimiters,
-                                        KEEP_WHITESPACE, SPLIT_WANT_NONEMPTY);
+    entry_.cmd_line_args_ =
+        SplitString(data, delimiters, KEEP_WHITESPACE, SPLIT_WANT_NONEMPTY);
 
     size_t exec_name_end = data.find('\0');
     if (exec_name_end == std::string::npos) {
diff --git a/base/process/process_iterator_linux.cc b/base/process/process_iterator_linux.cc
index a7b0b05..9894052 100644
--- a/base/process/process_iterator_linux.cc
+++ b/base/process/process_iterator_linux.cc
@@ -47,8 +47,8 @@
     return false;
   std::string delimiters;
   delimiters.push_back('\0');
-  *proc_cmd_line_args = SplitString(cmd_line, delimiters, KEEP_WHITESPACE,
-                                    SPLIT_WANT_NONEMPTY);
+  *proc_cmd_line_args =
+      SplitString(cmd_line, delimiters, KEEP_WHITESPACE, SPLIT_WANT_NONEMPTY);
   return true;
 }
 
diff --git a/base/process/process_iterator_mac.cc b/base/process/process_iterator_mac.cc
index 90d2184..10d712b 100644
--- a/base/process/process_iterator_mac.cc
+++ b/base/process/process_iterator_mac.cc
@@ -18,14 +18,12 @@
 namespace base {
 
 ProcessIterator::ProcessIterator(const ProcessFilter* filter)
-    : index_of_kinfo_proc_(0),
-      filter_(filter) {
+    : index_of_kinfo_proc_(0), filter_(filter) {
   // Get a snapshot of all of my processes (yes, as we loop it can go stale, but
   // but trying to find where we were in a constantly changing list is basically
   // impossible.
 
-  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_UID,
-                static_cast<int>(geteuid()) };
+  int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_UID, static_cast<int>(geteuid())};
 
   // Since more processes could start between when we get the size and when
   // we get the list, we do a loop to keep trying until we get it.
@@ -69,8 +67,7 @@
   }
 }
 
-ProcessIterator::~ProcessIterator() {
-}
+ProcessIterator::~ProcessIterator() {}
 
 bool ProcessIterator::CheckForNextProcess() {
   std::string data;
@@ -81,7 +78,7 @@
     if ((kinfo.kp_proc.p_pid > 0) && (kinfo.kp_proc.p_stat == SZOMB))
       continue;
 
-    int mib[] = { CTL_KERN, KERN_PROCARGS, kinfo.kp_proc.p_pid };
+    int mib[] = {CTL_KERN, KERN_PROCARGS, kinfo.kp_proc.p_pid};
 
     // Find out what size buffer we need.
     size_t data_len = 0;
@@ -100,8 +97,8 @@
     // |entry_.cmd_line_args_|.
     std::string delimiters;
     delimiters.push_back('\0');
-    entry_.cmd_line_args_ = SplitString(data, delimiters,
-                                        KEEP_WHITESPACE, SPLIT_WANT_NONEMPTY);
+    entry_.cmd_line_args_ =
+        SplitString(data, delimiters, KEEP_WHITESPACE, SPLIT_WANT_NONEMPTY);
 
     // |data| starts with the full executable path followed by a null character.
     // We search for the first instance of '\0' and extract everything before it
diff --git a/base/process/process_iterator_openbsd.cc b/base/process/process_iterator_openbsd.cc
index fa32df4..4362c9a 100644
--- a/base/process/process_iterator_openbsd.cc
+++ b/base/process/process_iterator_openbsd.cc
@@ -16,11 +16,10 @@
 namespace base {
 
 ProcessIterator::ProcessIterator(const ProcessFilter* filter)
-    : index_of_kinfo_proc_(),
-      filter_(filter) {
-
-  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_UID, getuid(),
-                sizeof(struct kinfo_proc), 0 };
+    : index_of_kinfo_proc_(), filter_(filter) {
+  int mib[] = {
+      CTL_KERN, KERN_PROC, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc),
+      0};
 
   bool done = false;
   int try_num = 1;
@@ -62,8 +61,7 @@
   }
 }
 
-ProcessIterator::~ProcessIterator() {
-}
+ProcessIterator::~ProcessIterator() {}
 
 bool ProcessIterator::CheckForNextProcess() {
   std::string data;
@@ -74,7 +72,7 @@
     if ((kinfo.p_pid > 0) && (kinfo.p_stat == SZOMB))
       continue;
 
-    int mib[] = { CTL_KERN, KERN_PROC_ARGS, kinfo.p_pid };
+    int mib[] = {CTL_KERN, KERN_PROC_ARGS, kinfo.p_pid};
 
     // Find out what size buffer we need.
     size_t data_len = 0;
@@ -93,8 +91,8 @@
     // |entry_.cmd_line_args_|.
     std::string delimiters;
     delimiters.push_back('\0');
-    entry_.cmd_line_args_ = SplitString(data, delimiters, KEEP_WHITESPACE,
-                                        SPLIT_WANT_NONEMPTY);
+    entry_.cmd_line_args_ =
+        SplitString(data, delimiters, KEEP_WHITESPACE, SPLIT_WANT_NONEMPTY);
 
     // |data| starts with the full executable path followed by a null character.
     // We search for the first instance of '\0' and extract everything before it
diff --git a/base/process/process_iterator_win.cc b/base/process/process_iterator_win.cc
index 9d5a970..e1bf808 100644
--- a/base/process/process_iterator_win.cc
+++ b/base/process/process_iterator_win.cc
@@ -7,8 +7,7 @@
 namespace base {
 
 ProcessIterator::ProcessIterator(const ProcessFilter* filter)
-    : started_iteration_(false),
-      filter_(filter) {
+    : started_iteration_(false), filter_(filter) {
   snapshot_ = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
 }
 
diff --git a/base/process/process_posix.cc b/base/process/process_posix.cc
index 3cc9182..5c9ce05 100644
--- a/base/process/process_posix.cc
+++ b/base/process/process_posix.cc
@@ -162,13 +162,11 @@
 
   DCHECK_EQ(result, 1);
 
-  if (event.filter != EVFILT_PROC ||
-      (event.fflags & NOTE_EXIT) == 0 ||
+  if (event.filter != EVFILT_PROC || (event.fflags & NOTE_EXIT) == 0 ||
       event.ident != static_cast<uintptr_t>(handle)) {
     DLOG(ERROR) << "kevent (wait " << handle
                 << "): unexpected event: filter=" << event.filter
-                << ", fflags=" << event.fflags
-                << ", ident=" << event.ident;
+                << ", fflags=" << event.fflags << ", ident=" << event.ident;
     return false;
   }
 
@@ -222,8 +220,7 @@
 
 namespace base {
 
-Process::Process(ProcessHandle handle) : process_(handle) {
-}
+Process::Process(ProcessHandle handle) : process_(handle) {}
 
 Process::~Process() = default;
 
diff --git a/base/process/process_win.cc b/base/process/process_win.cc
index f5bd59e..ce2b394 100644
--- a/base/process/process_win.cc
+++ b/base/process/process_win.cc
@@ -13,9 +13,9 @@
 namespace {
 
 DWORD kBasicProcessAccess =
-  PROCESS_TERMINATE | PROCESS_QUERY_INFORMATION | SYNCHRONIZE;
+    PROCESS_TERMINATE | PROCESS_QUERY_INFORMATION | SYNCHRONIZE;
 
-} // namespace
+}  // namespace
 
 namespace base {
 
@@ -30,8 +30,7 @@
   other.Close();
 }
 
-Process::~Process() {
-}
+Process::~Process() {}
 
 Process& Process::operator=(Process&& other) {
   DCHECK_NE(this, &other);
@@ -85,13 +84,9 @@
     return Current();
 
   ProcessHandle out_handle;
-  if (!IsValid() || !::DuplicateHandle(GetCurrentProcess(),
-                                       Handle(),
-                                       GetCurrentProcess(),
-                                       &out_handle,
-                                       0,
-                                       FALSE,
-                                       DUPLICATE_SAME_ACCESS)) {
+  if (!IsValid() ||
+      !::DuplicateHandle(GetCurrentProcess(), Handle(), GetCurrentProcess(),
+                         &out_handle, 0, FALSE, DUPLICATE_SAME_ACCESS)) {
     return Process();
   }
   return Process(out_handle);
@@ -162,8 +157,7 @@
   return true;
 }
 
-void Process::Exited(int exit_code) const {
-}
+void Process::Exited(int exit_code) const {}
 
 int Process::GetPriority() const {
   DCHECK(IsValid());
diff --git a/base/scoped_clear_errno.h b/base/scoped_clear_errno.h
index 585f6f7..44a0c62 100644
--- a/base/scoped_clear_errno.h
+++ b/base/scoped_clear_errno.h
@@ -15,9 +15,7 @@
 // destruction puts the old value back.
 class ScopedClearErrno {
  public:
-  ScopedClearErrno() : old_errno_(errno) {
-    errno = 0;
-  }
+  ScopedClearErrno() : old_errno_(errno) { errno = 0; }
   ~ScopedClearErrno() {
     if (errno == 0)
       errno = old_errno_;
diff --git a/base/scoped_generic.h b/base/scoped_generic.h
index 25e6208..6a56f64 100644
--- a/base/scoped_generic.h
+++ b/base/scoped_generic.h
@@ -51,7 +51,7 @@
 //   };
 //
 //   typedef ScopedGeneric<int, FooScopedTraits> ScopedFoo;
-template<typename T, typename Traits>
+template <typename T, typename Traits>
 class ScopedGeneric {
  private:
   // This must be first since it's used inline below.
@@ -78,17 +78,13 @@
 
   // Constructor. Allows initialization of a stateful traits object.
   ScopedGeneric(const element_type& value, const traits_type& traits)
-      : data_(value, traits) {
-  }
+      : data_(value, traits) {}
 
   // Move constructor. Allows initialization from a ScopedGeneric rvalue.
   ScopedGeneric(ScopedGeneric<T, Traits>&& rvalue)
-      : data_(rvalue.release(), rvalue.get_traits()) {
-  }
+      : data_(rvalue.release(), rvalue.get_traits()) {}
 
-  ~ScopedGeneric() {
-    FreeIfNecessary();
-  }
+  ~ScopedGeneric() { FreeIfNecessary(); }
 
   // operator=. Allows assignment from a ScopedGeneric rvalue.
   ScopedGeneric& operator=(ScopedGeneric<T, Traits>&& rvalue) {
@@ -158,28 +154,28 @@
   // Forbid comparison. If U != T, it totally doesn't make sense, and if U ==
   // T, it still doesn't make sense because you should never have the same
   // object owned by two different ScopedGenerics.
-  template <typename T2, typename Traits2> bool operator==(
-      const ScopedGeneric<T2, Traits2>& p2) const;
-  template <typename T2, typename Traits2> bool operator!=(
-      const ScopedGeneric<T2, Traits2>& p2) const;
+  template <typename T2, typename Traits2>
+  bool operator==(const ScopedGeneric<T2, Traits2>& p2) const;
+  template <typename T2, typename Traits2>
+  bool operator!=(const ScopedGeneric<T2, Traits2>& p2) const;
 
   Data data_;
 
   DISALLOW_COPY_AND_ASSIGN(ScopedGeneric);
 };
 
-template<class T, class Traits>
+template <class T, class Traits>
 void swap(const ScopedGeneric<T, Traits>& a,
           const ScopedGeneric<T, Traits>& b) {
   a.swap(b);
 }
 
-template<class T, class Traits>
+template <class T, class Traits>
 bool operator==(const T& value, const ScopedGeneric<T, Traits>& scoped) {
   return value == scoped.get();
 }
 
-template<class T, class Traits>
+template <class T, class Traits>
 bool operator!=(const T& value, const ScopedGeneric<T, Traits>& scoped) {
   return value != scoped.get();
 }
diff --git a/base/sha1.cc b/base/sha1.cc
index a710001..9c22be1 100644
--- a/base/sha1.cc
+++ b/base/sha1.cc
@@ -78,7 +78,7 @@
 }
 
 static inline uint32_t S(uint32_t n, uint32_t X) {
-  return (X << n) | (X >> (32-n));
+  return (X << n) | (X >> (32 - n));
 }
 
 static inline uint32_t K(uint32_t t) {
@@ -131,7 +131,7 @@
 void SecureHashAlgorithm::Pad() {
   M[cursor++] = 0x80;
 
-  if (cursor > 64-8) {
+  if (cursor > 64 - 8) {
     // pad out to next block
     while (cursor < 64)
       M[cursor++] = 0;
@@ -139,7 +139,7 @@
     Process();
   }
 
-  while (cursor < 64-8)
+  while (cursor < 64 - 8)
     M[cursor++] = 0;
 
   M[cursor++] = (l >> 56) & 0xff;
@@ -202,8 +202,7 @@
   return std::string(hash, SecureHashAlgorithm::kDigestSizeBytes);
 }
 
-void SHA1HashBytes(const unsigned char* data, size_t len,
-                   unsigned char* hash) {
+void SHA1HashBytes(const unsigned char* data, size_t len, unsigned char* hash) {
   SecureHashAlgorithm sha;
   sha.Update(data, len);
   sha.Final();
diff --git a/base/sha1.h b/base/sha1.h
index 5394606..482ebe6 100644
--- a/base/sha1.h
+++ b/base/sha1.h
@@ -9,7 +9,6 @@
 
 #include <string>
 
-
 namespace base {
 
 // These functions perform SHA-1 operations.
@@ -22,8 +21,7 @@
 
 // Computes the SHA-1 hash of the |len| bytes in |data| and puts the hash
 // in |hash|. |hash| must be kSHA1Length bytes long.
-void SHA1HashBytes(const unsigned char* data, size_t len,
-                               unsigned char* hash);
+void SHA1HashBytes(const unsigned char* data, size_t len, unsigned char* hash);
 
 }  // namespace base
 
diff --git a/base/stl_util.h b/base/stl_util.h
index 6d521cc..d9e3484 100644
--- a/base/stl_util.h
+++ b/base/stl_util.h
@@ -117,7 +117,7 @@
 // Clears internal memory of an STL object.
 // STL clear()/reserve(0) does not always free internal memory allocated
 // This function uses swap/destructor to ensure the internal memory is freed.
-template<class T>
+template <class T>
 void STLClearObject(T* obj) {
   T tmp;
   tmp.swap(*obj);
@@ -175,8 +175,8 @@
   // Note: Use reverse iterator on container to ensure we only require
   // value_type to implement operator<.
   return std::adjacent_find(cont.rbegin(), cont.rend(),
-                            std::less<typename Container::value_type>())
-      == cont.rend();
+                            std::less<typename Container::value_type>()) ==
+         cont.rend();
 }
 
 // Returns a new ResultType containing the difference of two sorted containers.
@@ -185,8 +185,7 @@
   DCHECK(STLIsSorted(a1));
   DCHECK(STLIsSorted(a2));
   ResultType difference;
-  std::set_difference(a1.begin(), a1.end(),
-                      a2.begin(), a2.end(),
+  std::set_difference(a1.begin(), a1.end(), a2.begin(), a2.end(),
                       std::inserter(difference, difference.end()));
   return difference;
 }
@@ -197,8 +196,7 @@
   DCHECK(STLIsSorted(a1));
   DCHECK(STLIsSorted(a2));
   ResultType result;
-  std::set_union(a1.begin(), a1.end(),
-                 a2.begin(), a2.end(),
+  std::set_union(a1.begin(), a1.end(), a2.begin(), a2.end(),
                  std::inserter(result, result.end()));
   return result;
 }
@@ -210,8 +208,7 @@
   DCHECK(STLIsSorted(a1));
   DCHECK(STLIsSorted(a2));
   ResultType result;
-  std::set_intersection(a1.begin(), a1.end(),
-                        a2.begin(), a2.end(),
+  std::set_intersection(a1.begin(), a1.end(), a2.begin(), a2.end(),
                         std::inserter(result, result.end()));
   return result;
 }
@@ -222,8 +219,7 @@
 bool STLIncludes(const Arg1& a1, const Arg2& a2) {
   DCHECK(STLIsSorted(a1));
   DCHECK(STLIsSorted(a2));
-  return std::includes(a1.begin(), a1.end(),
-                       a2.begin(), a2.end());
+  return std::includes(a1.begin(), a1.end(), a2.begin(), a2.end());
 }
 
 // Erase/EraseIf are based on library fundamentals ts v2 erase/erase_if
diff --git a/base/strings/string16.cc b/base/strings/string16.cc
index 2abb0e5..997ab20 100644
--- a/base/strings/string16.cc
+++ b/base/strings/string16.cc
@@ -33,7 +33,7 @@
 }
 
 size_t c16len(const char16* s) {
-  const char16 *s_orig = s;
+  const char16* s_orig = s;
   while (*s) {
     ++s;
   }
@@ -59,7 +59,7 @@
 }
 
 char16* c16memset(char16* s, char16 c, size_t n) {
-  char16 *s_orig = s;
+  char16* s_orig = s;
   while (n-- > 0) {
     *s = c;
     ++s;
diff --git a/base/strings/string16.h b/base/strings/string16.h
index b143375..e79aee8 100644
--- a/base/strings/string16.h
+++ b/base/strings/string16.h
@@ -80,26 +80,19 @@
   typedef mbstate_t state_type;
   typedef std::fpos<state_type> pos_type;
 
-  static void assign(char_type& c1, const char_type& c2) {
-    c1 = c2;
-  }
+  static void assign(char_type& c1, const char_type& c2) { c1 = c2; }
 
-  static bool eq(const char_type& c1, const char_type& c2) {
-    return c1 == c2;
-  }
-  static bool lt(const char_type& c1, const char_type& c2) {
-    return c1 < c2;
-  }
+  static bool eq(const char_type& c1, const char_type& c2) { return c1 == c2; }
+  static bool lt(const char_type& c1, const char_type& c2) { return c1 < c2; }
 
   static int compare(const char_type* s1, const char_type* s2, size_t n) {
     return c16memcmp(s1, s2, n);
   }
 
-  static size_t length(const char_type* s) {
-    return c16len(s);
-  }
+  static size_t length(const char_type* s) { return c16len(s); }
 
-  static const char_type* find(const char_type* s, size_t n,
+  static const char_type* find(const char_type* s,
+                               size_t n,
                                const char_type& a) {
     return c16memchr(s, a, n);
   }
@@ -120,21 +113,15 @@
     return eq_int_type(c, eof()) ? 0 : c;
   }
 
-  static char_type to_char_type(const int_type& c) {
-    return char_type(c);
-  }
+  static char_type to_char_type(const int_type& c) { return char_type(c); }
 
-  static int_type to_int_type(const char_type& c) {
-    return int_type(c);
-  }
+  static int_type to_int_type(const char_type& c) { return int_type(c); }
 
   static bool eq_int_type(const int_type& c1, const int_type& c2) {
     return c1 == c2;
   }
 
-  static int_type eof() {
-    return static_cast<int_type>(EOF);
-  }
+  static int_type eof() { return static_cast<int_type>(EOF); }
 };
 
 }  // namespace string16_internals
@@ -145,8 +132,7 @@
 
 namespace string16_internals {
 
-extern std::ostream& operator<<(std::ostream& out,
-                                            const string16& str);
+extern std::ostream& operator<<(std::ostream& out, const string16& str);
 
 // This is required by googletest to print a readable output on test failures.
 extern void PrintTo(const string16& str, std::ostream* out);
@@ -194,9 +180,8 @@
 //
 // TODO(mark): File this bug with Apple and update this note with a bug number.
 
-extern template class
-    std::basic_string<base::char16,
-                      base::string16_internals::string16_char_traits>;
+extern template class std::
+    basic_string<base::char16, base::string16_internals::string16_char_traits>;
 
 // Specialize std::hash for base::string16. Although the style guide forbids
 // this in general, it is necessary for consistency with WCHAR_T_IS_UTF16
diff --git a/base/strings/string_number_conversions.cc b/base/strings/string_number_conversions.cc
index c2a606f..01375f5 100644
--- a/base/strings/string_number_conversions.cc
+++ b/base/strings/string_number_conversions.cc
@@ -57,11 +57,12 @@
 };
 
 // Utility to convert a character to a digit in a given base
-template<typename CHAR, int BASE, bool BASE_LTE_10> class BaseCharToDigit {
-};
+template <typename CHAR, int BASE, bool BASE_LTE_10>
+class BaseCharToDigit {};
 
 // Faster specialization for bases <= 10
-template<typename CHAR, int BASE> class BaseCharToDigit<CHAR, BASE, true> {
+template <typename CHAR, int BASE>
+class BaseCharToDigit<CHAR, BASE, true> {
  public:
   static bool Convert(CHAR c, uint8_t* digit) {
     if (c >= '0' && c < '0' + BASE) {
@@ -73,7 +74,8 @@
 };
 
 // Specialization for bases where 10 < base <= 36
-template<typename CHAR, int BASE> class BaseCharToDigit<CHAR, BASE, false> {
+template <typename CHAR, int BASE>
+class BaseCharToDigit<CHAR, BASE, false> {
  public:
   static bool Convert(CHAR c, uint8_t* digit) {
     if (c >= '0' && c <= '9') {
@@ -98,24 +100,25 @@
 // is locale independent, whereas the functions we are replacing were
 // locale-dependent. TBD what is desired, but for the moment let's not
 // introduce a change in behaviour.
-template<typename CHAR> class WhitespaceHelper {
-};
+template <typename CHAR>
+class WhitespaceHelper {};
 
-template<> class WhitespaceHelper<char> {
+template <>
+class WhitespaceHelper<char> {
  public:
   static bool Invoke(char c) {
     return 0 != isspace(static_cast<unsigned char>(c));
   }
 };
 
-template<> class WhitespaceHelper<char16> {
+template <>
+class WhitespaceHelper<char16> {
  public:
-  static bool Invoke(char16 c) {
-    return 0 != iswspace(c);
-  }
+  static bool Invoke(char16 c) { return 0 != iswspace(c); }
 };
 
-template<typename CHAR> bool LocalIsWhitespace(CHAR c) {
+template <typename CHAR>
+bool LocalIsWhitespace(CHAR c) {
   return WhitespaceHelper<CHAR>::Invoke(c);
 }
 
@@ -125,7 +128,7 @@
 //  - static functions min, max (returning the minimum and maximum permitted
 //    values)
 //  - constant kBase, the base in which to interpret the input
-template<typename IteratorRangeToNumberTraits>
+template <typename IteratorRangeToNumberTraits>
 class IteratorRangeToNumber {
  public:
   typedef IteratorRangeToNumberTraits traits;
@@ -169,10 +172,11 @@
   //    causes an overflow/underflow
   //  - a static function, Increment, that appends the next digit appropriately
   //    according to the sign of the number being parsed.
-  template<typename Sign>
+  template <typename Sign>
   class Base {
    public:
-    static bool Invoke(const_iterator begin, const_iterator end,
+    static bool Invoke(const_iterator begin,
+                       const_iterator end,
                        typename traits::value_type* output) {
       *output = 0;
 
@@ -240,24 +244,19 @@
   };
 };
 
-template<typename ITERATOR, typename VALUE, int BASE>
+template <typename ITERATOR, typename VALUE, int BASE>
 class BaseIteratorRangeToNumberTraits {
  public:
   typedef ITERATOR iterator_type;
   typedef VALUE value_type;
-  static value_type min() {
-    return std::numeric_limits<value_type>::min();
-  }
-  static value_type max() {
-    return std::numeric_limits<value_type>::max();
-  }
+  static value_type min() { return std::numeric_limits<value_type>::min(); }
+  static value_type max() { return std::numeric_limits<value_type>::max(); }
   static const int kBase = BASE;
 };
 
-template<typename ITERATOR>
+template <typename ITERATOR>
 class BaseHexIteratorRangeToIntTraits
-    : public BaseIteratorRangeToNumberTraits<ITERATOR, int, 16> {
-};
+    : public BaseIteratorRangeToNumberTraits<ITERATOR, int, 16> {};
 
 template <typename ITERATOR>
 class BaseHexIteratorRangeToUIntTraits
@@ -287,12 +286,11 @@
 class StringPieceToNumberTraits
     : public BaseIteratorRangeToNumberTraits<StringPiece::const_iterator,
                                              VALUE,
-                                             BASE> {
-};
+                                             BASE> {};
 
 template <typename VALUE>
 bool StringToIntImpl(StringPiece input, VALUE* output) {
-  return IteratorRangeToNumber<StringPieceToNumberTraits<VALUE, 10> >::Invoke(
+  return IteratorRangeToNumber<StringPieceToNumberTraits<VALUE, 10>>::Invoke(
       input.begin(), input.end(), output);
 }
 
@@ -300,12 +298,11 @@
 class StringPiece16ToNumberTraits
     : public BaseIteratorRangeToNumberTraits<StringPiece16::const_iterator,
                                              VALUE,
-                                             BASE> {
-};
+                                             BASE> {};
 
 template <typename VALUE>
 bool String16ToIntImpl(StringPiece16 input, VALUE* output) {
-  return IteratorRangeToNumber<StringPiece16ToNumberTraits<VALUE, 10> >::Invoke(
+  return IteratorRangeToNumber<StringPiece16ToNumberTraits<VALUE, 10>>::Invoke(
       input.begin(), input.end(), output);
 }
 
@@ -423,7 +420,7 @@
 
 bool HexStringToInt(StringPiece input, int* output) {
   return IteratorRangeToNumber<HexIteratorRangeToIntTraits>::Invoke(
-    input.begin(), input.end(), output);
+      input.begin(), input.end(), output);
 }
 
 bool HexStringToUInt(StringPiece input, uint32_t* output) {
@@ -433,7 +430,7 @@
 
 bool HexStringToInt64(StringPiece input, int64_t* output) {
   return IteratorRangeToNumber<HexIteratorRangeToInt64Traits>::Invoke(
-    input.begin(), input.end(), output);
+      input.begin(), input.end(), output);
 }
 
 bool HexStringToUInt64(StringPiece input, uint64_t* output) {
diff --git a/base/strings/string_number_conversions.h b/base/strings/string_number_conversions.h
index d31f09b..e89e26b 100644
--- a/base/strings/string_number_conversions.h
+++ b/base/strings/string_number_conversions.h
@@ -145,8 +145,7 @@
 // |*output| will contain as many bytes as were successfully parsed prior to the
 // error.  There is no overflow, but input.size() must be evenly divisible by 2.
 // Leading 0x or +/- are not allowed.
-bool HexStringToBytes(StringPiece input,
-                                  std::vector<uint8_t>* output);
+bool HexStringToBytes(StringPiece input, std::vector<uint8_t>* output);
 
 }  // namespace base
 
diff --git a/base/strings/string_piece.cc b/base/strings/string_piece.cc
index be22261..612298a 100644
--- a/base/strings/string_piece.cc
+++ b/base/strings/string_piece.cc
@@ -55,7 +55,7 @@
 
 namespace internal {
 
-template<typename STR>
+template <typename STR>
 void CopyToStringT(const BasicStringPiece<STR>& self, STR* target) {
   if (self.empty())
     target->clear();
@@ -71,7 +71,7 @@
   CopyToStringT(self, target);
 }
 
-template<typename STR>
+template <typename STR>
 void AppendToStringT(const BasicStringPiece<STR>& self, STR* target) {
   if (!self.empty())
     target->append(self.data(), self.size());
@@ -85,7 +85,7 @@
   AppendToStringT(self, target);
 }
 
-template<typename STR>
+template <typename STR>
 size_t copyT(const BasicStringPiece<STR>& self,
              typename STR::value_type* buf,
              size_t n,
@@ -103,7 +103,7 @@
   return copyT(self, buf, n, pos);
 }
 
-template<typename STR>
+template <typename STR>
 size_t findT(const BasicStringPiece<STR>& self,
              const BasicStringPiece<STR>& s,
              size_t pos) {
@@ -112,8 +112,7 @@
 
   typename BasicStringPiece<STR>::const_iterator result =
       std::search(self.begin() + pos, self.end(), s.begin(), s.end());
-  const size_t xpos =
-    static_cast<size_t>(result - self.begin());
+  const size_t xpos = static_cast<size_t>(result - self.begin());
   return xpos + s.size() <= self.size() ? xpos : BasicStringPiece<STR>::npos;
 }
 
@@ -125,7 +124,7 @@
   return findT(self, s, pos);
 }
 
-template<typename STR>
+template <typename STR>
 size_t findT(const BasicStringPiece<STR>& self,
              typename STR::value_type c,
              size_t pos) {
@@ -134,8 +133,8 @@
 
   typename BasicStringPiece<STR>::const_iterator result =
       std::find(self.begin() + pos, self.end(), c);
-  return result != self.end() ?
-      static_cast<size_t>(result - self.begin()) : BasicStringPiece<STR>::npos;
+  return result != self.end() ? static_cast<size_t>(result - self.begin())
+                              : BasicStringPiece<STR>::npos;
 }
 
 size_t find(const StringPiece& self, char c, size_t pos) {
@@ -146,7 +145,7 @@
   return findT(self, c, pos);
 }
 
-template<typename STR>
+template <typename STR>
 size_t rfindT(const BasicStringPiece<STR>& self,
               const BasicStringPiece<STR>& s,
               size_t pos) {
@@ -160,8 +159,8 @@
       self.begin() + std::min(self.size() - s.size(), pos) + s.size();
   typename BasicStringPiece<STR>::const_iterator result =
       std::find_end(self.begin(), last, s.begin(), s.end());
-  return result != last ?
-      static_cast<size_t>(result - self.begin()) : BasicStringPiece<STR>::npos;
+  return result != last ? static_cast<size_t>(result - self.begin())
+                        : BasicStringPiece<STR>::npos;
 }
 
 size_t rfind(const StringPiece& self, const StringPiece& s, size_t pos) {
@@ -172,15 +171,14 @@
   return rfindT(self, s, pos);
 }
 
-template<typename STR>
+template <typename STR>
 size_t rfindT(const BasicStringPiece<STR>& self,
               typename STR::value_type c,
               size_t pos) {
   if (self.size() == 0)
     return BasicStringPiece<STR>::npos;
 
-  for (size_t i = std::min(pos, self.size() - 1); ;
-       --i) {
+  for (size_t i = std::min(pos, self.size() - 1);; --i) {
     if (self.data()[i] == c)
       return i;
     if (i == 0)
@@ -208,7 +206,7 @@
   if (s.size() == 1)
     return find(self, s.data()[0], pos);
 
-  bool lookup[UCHAR_MAX + 1] = { false };
+  bool lookup[UCHAR_MAX + 1] = {false};
   BuildLookupTable(s, lookup);
   for (size_t i = pos; i < self.size(); ++i) {
     if (lookup[static_cast<unsigned char>(self.data()[i])]) {
@@ -243,7 +241,7 @@
   if (s.size() == 1)
     return find_first_not_of(self, s.data()[0], pos);
 
-  bool lookup[UCHAR_MAX + 1] = { false };
+  bool lookup[UCHAR_MAX + 1] = {false};
   BuildLookupTable(s, lookup);
   for (size_t i = pos; i < self.size(); ++i) {
     if (!lookup[static_cast<unsigned char>(self.data()[i])]) {
@@ -255,8 +253,8 @@
 
 // 16-bit brute-force version.
 size_t find_first_not_of(const StringPiece16& self,
-                                     const StringPiece16& s,
-                                     size_t pos) {
+                         const StringPiece16& s,
+                         size_t pos) {
   if (self.size() == 0)
     return StringPiece16::npos;
 
@@ -274,7 +272,7 @@
   return StringPiece16::npos;
 }
 
-template<typename STR>
+template <typename STR>
 size_t find_first_not_ofT(const BasicStringPiece<STR>& self,
                           typename STR::value_type c,
                           size_t pos) {
@@ -289,15 +287,11 @@
   return BasicStringPiece<STR>::npos;
 }
 
-size_t find_first_not_of(const StringPiece& self,
-                         char c,
-                         size_t pos) {
+size_t find_first_not_of(const StringPiece& self, char c, size_t pos) {
   return find_first_not_ofT(self, c, pos);
 }
 
-size_t find_first_not_of(const StringPiece16& self,
-                         char16 c,
-                         size_t pos) {
+size_t find_first_not_of(const StringPiece16& self, char16 c, size_t pos) {
   return find_first_not_ofT(self, c, pos);
 }
 
@@ -310,9 +304,9 @@
   if (s.size() == 1)
     return rfind(self, s.data()[0], pos);
 
-  bool lookup[UCHAR_MAX + 1] = { false };
+  bool lookup[UCHAR_MAX + 1] = {false};
   BuildLookupTable(s, lookup);
-  for (size_t i = std::min(pos, self.size() - 1); ; --i) {
+  for (size_t i = std::min(pos, self.size() - 1);; --i) {
     if (lookup[static_cast<unsigned char>(self.data()[i])])
       return i;
     if (i == 0)
@@ -328,8 +322,7 @@
   if (self.size() == 0)
     return StringPiece16::npos;
 
-  for (size_t self_i = std::min(pos, self.size() - 1); ;
-       --self_i) {
+  for (size_t self_i = std::min(pos, self.size() - 1);; --self_i) {
     for (size_t s_i = 0; s_i < s.size(); s_i++) {
       if (self.data()[self_i] == s[s_i])
         return self_i;
@@ -355,9 +348,9 @@
   if (s.size() == 1)
     return find_last_not_of(self, s.data()[0], pos);
 
-  bool lookup[UCHAR_MAX + 1] = { false };
+  bool lookup[UCHAR_MAX + 1] = {false};
   BuildLookupTable(s, lookup);
-  for (; ; --i) {
+  for (;; --i) {
     if (!lookup[static_cast<unsigned char>(self.data()[i])])
       return i;
     if (i == 0)
@@ -373,7 +366,7 @@
   if (self.size() == 0)
     return StringPiece::npos;
 
-  for (size_t self_i = std::min(pos, self.size() - 1); ; --self_i) {
+  for (size_t self_i = std::min(pos, self.size() - 1);; --self_i) {
     bool found = false;
     for (size_t s_i = 0; s_i < s.size(); s_i++) {
       if (self.data()[self_i] == s[s_i]) {
@@ -389,14 +382,14 @@
   return StringPiece16::npos;
 }
 
-template<typename STR>
+template <typename STR>
 size_t find_last_not_ofT(const BasicStringPiece<STR>& self,
                          typename STR::value_type c,
                          size_t pos) {
   if (self.size() == 0)
     return BasicStringPiece<STR>::npos;
 
-  for (size_t i = std::min(pos, self.size() - 1); ; --i) {
+  for (size_t i = std::min(pos, self.size() - 1);; --i) {
     if (self.data()[i] != c)
       return i;
     if (i == 0)
@@ -405,36 +398,30 @@
   return BasicStringPiece<STR>::npos;
 }
 
-size_t find_last_not_of(const StringPiece& self,
-                        char c,
-                        size_t pos) {
+size_t find_last_not_of(const StringPiece& self, char c, size_t pos) {
   return find_last_not_ofT(self, c, pos);
 }
 
-size_t find_last_not_of(const StringPiece16& self,
-                        char16 c,
-                        size_t pos) {
+size_t find_last_not_of(const StringPiece16& self, char16 c, size_t pos) {
   return find_last_not_ofT(self, c, pos);
 }
 
-template<typename STR>
+template <typename STR>
 BasicStringPiece<STR> substrT(const BasicStringPiece<STR>& self,
                               size_t pos,
                               size_t n) {
-  if (pos > self.size()) pos = self.size();
-  if (n > self.size() - pos) n = self.size() - pos;
+  if (pos > self.size())
+    pos = self.size();
+  if (n > self.size() - pos)
+    n = self.size() - pos;
   return BasicStringPiece<STR>(self.data() + pos, n);
 }
 
-StringPiece substr(const StringPiece& self,
-                   size_t pos,
-                   size_t n) {
+StringPiece substr(const StringPiece& self, size_t pos, size_t n) {
   return substrT(self, pos, n);
 }
 
-StringPiece16 substr(const StringPiece16& self,
-                     size_t pos,
-                     size_t n) {
+StringPiece16 substr(const StringPiece16& self, size_t pos, size_t n) {
   return substrT(self, pos, n);
 }
 
diff --git a/base/strings/string_piece.h b/base/strings/string_piece.h
index 6b19b80..8e4deae 100644
--- a/base/strings/string_piece.h
+++ b/base/strings/string_piece.h
@@ -51,100 +51,58 @@
 void AppendToString(const StringPiece& self, std::string* target);
 void AppendToString(const StringPiece16& self, string16* target);
 
-size_t copy(const StringPiece& self,
-                        char* buf,
-                        size_t n,
-                        size_t pos);
-size_t copy(const StringPiece16& self,
-                        char16* buf,
-                        size_t n,
-                        size_t pos);
+size_t copy(const StringPiece& self, char* buf, size_t n, size_t pos);
+size_t copy(const StringPiece16& self, char16* buf, size_t n, size_t pos);
 
-size_t find(const StringPiece& self,
-                        const StringPiece& s,
-                        size_t pos);
-size_t find(const StringPiece16& self,
-                        const StringPiece16& s,
-                        size_t pos);
-size_t find(const StringPiece& self,
-                        char c,
-                        size_t pos);
-size_t find(const StringPiece16& self,
-                        char16 c,
-                        size_t pos);
+size_t find(const StringPiece& self, const StringPiece& s, size_t pos);
+size_t find(const StringPiece16& self, const StringPiece16& s, size_t pos);
+size_t find(const StringPiece& self, char c, size_t pos);
+size_t find(const StringPiece16& self, char16 c, size_t pos);
 
-size_t rfind(const StringPiece& self,
+size_t rfind(const StringPiece& self, const StringPiece& s, size_t pos);
+size_t rfind(const StringPiece16& self, const StringPiece16& s, size_t pos);
+size_t rfind(const StringPiece& self, char c, size_t pos);
+size_t rfind(const StringPiece16& self, char16 c, size_t pos);
+
+size_t find_first_of(const StringPiece& self, const StringPiece& s, size_t pos);
+size_t find_first_of(const StringPiece16& self,
+                     const StringPiece16& s,
+                     size_t pos);
+
+size_t find_first_not_of(const StringPiece& self,
                          const StringPiece& s,
                          size_t pos);
-size_t rfind(const StringPiece16& self,
+size_t find_first_not_of(const StringPiece16& self,
                          const StringPiece16& s,
                          size_t pos);
-size_t rfind(const StringPiece& self,
-                         char c,
-                         size_t pos);
-size_t rfind(const StringPiece16& self,
-                         char16 c,
-                         size_t pos);
+size_t find_first_not_of(const StringPiece& self, char c, size_t pos);
+size_t find_first_not_of(const StringPiece16& self, char16 c, size_t pos);
 
-size_t find_first_of(const StringPiece& self,
-                                 const StringPiece& s,
-                                 size_t pos);
-size_t find_first_of(const StringPiece16& self,
-                                 const StringPiece16& s,
-                                 size_t pos);
-
-size_t find_first_not_of(const StringPiece& self,
-                                     const StringPiece& s,
-                                     size_t pos);
-size_t find_first_not_of(const StringPiece16& self,
-                                     const StringPiece16& s,
-                                     size_t pos);
-size_t find_first_not_of(const StringPiece& self,
-                                     char c,
-                                     size_t pos);
-size_t find_first_not_of(const StringPiece16& self,
-                                     char16 c,
-                                     size_t pos);
-
-size_t find_last_of(const StringPiece& self,
-                                const StringPiece& s,
-                                size_t pos);
+size_t find_last_of(const StringPiece& self, const StringPiece& s, size_t pos);
 size_t find_last_of(const StringPiece16& self,
-                                const StringPiece16& s,
-                                size_t pos);
-size_t find_last_of(const StringPiece& self,
-                                char c,
-                                size_t pos);
-size_t find_last_of(const StringPiece16& self,
-                                char16 c,
-                                size_t pos);
+                    const StringPiece16& s,
+                    size_t pos);
+size_t find_last_of(const StringPiece& self, char c, size_t pos);
+size_t find_last_of(const StringPiece16& self, char16 c, size_t pos);
 
 size_t find_last_not_of(const StringPiece& self,
-                                    const StringPiece& s,
-                                    size_t pos);
+                        const StringPiece& s,
+                        size_t pos);
 size_t find_last_not_of(const StringPiece16& self,
-                                    const StringPiece16& s,
-                                    size_t pos);
-size_t find_last_not_of(const StringPiece16& self,
-                                    char16 c,
-                                    size_t pos);
-size_t find_last_not_of(const StringPiece& self,
-                                    char c,
-                                    size_t pos);
+                        const StringPiece16& s,
+                        size_t pos);
+size_t find_last_not_of(const StringPiece16& self, char16 c, size_t pos);
+size_t find_last_not_of(const StringPiece& self, char c, size_t pos);
 
-StringPiece substr(const StringPiece& self,
-                               size_t pos,
-                               size_t n);
-StringPiece16 substr(const StringPiece16& self,
-                                 size_t pos,
-                                 size_t n);
+StringPiece substr(const StringPiece& self, size_t pos, size_t n);
+StringPiece16 substr(const StringPiece16& self, size_t pos, size_t n);
 
 #if DCHECK_IS_ON()
 // Asserts that begin <= end to catch some errors with iterator usage.
 void AssertIteratorsInOrder(std::string::const_iterator begin,
-                                        std::string::const_iterator end);
+                            std::string::const_iterator end);
 void AssertIteratorsInOrder(string16::const_iterator begin,
-                                        string16::const_iterator end);
+                            string16::const_iterator end);
 #endif
 
 }  // namespace internal
@@ -157,7 +115,8 @@
 //
 // This is templatized by string class type rather than character type, so
 // BasicStringPiece<std::string> or BasicStringPiece<base::string16>.
-template <typename STRING_TYPE> class BasicStringPiece {
+template <typename STRING_TYPE>
+class BasicStringPiece {
  public:
   // Standard STL container boilerplate.
   typedef size_t size_type;
@@ -252,8 +211,10 @@
     int r = CharTraits<value_type>::compare(
         ptr_, x.ptr_, (length_ < x.length_ ? length_ : x.length_));
     if (r == 0) {
-      if (length_ < x.length_) r = -1;
-      else if (length_ > x.length_) r = +1;
+      if (length_ < x.length_)
+        r = -1;
+      else if (length_ > x.length_)
+        r = +1;
     }
     return r;
   }
@@ -271,9 +232,7 @@
   const_reverse_iterator rbegin() const {
     return const_reverse_iterator(ptr_ + length_);
   }
-  const_reverse_iterator rend() const {
-    return const_reverse_iterator(ptr_);
-  }
+  const_reverse_iterator rend() const { return const_reverse_iterator(ptr_); }
 
   size_type max_size() const { return length_; }
   size_type capacity() const { return length_; }
@@ -326,8 +285,7 @@
   }
 
   // find_first_of: Find the first occurence of one of a set of characters.
-  size_type find_first_of(const BasicStringPiece& s,
-                          size_type pos = 0) const {
+  size_type find_first_of(const BasicStringPiece& s, size_type pos = 0) const {
     return internal::find_first_of(*this, s, pos);
   }
   size_type find_first_of(value_type c, size_type pos = 0) const {
@@ -376,8 +334,8 @@
 
 template <typename STRING_TYPE>
 const typename BasicStringPiece<STRING_TYPE>::size_type
-BasicStringPiece<STRING_TYPE>::npos =
-    typename BasicStringPiece<STRING_TYPE>::size_type(-1);
+    BasicStringPiece<STRING_TYPE>::npos =
+        typename BasicStringPiece<STRING_TYPE>::size_type(-1);
 
 // MSVC doesn't like complex extern templates and DLLs.
 #if !defined(COMPILER_MSVC)
@@ -443,8 +401,7 @@
   return !(x < y);
 }
 
-std::ostream& operator<<(std::ostream& o,
-                                     const StringPiece& piece);
+std::ostream& operator<<(std::ostream& o, const StringPiece& piece);
 
 // Hashing ---------------------------------------------------------------------
 
diff --git a/base/strings/string_split.cc b/base/strings/string_split.cc
index 81e47a6..e9b5c96 100644
--- a/base/strings/string_split.cc
+++ b/base/strings/string_split.cc
@@ -20,25 +20,28 @@
 //
 // The default converter is a NOP, it works when the OutputType is the
 // correct StringPiece.
-template<typename Str, typename OutputType>
+template <typename Str, typename OutputType>
 OutputType PieceToOutputType(BasicStringPiece<Str> piece) {
   return piece;
 }
-template<>  // Convert StringPiece to std::string
+template <>  // Convert StringPiece to std::string
 std::string PieceToOutputType<std::string, std::string>(StringPiece piece) {
   return piece.as_string();
 }
-template<>  // Convert StringPiece16 to string16.
+template <>  // Convert StringPiece16 to string16.
 string16 PieceToOutputType<string16, string16>(StringPiece16 piece) {
   return piece.as_string();
 }
 
 // Returns either the ASCII or UTF-16 whitespace.
-template<typename Str> BasicStringPiece<Str> WhitespaceForType();
-template<> StringPiece16 WhitespaceForType<string16>() {
+template <typename Str>
+BasicStringPiece<Str> WhitespaceForType();
+template <>
+StringPiece16 WhitespaceForType<string16>() {
   return kWhitespaceUTF16;
 }
-template<> StringPiece WhitespaceForType<std::string>() {
+template <>
+StringPiece WhitespaceForType<std::string>() {
   return kWhitespaceASCII;
 }
 
@@ -69,12 +72,11 @@
 // multiple characters (BasicStringPiece<Str>). StringPiece has a version of
 // find for both of these cases, and the single-character version is the most
 // common and can be implemented faster, which is why this is a template.
-template<typename Str, typename OutputStringType, typename DelimiterType>
-static std::vector<OutputStringType> SplitStringT(
-    BasicStringPiece<Str> str,
-    DelimiterType delimiter,
-    WhitespaceHandling whitespace,
-    SplitResult result_type) {
+template <typename Str, typename OutputStringType, typename DelimiterType>
+static std::vector<OutputStringType> SplitStringT(BasicStringPiece<Str> str,
+                                                  DelimiterType delimiter,
+                                                  WhitespaceHandling whitespace,
+                                                  SplitResult result_type) {
   std::vector<OutputStringType> result;
   if (str.empty())
     return result;
@@ -112,7 +114,7 @@
   // Find the delimiter.
   size_t end_key_pos = input.find_first_of(delimiter);
   if (end_key_pos == std::string::npos) {
-    return false;    // No delimiter.
+    return false;  // No delimiter.
   }
   input.substr(0, end_key_pos).CopyToString(&result_pair.first);
 
@@ -120,7 +122,7 @@
   StringPiece remains = input.substr(end_key_pos, input.size() - end_key_pos);
   size_t begin_value_pos = remains.find_first_not_of(delimiter);
   if (begin_value_pos == StringPiece::npos) {
-    return false;   // No value.
+    return false;  // No value.
   }
   remains.substr(begin_value_pos, remains.size() - begin_value_pos)
       .CopyToString(&result_pair.second);
@@ -172,8 +174,8 @@
                                   WhitespaceHandling whitespace,
                                   SplitResult result_type) {
   if (separators.size() == 1) {
-    return SplitStringT<string16, string16, char16>(
-        input, separators[0], whitespace, result_type);
+    return SplitStringT<string16, string16, char16>(input, separators[0],
+                                                    whitespace, result_type);
   }
   return SplitStringT<string16, string16, StringPiece16>(
       input, separators, whitespace, result_type);
@@ -209,9 +211,9 @@
                                   StringPairs* key_value_pairs) {
   key_value_pairs->clear();
 
-  std::vector<StringPiece> pairs = SplitStringPiece(
-      input, std::string(1, key_value_pair_delimiter),
-      TRIM_WHITESPACE, SPLIT_WANT_NONEMPTY);
+  std::vector<StringPiece> pairs =
+      SplitStringPiece(input, std::string(1, key_value_pair_delimiter),
+                       TRIM_WHITESPACE, SPLIT_WANT_NONEMPTY);
   key_value_pairs->reserve(pairs.size());
 
   bool success = true;
diff --git a/base/strings/string_split.h b/base/strings/string_split.h
index 1a41d2e..6f8fc7c 100644
--- a/base/strings/string_split.h
+++ b/base/strings/string_split.h
@@ -42,16 +42,14 @@
 //
 //   std::vector<std::string> tokens = base::SplitString(
 //       input, ",;", base::KEEP_WHITESPACE, base::SPLIT_WANT_ALL);
-std::vector<std::string> SplitString(
-    StringPiece input,
-    StringPiece separators,
-    WhitespaceHandling whitespace,
-    SplitResult result_type);
-std::vector<string16> SplitString(
-    StringPiece16 input,
-    StringPiece16 separators,
-    WhitespaceHandling whitespace,
-    SplitResult result_type);
+std::vector<std::string> SplitString(StringPiece input,
+                                     StringPiece separators,
+                                     WhitespaceHandling whitespace,
+                                     SplitResult result_type);
+std::vector<string16> SplitString(StringPiece16 input,
+                                  StringPiece16 separators,
+                                  WhitespaceHandling whitespace,
+                                  SplitResult result_type);
 
 // Like SplitString above except it returns a vector of StringPieces which
 // reference the original buffer without copying. Although you have to be
@@ -65,16 +63,14 @@
 //                               base::KEEP_WHITESPACE,
 //                               base::SPLIT_WANT_NONEMPTY)) {
 //     ...
-std::vector<StringPiece> SplitStringPiece(
-    StringPiece input,
-    StringPiece separators,
-    WhitespaceHandling whitespace,
-    SplitResult result_type);
-std::vector<StringPiece16> SplitStringPiece(
-    StringPiece16 input,
-    StringPiece16 separators,
-    WhitespaceHandling whitespace,
-    SplitResult result_type);
+std::vector<StringPiece> SplitStringPiece(StringPiece input,
+                                          StringPiece separators,
+                                          WhitespaceHandling whitespace,
+                                          SplitResult result_type);
+std::vector<StringPiece16> SplitStringPiece(StringPiece16 input,
+                                            StringPiece16 separators,
+                                            WhitespaceHandling whitespace,
+                                            SplitResult result_type);
 
 using StringPairs = std::vector<std::pair<std::string, std::string>>;
 
@@ -83,22 +79,20 @@
 // only if each pair has a non-empty key and value. |key_value_pairs| will
 // include ("","") pairs for entries without |key_value_delimiter|.
 bool SplitStringIntoKeyValuePairs(StringPiece input,
-                                              char key_value_delimiter,
-                                              char key_value_pair_delimiter,
-                                              StringPairs* key_value_pairs);
+                                  char key_value_delimiter,
+                                  char key_value_pair_delimiter,
+                                  StringPairs* key_value_pairs);
 
 // Similar to SplitString, but use a substring delimiter instead of a list of
 // characters that are all possible delimiters.
-std::vector<string16> SplitStringUsingSubstr(
-    StringPiece16 input,
-    StringPiece16 delimiter,
-    WhitespaceHandling whitespace,
-    SplitResult result_type);
-std::vector<std::string> SplitStringUsingSubstr(
-    StringPiece input,
-    StringPiece delimiter,
-    WhitespaceHandling whitespace,
-    SplitResult result_type);
+std::vector<string16> SplitStringUsingSubstr(StringPiece16 input,
+                                             StringPiece16 delimiter,
+                                             WhitespaceHandling whitespace,
+                                             SplitResult result_type);
+std::vector<std::string> SplitStringUsingSubstr(StringPiece input,
+                                                StringPiece delimiter,
+                                                WhitespaceHandling whitespace,
+                                                SplitResult result_type);
 
 // Like SplitStringUsingSubstr above except it returns a vector of StringPieces
 // which reference the original buffer without copying. Although you have to be
diff --git a/base/strings/string_tokenizer.h b/base/strings/string_tokenizer.h
index 72fc016..451a011 100644
--- a/base/strings/string_tokenizer.h
+++ b/base/strings/string_tokenizer.h
@@ -95,8 +95,7 @@
   // should not be constructed with a temporary. The deleted rvalue constructor
   // blocks the most obvious instances of this (e.g. passing a string literal to
   // the constructor), but caution must still be exercised.
-  StringTokenizerT(const str& string,
-                   const str& delims) {
+  StringTokenizerT(const str& string, const str& delims) {
     Init(string.begin(), string.end(), delims);
   }
 
@@ -131,9 +130,7 @@
   }
 
   // Start iterating through tokens from the beginning of the string.
-  void Reset() {
-    token_end_ = start_pos_;
-  }
+  void Reset() { token_end_ = start_pos_; }
 
   // Returns true if token is a delimiter.  When the tokenizer is constructed
   // with the RETURN_DELIMS option, this method can be used to check if the
@@ -204,13 +201,9 @@
     return true;
   }
 
-  bool IsDelim(char_type c) const {
-    return delims_.find(c) != str::npos;
-  }
+  bool IsDelim(char_type c) const { return delims_.find(c) != str::npos; }
 
-  bool IsQuote(char_type c) const {
-    return quotes_.find(c) != str::npos;
-  }
+  bool IsQuote(char_type c) const { return quotes_.find(c) != str::npos; }
 
   struct AdvanceState {
     bool in_quote;
diff --git a/base/strings/string_util.cc b/base/strings/string_util.cc
index 82ce02c..a387586 100644
--- a/base/strings/string_util.cc
+++ b/base/strings/string_util.cc
@@ -35,8 +35,7 @@
 // replaced parameters.
 struct ReplacementOffset {
   ReplacementOffset(uintptr_t parameter, size_t offset)
-      : parameter(parameter),
-        offset(offset) {}
+      : parameter(parameter), offset(offset) {}
 
   // Index of the parameter.
   uintptr_t parameter;
@@ -74,30 +73,38 @@
   return !(reinterpret_cast<MachineWord>(pointer) & kMachineWordAlignmentMask);
 }
 
-template<typename T> inline T* AlignToMachineWord(T* pointer) {
+template <typename T>
+inline T* AlignToMachineWord(T* pointer) {
   return reinterpret_cast<T*>(reinterpret_cast<MachineWord>(pointer) &
                               ~kMachineWordAlignmentMask);
 }
 
-template<size_t size, typename CharacterType> struct NonASCIIMask;
-template<> struct NonASCIIMask<4, char16> {
-    static inline uint32_t value() { return 0xFF80FF80U; }
+template <size_t size, typename CharacterType>
+struct NonASCIIMask;
+template <>
+struct NonASCIIMask<4, char16> {
+  static inline uint32_t value() { return 0xFF80FF80U; }
 };
-template<> struct NonASCIIMask<4, char> {
-    static inline uint32_t value() { return 0x80808080U; }
+template <>
+struct NonASCIIMask<4, char> {
+  static inline uint32_t value() { return 0x80808080U; }
 };
-template<> struct NonASCIIMask<8, char16> {
-    static inline uint64_t value() { return 0xFF80FF80FF80FF80ULL; }
+template <>
+struct NonASCIIMask<8, char16> {
+  static inline uint64_t value() { return 0xFF80FF80FF80FF80ULL; }
 };
-template<> struct NonASCIIMask<8, char> {
-    static inline uint64_t value() { return 0x8080808080808080ULL; }
+template <>
+struct NonASCIIMask<8, char> {
+  static inline uint64_t value() { return 0x8080808080808080ULL; }
 };
 #if defined(WCHAR_T_IS_UTF32)
-template<> struct NonASCIIMask<4, wchar_t> {
-    static inline uint32_t value() { return 0xFFFFFF80U; }
+template <>
+struct NonASCIIMask<4, wchar_t> {
+  static inline uint32_t value() { return 0xFFFFFF80U; }
 };
-template<> struct NonASCIIMask<8, wchar_t> {
-    static inline uint64_t value() { return 0xFFFFFF80FFFFFF80ULL; }
+template <>
+struct NonASCIIMask<8, wchar_t> {
+  static inline uint64_t value() { return 0xFFFFFF80FFFFFF80ULL; }
 };
 #endif  // WCHAR_T_IS_UTF32
 
@@ -140,7 +147,7 @@
 
 namespace {
 
-template<typename StringType>
+template <typename StringType>
 StringType ToLowerASCIIImpl(BasicStringPiece<StringType> str) {
   StringType ret;
   ret.reserve(str.size());
@@ -149,7 +156,7 @@
   return ret;
 }
 
-template<typename StringType>
+template <typename StringType>
 StringType ToUpperASCIIImpl(BasicStringPiece<StringType> str) {
   StringType ret;
   ret.reserve(str.size());
@@ -176,7 +183,7 @@
   return ToUpperASCIIImpl<string16>(str);
 }
 
-template<class StringType>
+template <class StringType>
 int CompareCaseInsensitiveASCIIT(BasicStringPiece<StringType> a,
                                  BasicStringPiece<StringType> b) {
   // Find the first characters that aren't equal and compare them.  If the end
@@ -256,7 +263,7 @@
   return ReplaceCharsT(input, remove_chars, StringPiece(), output);
 }
 
-template<typename Str>
+template <typename Str>
 TrimPositions TrimStringT(const Str& input,
                           BasicStringPiece<Str> trim_chars,
                           TrimPositions positions,
@@ -267,24 +274,25 @@
   // constant so avoid making a copy).
   BasicStringPiece<Str> input_piece(input);
   const size_t last_char = input.length() - 1;
-  const size_t first_good_char = (positions & TRIM_LEADING) ?
-      input_piece.find_first_not_of(trim_chars) : 0;
-  const size_t last_good_char = (positions & TRIM_TRAILING) ?
-      input_piece.find_last_not_of(trim_chars) : last_char;
+  const size_t first_good_char = (positions & TRIM_LEADING)
+                                     ? input_piece.find_first_not_of(trim_chars)
+                                     : 0;
+  const size_t last_good_char = (positions & TRIM_TRAILING)
+                                    ? input_piece.find_last_not_of(trim_chars)
+                                    : last_char;
 
   // When the string was all trimmed, report that we stripped off characters
   // from whichever position the caller was interested in. For empty input, we
   // stripped no characters, but we still need to clear |output|.
-  if (input.empty() ||
-      (first_good_char == Str::npos) || (last_good_char == Str::npos)) {
+  if (input.empty() || (first_good_char == Str::npos) ||
+      (last_good_char == Str::npos)) {
     bool input_was_empty = input.empty();  // in case output == &input
     output->clear();
     return input_was_empty ? TRIM_NONE : positions;
   }
 
   // Trim.
-  *output =
-      input.substr(first_good_char, last_good_char - first_good_char + 1);
+  *output = input.substr(first_good_char, last_good_char - first_good_char + 1);
 
   // Return where we trimmed from.
   return static_cast<TrimPositions>(
@@ -304,14 +312,15 @@
   return TrimStringT(input, trim_chars, TRIM_ALL, output) != TRIM_NONE;
 }
 
-template<typename Str>
+template <typename Str>
 BasicStringPiece<Str> TrimStringPieceT(BasicStringPiece<Str> input,
                                        BasicStringPiece<Str> trim_chars,
                                        TrimPositions positions) {
-  size_t begin = (positions & TRIM_LEADING) ?
-      input.find_first_not_of(trim_chars) : 0;
-  size_t end = (positions & TRIM_TRAILING) ?
-      input.find_last_not_of(trim_chars) + 1 : input.size();
+  size_t begin =
+      (positions & TRIM_LEADING) ? input.find_first_not_of(trim_chars) : 0;
+  size_t end = (positions & TRIM_TRAILING)
+                   ? input.find_last_not_of(trim_chars) + 1
+                   : input.size();
   return input.substr(begin, end - begin);
 }
 
@@ -350,15 +359,14 @@
     int32_t prev = char_index;
     base_icu::UChar32 code_point = 0;
     CBU8_NEXT(data, char_index, truncation_length, code_point);
-    if (!IsValidCharacter(code_point) ||
-        !IsValidCodepoint(code_point)) {
+    if (!IsValidCharacter(code_point) || !IsValidCodepoint(code_point)) {
       char_index = prev - 1;
     } else {
       break;
     }
   }
 
-  if (char_index >= 0 )
+  if (char_index >= 0)
     *output = input.substr(0, char_index);
   else
     output->clear();
@@ -370,8 +378,7 @@
   return TrimStringT(input, StringPiece16(kWhitespaceUTF16), positions, output);
 }
 
-StringPiece16 TrimWhitespace(StringPiece16 input,
-                             TrimPositions positions) {
+StringPiece16 TrimWhitespace(StringPiece16 input, TrimPositions positions) {
   return TrimStringPieceT(input, StringPiece16(kWhitespaceUTF16), positions);
 }
 
@@ -385,9 +392,8 @@
   return TrimStringPieceT(input, StringPiece(kWhitespaceASCII), positions);
 }
 
-template<typename STR>
-STR CollapseWhitespaceT(const STR& text,
-                        bool trim_sequences_with_line_breaks) {
+template <typename STR>
+STR CollapseWhitespaceT(const STR& text, bool trim_sequences_with_line_breaks) {
   STR result;
   result.resize(text.size());
 
@@ -490,7 +496,7 @@
 #endif
 
 bool IsStringUTF8(StringPiece str) {
-  const char *src = str.data();
+  const char* src = str.data();
   int32_t src_len = static_cast<int32_t>(str.length());
   int32_t char_index = 0;
 
@@ -518,7 +524,7 @@
 // The hardcoded strings are typically very short so it doesn't matter, and the
 // string piece gives additional flexibility for the caller (doesn't have to be
 // null terminated) so we choose the StringPiece route.
-template<typename Str>
+template <typename Str>
 static inline bool DoLowerCaseEqualsASCII(BasicStringPiece<Str> str,
                                           StringPiece lowercase_ascii) {
   if (str.size() != lowercase_ascii.size())
@@ -544,7 +550,7 @@
   return std::equal(ascii.begin(), ascii.end(), str.begin());
 }
 
-template<typename Str>
+template <typename Str>
 bool StartsWithT(BasicStringPiece<Str> str,
                  BasicStringPiece<Str> search_for,
                  CompareCase case_sensitivity) {
@@ -559,8 +565,7 @@
 
     case CompareCase::INSENSITIVE_ASCII:
       return std::equal(
-          search_for.begin(), search_for.end(),
-          source.begin(),
+          search_for.begin(), search_for.end(), source.begin(),
           CaseInsensitiveCompareASCII<typename Str::value_type>());
 
     default:
@@ -588,8 +593,8 @@
   if (search_for.size() > str.size())
     return false;
 
-  BasicStringPiece<Str> source = str.substr(str.size() - search_for.size(),
-                                            search_for.size());
+  BasicStringPiece<Str> source =
+      str.substr(str.size() - search_for.size(), search_for.size());
 
   switch (case_sensitivity) {
     case CompareCase::SENSITIVE:
@@ -597,8 +602,7 @@
 
     case CompareCase::INSENSITIVE_ASCII:
       return std::equal(
-          source.begin(), source.end(),
-          search_for.begin(),
+          source.begin(), source.end(), search_for.begin(),
           CaseInsensitiveCompareASCII<typename Str::value_type>());
 
     default:
@@ -639,14 +643,8 @@
   return false;
 }
 
-static const char* const kByteStringsUnlocalized[] = {
-  " B",
-  " kB",
-  " MB",
-  " GB",
-  " TB",
-  " PB"
-};
+static const char* const kByteStringsUnlocalized[] = {" B",  " kB", " MB",
+                                                      " GB", " TB", " PB"};
 
 string16 FormatBytesUnlocalized(int64_t bytes) {
   double unit_amount = static_cast<double>(bytes);
@@ -987,7 +985,7 @@
   return JoinStringT(parts, separator);
 }
 
-template<class FormatStringType, class OutStringType>
+template <class FormatStringType, class OutStringType>
 OutStringType DoReplaceStringPlaceholders(
     const FormatStringType& format_string,
     const std::vector<OutStringType>& subst,
@@ -1086,7 +1084,8 @@
     dst[dst_size - 1] = 0;
 
   // Count the rest of the |src|, and return it's length in characters.
-  while (src[dst_size]) ++dst_size;
+  while (src[dst_size])
+    ++dst_size;
   return dst_size;
 }
 
diff --git a/base/strings/string_util.h b/base/strings/string_util.h
index 98197d6..5403ada 100644
--- a/base/strings/string_util.h
+++ b/base/strings/string_util.h
@@ -8,7 +8,7 @@
 #define BASE_STRINGS_STRING_UTIL_H_
 
 #include <ctype.h>
-#include <stdarg.h>   // va_list
+#include <stdarg.h>  // va_list
 #include <stddef.h>
 #include <stdint.h>
 
@@ -119,7 +119,8 @@
 // context (combining accents), and require handling UTF-16. If you need
 // proper Unicode support, use base::i18n::ToLower/FoldCase and then just
 // use a normal operator== on the result.
-template<typename Char> struct CaseInsensitiveCompareASCII {
+template <typename Char>
+struct CaseInsensitiveCompareASCII {
  public:
   bool operator()(Char x, Char y) const {
     return ToLowerASCII(x) == ToLowerASCII(y);
@@ -157,11 +158,11 @@
 // if any characters were removed.  |remove_chars| must be null-terminated.
 // NOTE: Safe to use the same variable for both |input| and |output|.
 bool RemoveChars(const string16& input,
-                             StringPiece16 remove_chars,
-                             string16* output);
+                 StringPiece16 remove_chars,
+                 string16* output);
 bool RemoveChars(const std::string& input,
-                             StringPiece remove_chars,
-                             std::string* output);
+                 StringPiece remove_chars,
+                 std::string* output);
 
 // Replaces characters in |replace_chars| from anywhere in |input| with
 // |replace_with|.  Each character in |replace_chars| will be replaced with
@@ -169,19 +170,19 @@
 // |replace_chars| must be null-terminated.
 // NOTE: Safe to use the same variable for both |input| and |output|.
 bool ReplaceChars(const string16& input,
-                              StringPiece16 replace_chars,
-                              const string16& replace_with,
-                              string16* output);
+                  StringPiece16 replace_chars,
+                  const string16& replace_with,
+                  string16* output);
 bool ReplaceChars(const std::string& input,
-                              StringPiece replace_chars,
-                              const std::string& replace_with,
-                              std::string* output);
+                  StringPiece replace_chars,
+                  const std::string& replace_with,
+                  std::string* output);
 
 enum TrimPositions {
-  TRIM_NONE     = 0,
-  TRIM_LEADING  = 1 << 0,
+  TRIM_NONE = 0,
+  TRIM_LEADING = 1 << 0,
   TRIM_TRAILING = 1 << 1,
-  TRIM_ALL      = TRIM_LEADING | TRIM_TRAILING,
+  TRIM_ALL = TRIM_LEADING | TRIM_TRAILING,
 };
 
 // Removes characters in |trim_chars| from the beginning and end of |input|.
@@ -191,26 +192,26 @@
 // It is safe to use the same variable for both |input| and |output| (this is
 // the normal usage to trim in-place).
 bool TrimString(const string16& input,
-                            StringPiece16 trim_chars,
-                            string16* output);
+                StringPiece16 trim_chars,
+                string16* output);
 bool TrimString(const std::string& input,
-                            StringPiece trim_chars,
-                            std::string* output);
+                StringPiece trim_chars,
+                std::string* output);
 
 // StringPiece versions of the above. The returned pieces refer to the original
 // buffer.
 StringPiece16 TrimString(StringPiece16 input,
-                                     StringPiece16 trim_chars,
-                                     TrimPositions positions);
+                         StringPiece16 trim_chars,
+                         TrimPositions positions);
 StringPiece TrimString(StringPiece input,
-                                   StringPiece trim_chars,
-                                   TrimPositions positions);
+                       StringPiece trim_chars,
+                       TrimPositions positions);
 
 // Truncates a string to the nearest UTF-8 character that will leave
 // the string less than or equal to the specified byte size.
 void TruncateUTF8ToByteSize(const std::string& input,
-                                        const size_t byte_size,
-                                        std::string* output);
+                            const size_t byte_size,
+                            std::string* output);
 
 // Trims any whitespace from either end of the input string.
 //
@@ -220,15 +221,13 @@
 // The std::string versions return where whitespace was found.
 // NOTE: Safe to use the same variable for both input and output.
 TrimPositions TrimWhitespace(const string16& input,
-                                         TrimPositions positions,
-                                         string16* output);
-StringPiece16 TrimWhitespace(StringPiece16 input,
-                                         TrimPositions positions);
+                             TrimPositions positions,
+                             string16* output);
+StringPiece16 TrimWhitespace(StringPiece16 input, TrimPositions positions);
 TrimPositions TrimWhitespaceASCII(const std::string& input,
-                                              TrimPositions positions,
-                                              std::string* output);
-StringPiece TrimWhitespaceASCII(StringPiece input,
-                                            TrimPositions positions);
+                                  TrimPositions positions,
+                                  std::string* output);
+StringPiece TrimWhitespaceASCII(StringPiece input, TrimPositions positions);
 
 // Searches for CR or LF characters.  Removes all contiguous whitespace
 // strings that contain them.  This is useful when trying to deal with text
@@ -238,18 +237,15 @@
 // (2) If |trim_sequences_with_line_breaks| is true, any other whitespace
 //     sequences containing a CR or LF are trimmed.
 // (3) All other whitespace sequences are converted to single spaces.
-string16 CollapseWhitespace(
-    const string16& text,
-    bool trim_sequences_with_line_breaks);
-std::string CollapseWhitespaceASCII(
-    const std::string& text,
-    bool trim_sequences_with_line_breaks);
+string16 CollapseWhitespace(const string16& text,
+                            bool trim_sequences_with_line_breaks);
+std::string CollapseWhitespaceASCII(const std::string& text,
+                                    bool trim_sequences_with_line_breaks);
 
 // Returns true if |input| is empty or contains only characters found in
 // |characters|.
 bool ContainsOnlyChars(StringPiece input, StringPiece characters);
-bool ContainsOnlyChars(StringPiece16 input,
-                                   StringPiece16 characters);
+bool ContainsOnlyChars(StringPiece16 input, StringPiece16 characters);
 
 // Returns true if the specified string matches the criteria. How can a wide
 // string be 8-bit or UTF8? It contains only characters that are < 256 (in the
@@ -274,10 +270,8 @@
 
 // Compare the lower-case form of the given string against the given
 // previously-lower-cased ASCII string (typically a constant).
-bool LowerCaseEqualsASCII(StringPiece str,
-                                      StringPiece lowecase_ascii);
-bool LowerCaseEqualsASCII(StringPiece16 str,
-                                      StringPiece lowecase_ascii);
+bool LowerCaseEqualsASCII(StringPiece str, StringPiece lowecase_ascii);
+bool LowerCaseEqualsASCII(StringPiece16 str, StringPiece lowecase_ascii);
 
 // Performs a case-sensitive string compare of the given 16-bit string against
 // the given 8-bit ASCII string (typically a constant). The behavior is
@@ -298,17 +292,17 @@
 };
 
 bool StartsWith(StringPiece str,
-                            StringPiece search_for,
-                            CompareCase case_sensitivity);
+                StringPiece search_for,
+                CompareCase case_sensitivity);
 bool StartsWith(StringPiece16 str,
-                            StringPiece16 search_for,
-                            CompareCase case_sensitivity);
+                StringPiece16 search_for,
+                CompareCase case_sensitivity);
 bool EndsWith(StringPiece str,
-                          StringPiece search_for,
-                          CompareCase case_sensitivity);
+              StringPiece search_for,
+              CompareCase case_sensitivity);
 bool EndsWith(StringPiece16 str,
-                          StringPiece16 search_for,
-                          CompareCase case_sensitivity);
+              StringPiece16 search_for,
+              CompareCase case_sensitivity);
 
 // Determines the type of ASCII character, independent of locale (the C
 // library versions will change based on locale).
@@ -335,8 +329,7 @@
 
 template <typename Char>
 inline bool IsHexDigit(Char c) {
-  return (c >= '0' && c <= '9') ||
-         (c >= 'A' && c <= 'F') ||
+  return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') ||
          (c >= 'a' && c <= 'f');
 }
 
@@ -358,16 +351,14 @@
 
 // Starting at |start_offset| (usually 0), replace the first instance of
 // |find_this| with |replace_with|.
-void ReplaceFirstSubstringAfterOffset(
-    base::string16* str,
-    size_t start_offset,
-    StringPiece16 find_this,
-    StringPiece16 replace_with);
-void ReplaceFirstSubstringAfterOffset(
-    std::string* str,
-    size_t start_offset,
-    StringPiece find_this,
-    StringPiece replace_with);
+void ReplaceFirstSubstringAfterOffset(base::string16* str,
+                                      size_t start_offset,
+                                      StringPiece16 find_this,
+                                      StringPiece16 replace_with);
+void ReplaceFirstSubstringAfterOffset(std::string* str,
+                                      size_t start_offset,
+                                      StringPiece find_this,
+                                      StringPiece replace_with);
 
 // Starting at |start_offset| (usually 0), look through |str| and replace all
 // instances of |find_this| with |replace_with|.
@@ -375,16 +366,14 @@
 // This does entire substrings; use std::replace in <algorithm> for single
 // characters, for example:
 //   std::replace(str.begin(), str.end(), 'a', 'b');
-void ReplaceSubstringsAfterOffset(
-    string16* str,
-    size_t start_offset,
-    StringPiece16 find_this,
-    StringPiece16 replace_with);
-void ReplaceSubstringsAfterOffset(
-    std::string* str,
-    size_t start_offset,
-    StringPiece find_this,
-    StringPiece replace_with);
+void ReplaceSubstringsAfterOffset(string16* str,
+                                  size_t start_offset,
+                                  StringPiece16 find_this,
+                                  StringPiece16 replace_with);
+void ReplaceSubstringsAfterOffset(std::string* str,
+                                  size_t start_offset,
+                                  StringPiece find_this,
+                                  StringPiece replace_with);
 
 // Reserves enough memory in |str| to accommodate |length_with_null| characters,
 // sets the size of |str| to |length_with_null - 1| characters, and returns a
@@ -421,39 +410,37 @@
 //
 // Use StrCat (in base/strings/strcat.h) if you don't need a separator.
 std::string JoinString(const std::vector<std::string>& parts,
-                                   StringPiece separator);
+                       StringPiece separator);
 string16 JoinString(const std::vector<string16>& parts,
-                                StringPiece16 separator);
+                    StringPiece16 separator);
 std::string JoinString(const std::vector<StringPiece>& parts,
-                                   StringPiece separator);
+                       StringPiece separator);
 string16 JoinString(const std::vector<StringPiece16>& parts,
-                                StringPiece16 separator);
+                    StringPiece16 separator);
 // Explicit initializer_list overloads are required to break ambiguity when used
 // with a literal initializer list (otherwise the compiler would not be able to
 // decide between the string and StringPiece overloads).
 std::string JoinString(std::initializer_list<StringPiece> parts,
-                                   StringPiece separator);
+                       StringPiece separator);
 string16 JoinString(std::initializer_list<StringPiece16> parts,
-                                StringPiece16 separator);
+                    StringPiece16 separator);
 
 // Replace $1-$2-$3..$9 in the format string with values from |subst|.
 // Additionally, any number of consecutive '$' characters is replaced by that
 // number less one. Eg $$->$, $$$->$$, etc. The offsets parameter here can be
 // NULL. This only allows you to use up to nine replacements.
-string16 ReplaceStringPlaceholders(
-    const string16& format_string,
-    const std::vector<string16>& subst,
-    std::vector<size_t>* offsets);
+string16 ReplaceStringPlaceholders(const string16& format_string,
+                                   const std::vector<string16>& subst,
+                                   std::vector<size_t>* offsets);
 
-std::string ReplaceStringPlaceholders(
-    StringPiece format_string,
-    const std::vector<std::string>& subst,
-    std::vector<size_t>* offsets);
+std::string ReplaceStringPlaceholders(StringPiece format_string,
+                                      const std::vector<std::string>& subst,
+                                      std::vector<size_t>* offsets);
 
 // Single-string shortcut for ReplaceStringHolders. |offset| may be NULL.
 string16 ReplaceStringPlaceholders(const string16& format_string,
-                                               const string16& a,
-                                               size_t* offset);
+                                   const string16& a,
+                                   size_t* offset);
 
 }  // namespace base
 
diff --git a/base/strings/string_util_constants.cc b/base/strings/string_util_constants.cc
index aba1b12..37ff95f 100644
--- a/base/strings/string_util_constants.cc
+++ b/base/strings/string_util_constants.cc
@@ -6,61 +6,53 @@
 
 namespace base {
 
-#define WHITESPACE_UNICODE \
-  0x0009, /* CHARACTER TABULATION */      \
-  0x000A, /* LINE FEED (LF) */            \
-  0x000B, /* LINE TABULATION */           \
-  0x000C, /* FORM FEED (FF) */            \
-  0x000D, /* CARRIAGE RETURN (CR) */      \
-  0x0020, /* SPACE */                     \
-  0x0085, /* NEXT LINE (NEL) */           \
-  0x00A0, /* NO-BREAK SPACE */            \
-  0x1680, /* OGHAM SPACE MARK */          \
-  0x2000, /* EN QUAD */                   \
-  0x2001, /* EM QUAD */                   \
-  0x2002, /* EN SPACE */                  \
-  0x2003, /* EM SPACE */                  \
-  0x2004, /* THREE-PER-EM SPACE */        \
-  0x2005, /* FOUR-PER-EM SPACE */         \
-  0x2006, /* SIX-PER-EM SPACE */          \
-  0x2007, /* FIGURE SPACE */              \
-  0x2008, /* PUNCTUATION SPACE */         \
-  0x2009, /* THIN SPACE */                \
-  0x200A, /* HAIR SPACE */                \
-  0x2028, /* LINE SEPARATOR */            \
-  0x2029, /* PARAGRAPH SEPARATOR */       \
-  0x202F, /* NARROW NO-BREAK SPACE */     \
-  0x205F, /* MEDIUM MATHEMATICAL SPACE */ \
-  0x3000, /* IDEOGRAPHIC SPACE */         \
-  0
+#define WHITESPACE_UNICODE                    \
+  0x0009,     /* CHARACTER TABULATION */      \
+      0x000A, /* LINE FEED (LF) */            \
+      0x000B, /* LINE TABULATION */           \
+      0x000C, /* FORM FEED (FF) */            \
+      0x000D, /* CARRIAGE RETURN (CR) */      \
+      0x0020, /* SPACE */                     \
+      0x0085, /* NEXT LINE (NEL) */           \
+      0x00A0, /* NO-BREAK SPACE */            \
+      0x1680, /* OGHAM SPACE MARK */          \
+      0x2000, /* EN QUAD */                   \
+      0x2001, /* EM QUAD */                   \
+      0x2002, /* EN SPACE */                  \
+      0x2003, /* EM SPACE */                  \
+      0x2004, /* THREE-PER-EM SPACE */        \
+      0x2005, /* FOUR-PER-EM SPACE */         \
+      0x2006, /* SIX-PER-EM SPACE */          \
+      0x2007, /* FIGURE SPACE */              \
+      0x2008, /* PUNCTUATION SPACE */         \
+      0x2009, /* THIN SPACE */                \
+      0x200A, /* HAIR SPACE */                \
+      0x2028, /* LINE SEPARATOR */            \
+      0x2029, /* PARAGRAPH SEPARATOR */       \
+      0x202F, /* NARROW NO-BREAK SPACE */     \
+      0x205F, /* MEDIUM MATHEMATICAL SPACE */ \
+      0x3000, /* IDEOGRAPHIC SPACE */         \
+      0
 
-const wchar_t kWhitespaceWide[] = {
-  WHITESPACE_UNICODE
-};
+const wchar_t kWhitespaceWide[] = {WHITESPACE_UNICODE};
 
-const char16 kWhitespaceUTF16[] = {
-  WHITESPACE_UNICODE
-};
+const char16 kWhitespaceUTF16[] = {WHITESPACE_UNICODE};
 
-const char kWhitespaceASCII[] = {
-  0x09,    // CHARACTER TABULATION
-  0x0A,    // LINE FEED (LF)
-  0x0B,    // LINE TABULATION
-  0x0C,    // FORM FEED (FF)
-  0x0D,    // CARRIAGE RETURN (CR)
-  0x20,    // SPACE
-  0
-};
+const char kWhitespaceASCII[] = {0x09,  // CHARACTER TABULATION
+                                 0x0A,  // LINE FEED (LF)
+                                 0x0B,  // LINE TABULATION
+                                 0x0C,  // FORM FEED (FF)
+                                 0x0D,  // CARRIAGE RETURN (CR)
+                                 0x20,  // SPACE
+                                 0};
 
-const char16 kWhitespaceASCIIAs16[] = {
-  0x09,    // CHARACTER TABULATION
-  0x0A,    // LINE FEED (LF)
-  0x0B,    // LINE TABULATION
-  0x0C,    // FORM FEED (FF)
-  0x0D,    // CARRIAGE RETURN (CR)
-  0x20,    // SPACE
-  0
-};
+const char16 kWhitespaceASCIIAs16[] = {0x09,  // CHARACTER TABULATION
+                                       0x0A,  // LINE FEED (LF)
+                                       0x0B,  // LINE TABULATION
+                                       0x0C,  // FORM FEED (FF)
+                                       0x0D,  // CARRIAGE RETURN (CR)
+                                       0x20,  // SPACE
+                                       0};
 
 const char kUtf8ByteOrderMark[] = "\xEF\xBB\xBF";
 
diff --git a/base/strings/string_util_posix.h b/base/strings/string_util_posix.h
index 8299118..6868a65 100644
--- a/base/strings/string_util_posix.h
+++ b/base/strings/string_util_posix.h
@@ -21,13 +21,17 @@
   return ::strdup(str);
 }
 
-inline int vsnprintf(char* buffer, size_t size,
-                     const char* format, va_list arguments) {
+inline int vsnprintf(char* buffer,
+                     size_t size,
+                     const char* format,
+                     va_list arguments) {
   return ::vsnprintf(buffer, size, format, arguments);
 }
 
-inline int vswprintf(wchar_t* buffer, size_t size,
-                     const wchar_t* format, va_list arguments) {
+inline int vswprintf(wchar_t* buffer,
+                     size_t size,
+                     const wchar_t* format,
+                     va_list arguments) {
   DCHECK(IsWprintfFormatPortable(format));
   return ::vswprintf(buffer, size, format, arguments);
 }
diff --git a/base/strings/string_util_win.h b/base/strings/string_util_win.h
index 7f260bf..8f9fa81 100644
--- a/base/strings/string_util_win.h
+++ b/base/strings/string_util_win.h
@@ -21,16 +21,20 @@
   return _strdup(str);
 }
 
-inline int vsnprintf(char* buffer, size_t size,
-                     const char* format, va_list arguments) {
+inline int vsnprintf(char* buffer,
+                     size_t size,
+                     const char* format,
+                     va_list arguments) {
   int length = vsnprintf_s(buffer, size, size - 1, format, arguments);
   if (length < 0)
     return _vscprintf(format, arguments);
   return length;
 }
 
-inline int vswprintf(wchar_t* buffer, size_t size,
-                     const wchar_t* format, va_list arguments) {
+inline int vswprintf(wchar_t* buffer,
+                     size_t size,
+                     const wchar_t* format,
+                     va_list arguments) {
   DCHECK(IsWprintfFormatPortable(format));
 
   int length = _vsnwprintf_s(buffer, size, size - 1, format, arguments);
diff --git a/base/strings/stringprintf.cc b/base/strings/stringprintf.cc
index dba4318..a241ee6 100644
--- a/base/strings/stringprintf.cc
+++ b/base/strings/stringprintf.cc
@@ -150,7 +150,8 @@
 
 #if defined(OS_WIN)
 const std::wstring& SStringPrintf(std::wstring* dst,
-                                  const wchar_t* format, ...) {
+                                  const wchar_t* format,
+                                  ...) {
   va_list ap;
   va_start(ap, format);
   dst->clear();
diff --git a/base/strings/stringprintf.h b/base/strings/stringprintf.h
index e45bef3..9c07862 100644
--- a/base/strings/stringprintf.h
+++ b/base/strings/stringprintf.h
@@ -5,7 +5,7 @@
 #ifndef BASE_STRINGS_STRINGPRINTF_H_
 #define BASE_STRINGS_STRINGPRINTF_H_
 
-#include <stdarg.h>   // va_list
+#include <stdarg.h>  // va_list
 
 #include <string>
 
@@ -15,13 +15,11 @@
 namespace base {
 
 // Return a C++ string given printf-like input.
-std::string StringPrintf(_Printf_format_string_ const char* format,
-                                     ...)
+std::string StringPrintf(_Printf_format_string_ const char* format, ...)
     PRINTF_FORMAT(1, 2) WARN_UNUSED_RESULT;
 #if defined(OS_WIN)
-std::wstring StringPrintf(
-    _Printf_format_string_ const wchar_t* format,
-    ...) WPRINTF_FORMAT(1, 2) WARN_UNUSED_RESULT;
+std::wstring StringPrintf(_Printf_format_string_ const wchar_t* format, ...)
+    WPRINTF_FORMAT(1, 2) WARN_UNUSED_RESULT;
 #endif
 
 // Return a C++ string given vprintf-like input.
@@ -29,25 +27,23 @@
     PRINTF_FORMAT(1, 0) WARN_UNUSED_RESULT;
 
 // Store result into a supplied string and return it.
-const std::string& SStringPrintf(
-    std::string* dst,
-    _Printf_format_string_ const char* format,
-    ...) PRINTF_FORMAT(2, 3);
+const std::string& SStringPrintf(std::string* dst,
+                                 _Printf_format_string_ const char* format,
+                                 ...) PRINTF_FORMAT(2, 3);
 #if defined(OS_WIN)
-const std::wstring& SStringPrintf(
-    std::wstring* dst,
-    _Printf_format_string_ const wchar_t* format,
-    ...) WPRINTF_FORMAT(2, 3);
+const std::wstring& SStringPrintf(std::wstring* dst,
+                                  _Printf_format_string_ const wchar_t* format,
+                                  ...) WPRINTF_FORMAT(2, 3);
 #endif
 
 // Append result to a supplied string.
 void StringAppendF(std::string* dst,
-                               _Printf_format_string_ const char* format,
-                               ...) PRINTF_FORMAT(2, 3);
+                   _Printf_format_string_ const char* format,
+                   ...) PRINTF_FORMAT(2, 3);
 #if defined(OS_WIN)
 void StringAppendF(std::wstring* dst,
-                               _Printf_format_string_ const wchar_t* format,
-                               ...) WPRINTF_FORMAT(2, 3);
+                   _Printf_format_string_ const wchar_t* format,
+                   ...) WPRINTF_FORMAT(2, 3);
 #endif
 
 // Lower-level routine that takes a va_list and appends to a specified
@@ -55,8 +51,7 @@
 void StringAppendV(std::string* dst, const char* format, va_list ap)
     PRINTF_FORMAT(2, 0);
 #if defined(OS_WIN)
-void StringAppendV(std::wstring* dst,
-                               const wchar_t* format, va_list ap)
+void StringAppendV(std::wstring* dst, const wchar_t* format, va_list ap)
     WPRINTF_FORMAT(2, 0);
 #endif
 
diff --git a/base/strings/sys_string_conversions.h b/base/strings/sys_string_conversions.h
index 096840b..a13775c 100644
--- a/base/strings/sys_string_conversions.h
+++ b/base/strings/sys_string_conversions.h
@@ -47,8 +47,7 @@
 // code page identifier is one accepted by the Windows function
 // MultiByteToWideChar().
 std::wstring SysMultiByteToWide(StringPiece mb, uint32_t code_page);
-std::string SysWideToMultiByte(const std::wstring& wide,
-                                           uint32_t code_page);
+std::string SysWideToMultiByte(const std::wstring& wide, uint32_t code_page);
 
 #endif  // defined(OS_WIN)
 
diff --git a/base/strings/sys_string_conversions_mac.mm b/base/strings/sys_string_conversions_mac.mm
index 637d941..3b78777 100644
--- a/base/strings/sys_string_conversions_mac.mm
+++ b/base/strings/sys_string_conversions_mac.mm
@@ -21,7 +21,7 @@
 // an STL string of the template type.  Returns an empty string on failure.
 //
 // Do not assert in this function since it is used by the asssertion code!
-template<typename StringType>
+template <typename StringType>
 static StringType CFStringToSTLStringWithEncodingT(CFStringRef cfstring,
                                                    CFStringEncoding encoding) {
   CFIndex length = CFStringGetLength(cfstring);
@@ -30,9 +30,7 @@
 
   CFRange whole_string = CFRangeMake(0, length);
   CFIndex out_size;
-  CFIndex converted = CFStringGetBytes(cfstring,
-                                       whole_string,
-                                       encoding,
+  CFIndex converted = CFStringGetBytes(cfstring, whole_string, encoding,
                                        0,      // lossByte
                                        false,  // isExternalRepresentation
                                        NULL,   // buffer
@@ -50,14 +48,12 @@
       out_size * sizeof(UInt8) / sizeof(typename StringType::value_type) + 1;
 
   std::vector<typename StringType::value_type> out_buffer(elements);
-  converted = CFStringGetBytes(cfstring,
-                               whole_string,
-                               encoding,
-                               0,      // lossByte
-                               false,  // isExternalRepresentation
-                               reinterpret_cast<UInt8*>(&out_buffer[0]),
-                               out_size,
-                               NULL);  // usedBufLen
+  converted =
+      CFStringGetBytes(cfstring, whole_string, encoding,
+                       0,      // lossByte
+                       false,  // isExternalRepresentation
+                       reinterpret_cast<UInt8*>(&out_buffer[0]), out_size,
+                       NULL);  // usedBufLen
   if (converted == 0)
     return StringType();
 
@@ -70,7 +66,7 @@
 // |OutStringType| template type.  Returns an empty string on failure.
 //
 // Do not assert in this function since it is used by the asssertion code!
-template<typename InStringType, typename OutStringType>
+template <typename InStringType, typename OutStringType>
 static OutStringType STLStringToSTLStringWithEncodingsT(
     const InStringType& in,
     CFStringEncoding in_encoding,
@@ -80,11 +76,8 @@
     return OutStringType();
 
   base::ScopedCFTypeRef<CFStringRef> cfstring(CFStringCreateWithBytesNoCopy(
-      NULL,
-      reinterpret_cast<const UInt8*>(in.data()),
-      in_length * sizeof(typename InStringType::value_type),
-      in_encoding,
-      false,
+      NULL, reinterpret_cast<const UInt8*>(in.data()),
+      in_length * sizeof(typename InStringType::value_type), in_encoding, false,
       kCFAllocatorNull));
   if (!cfstring)
     return OutStringType();
@@ -95,7 +88,7 @@
 
 // Given an STL string |in| with an encoding specified by |in_encoding|,
 // return it as a CFStringRef.  Returns NULL on failure.
-template<typename StringType>
+template <typename StringType>
 static CFStringRef STLStringToCFStringWithEncodingsT(
     const StringType& in,
     CFStringEncoding in_encoding) {
@@ -103,12 +96,9 @@
   if (in_length == 0)
     return CFSTR("");
 
-  return CFStringCreateWithBytes(kCFAllocatorDefault,
-                                 reinterpret_cast<const UInt8*>(in.data()),
-                                 in_length *
-                                   sizeof(typename StringType::value_type),
-                                 in_encoding,
-                                 false);
+  return CFStringCreateWithBytes(
+      kCFAllocatorDefault, reinterpret_cast<const UInt8*>(in.data()),
+      in_length * sizeof(typename StringType::value_type), in_encoding, false);
 }
 
 // Specify the byte ordering explicitly, otherwise CFString will be confused
@@ -168,8 +158,7 @@
 }
 
 string16 SysCFStringRefToUTF16(CFStringRef ref) {
-  return CFStringToSTLStringWithEncodingT<string16>(ref,
-                                                    kMediumStringEncoding);
+  return CFStringToSTLStringWithEncodingT<string16>(ref, kMediumStringEncoding);
 }
 
 std::string SysNSStringToUTF8(NSString* nsstring) {
diff --git a/base/strings/sys_string_conversions_posix.cc b/base/strings/sys_string_conversions_posix.cc
index 97b027a..1a0c685 100644
--- a/base/strings/sys_string_conversions_posix.cc
+++ b/base/strings/sys_string_conversions_posix.cc
@@ -107,7 +107,7 @@
   // without writing the output, counting the number of wide characters.
   size_t num_out_chars = 0;
   memset(&ps, 0, sizeof(ps));
-  for (size_t i = 0; i < native_mb.size(); ) {
+  for (size_t i = 0; i < native_mb.size();) {
     const char* src = native_mb.data() + i;
     size_t res = mbrtowc(nullptr, src, native_mb.size() - i, &ps);
     switch (res) {
diff --git a/base/strings/sys_string_conversions_win.cc b/base/strings/sys_string_conversions_win.cc
index 356064f..232dd78 100644
--- a/base/strings/sys_string_conversions_win.cc
+++ b/base/strings/sys_string_conversions_win.cc
@@ -4,8 +4,8 @@
 
 #include "base/strings/sys_string_conversions.h"
 
-#include <windows.h>
 #include <stdint.h>
+#include <windows.h>
 
 #include "base/strings/string_piece.h"
 
@@ -36,8 +36,8 @@
 
   int mb_length = static_cast<int>(mb.length());
   // Compute the length of the buffer.
-  int charcount = MultiByteToWideChar(code_page, 0,
-                                      mb.data(), mb_length, NULL, 0);
+  int charcount =
+      MultiByteToWideChar(code_page, 0, mb.data(), mb_length, NULL, 0);
   if (charcount == 0)
     return std::wstring();
 
@@ -62,8 +62,8 @@
 
   std::string mb;
   mb.resize(charcount);
-  WideCharToMultiByte(code_page, 0, wide.data(), wide_length,
-                      &mb[0], charcount, NULL, NULL);
+  WideCharToMultiByte(code_page, 0, wide.data(), wide_length, &mb[0], charcount,
+                      NULL, NULL);
 
   return mb;
 }
diff --git a/base/strings/utf_offset_string_conversions.cc b/base/strings/utf_offset_string_conversions.cc
index b91ee03..177839a 100644
--- a/base/strings/utf_offset_string_conversions.cc
+++ b/base/strings/utf_offset_string_conversions.cc
@@ -20,8 +20,7 @@
                                        size_t output_length)
     : original_offset(original_offset),
       original_length(original_length),
-      output_length(output_length) {
-}
+      output_length(output_length) {}
 
 // static
 void OffsetAdjuster::AdjustOffsets(const Adjustments& adjustments,
@@ -79,8 +78,7 @@
     if (*offset + adjustment <= i->original_offset)
       break;
     adjustment += static_cast<int>(i->original_length - i->output_length);
-    if ((*offset + adjustment) <
-        (i->original_offset + i->original_length)) {
+    if ((*offset + adjustment) < (i->original_offset + i->original_length)) {
       *offset = string16::npos;
       return;
     }
@@ -138,8 +136,8 @@
       // |adjusted_iter|, then incrementing |adjusted_iter| so it points to
       // the following element.
       shift += first_iter->original_length - first_iter->output_length;
-      adjusted_iter = adjustments_on_adjusted_string->insert(
-          adjusted_iter, *first_iter);
+      adjusted_iter =
+          adjustments_on_adjusted_string->insert(adjusted_iter, *first_iter);
       ++adjusted_iter;
       ++first_iter;
     } else {
@@ -158,7 +156,7 @@
       // happened in |first_iter|, then advance to the next |first_adjustments|
       // because we dealt with the current one.
       const int collapse = static_cast<int>(first_iter->original_length) -
-          static_cast<int>(first_iter->output_length);
+                           static_cast<int>(first_iter->output_length);
       // This function does not know how to deal with a string that expands and
       // then gets modified, only strings that collapse and then get modified.
       DCHECK_GT(collapse, 0);
@@ -185,7 +183,7 @@
 // the result.  If non-NULL, |adjustments| is set to reflect the all the
 // alterations to the string that are not one-character-to-one-character.
 // It will always be sorted by increasing offset.
-template<typename SrcChar, typename DestStdString>
+template <typename SrcChar, typename DestStdString>
 bool ConvertUnicode(const SrcChar* src,
                     size_t src_len,
                     DestStdString* output,
diff --git a/base/strings/utf_offset_string_conversions.h b/base/strings/utf_offset_string_conversions.h
index fdd012b..b7c4a1b 100644
--- a/base/strings/utf_offset_string_conversions.h
+++ b/base/strings/utf_offset_string_conversions.h
@@ -64,8 +64,7 @@
 
   // Adjusts the single |offset| to reflect the reverse of the adjustments
   // recorded in |adjustments|.
-  static void UnadjustOffset(const Adjustments& adjustments,
-                             size_t* offset);
+  static void UnadjustOffset(const Adjustments& adjustments, size_t* offset);
 
   // Combines two sequential sets of adjustments, storing the combined revised
   // adjustments in |adjustments_on_adjusted_string|.  That is, suppose a
@@ -90,11 +89,10 @@
 // Like the conversions in utf_string_conversions.h, but also fills in an
 // |adjustments| parameter that reflects the alterations done to the string.
 // It may be NULL.
-bool UTF8ToUTF16WithAdjustments(
-    const char* src,
-    size_t src_len,
-    string16* output,
-    base::OffsetAdjuster::Adjustments* adjustments);
+bool UTF8ToUTF16WithAdjustments(const char* src,
+                                size_t src_len,
+                                string16* output,
+                                base::OffsetAdjuster::Adjustments* adjustments);
 string16 UTF8ToUTF16WithAdjustments(
     const base::StringPiece& utf8,
     base::OffsetAdjuster::Adjustments* adjustments);
diff --git a/base/strings/utf_string_conversion_utils.cc b/base/strings/utf_string_conversion_utils.cc
index 89f02d5..6098e3a 100644
--- a/base/strings/utf_string_conversion_utils.cc
+++ b/base/strings/utf_string_conversion_utils.cc
@@ -36,15 +36,14 @@
                           uint32_t* code_point) {
   if (CBU16_IS_SURROGATE(src[*char_index])) {
     if (!CBU16_IS_SURROGATE_LEAD(src[*char_index]) ||
-        *char_index + 1 >= src_len ||
-        !CBU16_IS_TRAIL(src[*char_index + 1])) {
+        *char_index + 1 >= src_len || !CBU16_IS_TRAIL(src[*char_index + 1])) {
       // Invalid surrogate pair.
       return false;
     }
 
     // Valid surrogate pair.
-    *code_point = CBU16_GET_SUPPLEMENTARY(src[*char_index],
-                                          src[*char_index + 1]);
+    *code_point =
+        CBU16_GET_SUPPLEMENTARY(src[*char_index], src[*char_index + 1]);
     (*char_index)++;
   } else {
     // Not a surrogate, just one 16-bit word.
@@ -76,7 +75,6 @@
     return 1;
   }
 
-
   // CBU8_APPEND_UNSAFE can append up to 4 bytes.
   size_t char_offset = output->length();
   size_t original_char_offset = char_offset;
@@ -105,7 +103,7 @@
 
 // Generalized Unicode converter -----------------------------------------------
 
-template<typename CHAR>
+template <typename CHAR>
 void PrepareForUTF8Output(const CHAR* src,
                           size_t src_len,
                           std::string* output) {
@@ -128,7 +126,7 @@
 #endif
 template void PrepareForUTF8Output(const char16*, size_t, std::string*);
 
-template<typename STRING>
+template <typename STRING>
 void PrepareForUTF16Or32Output(const char* src,
                                size_t src_len,
                                STRING* output) {
diff --git a/base/strings/utf_string_conversion_utils.h b/base/strings/utf_string_conversion_utils.h
index 1712cee..6f89652 100644
--- a/base/strings/utf_string_conversion_utils.h
+++ b/base/strings/utf_string_conversion_utils.h
@@ -26,9 +26,10 @@
 inline bool IsValidCharacter(uint32_t code_point) {
   // Excludes non-characters (U+FDD0..U+FDEF, and all codepoints ending in
   // 0xFFFE or 0xFFFF) from the set of valid code points.
-  return code_point < 0xD800u || (code_point >= 0xE000u &&
-      code_point < 0xFDD0u) || (code_point > 0xFDEFu &&
-      code_point <= 0x10FFFFu && (code_point & 0xFFFEu) != 0xFFFEu);
+  return code_point < 0xD800u ||
+         (code_point >= 0xE000u && code_point < 0xFDD0u) ||
+         (code_point > 0xFDEFu && code_point <= 0x10FFFFu &&
+          (code_point & 0xFFFEu) != 0xFFFEu);
 }
 
 // ReadUnicodeCharacter --------------------------------------------------------
@@ -41,30 +42,29 @@
 //
 // Returns true on success. On false, |*code_point| will be invalid.
 bool ReadUnicodeCharacter(const char* src,
-                                      int32_t src_len,
-                                      int32_t* char_index,
-                                      uint32_t* code_point_out);
+                          int32_t src_len,
+                          int32_t* char_index,
+                          uint32_t* code_point_out);
 
 // Reads a UTF-16 character. The usage is the same as the 8-bit version above.
 bool ReadUnicodeCharacter(const char16* src,
-                                      int32_t src_len,
-                                      int32_t* char_index,
-                                      uint32_t* code_point);
+                          int32_t src_len,
+                          int32_t* char_index,
+                          uint32_t* code_point);
 
 #if defined(WCHAR_T_IS_UTF32)
 // Reads UTF-32 character. The usage is the same as the 8-bit version above.
 bool ReadUnicodeCharacter(const wchar_t* src,
-                                      int32_t src_len,
-                                      int32_t* char_index,
-                                      uint32_t* code_point);
+                          int32_t src_len,
+                          int32_t* char_index,
+                          uint32_t* code_point);
 #endif  // defined(WCHAR_T_IS_UTF32)
 
 // WriteUnicodeCharacter -------------------------------------------------------
 
 // Appends a UTF-8 character to the given 8-bit string.  Returns the number of
 // bytes written.
-size_t WriteUnicodeCharacter(uint32_t code_point,
-                                         std::string* output);
+size_t WriteUnicodeCharacter(uint32_t code_point, std::string* output);
 
 // Appends the given code point as a UTF-16 character to the given 16-bit
 // string.  Returns the number of 16-bit values written.
@@ -86,12 +86,12 @@
 // string, and reserves that amount of space.  We assume that the input
 // character types are unsigned, which will be true for UTF-16 and -32 on our
 // systems.
-template<typename CHAR>
+template <typename CHAR>
 void PrepareForUTF8Output(const CHAR* src, size_t src_len, std::string* output);
 
 // Prepares an output buffer (containing either UTF-16 or -32 data) given some
 // UTF-8 input that will be converted to it.  See PrepareForUTF8Output().
-template<typename STRING>
+template <typename STRING>
 void PrepareForUTF16Or32Output(const char* src, size_t src_len, STRING* output);
 
 }  // namespace base
diff --git a/base/strings/utf_string_conversions.h b/base/strings/utf_string_conversions.h
index 45a4be3..704943e 100644
--- a/base/strings/utf_string_conversions.h
+++ b/base/strings/utf_string_conversions.h
@@ -20,24 +20,19 @@
 // do the best it can and put the result in the output buffer. The versions that
 // return strings ignore this error and just return the best conversion
 // possible.
-bool WideToUTF8(const wchar_t* src, size_t src_len,
-                            std::string* output);
+bool WideToUTF8(const wchar_t* src, size_t src_len, std::string* output);
 std::string WideToUTF8(WStringPiece wide);
-bool UTF8ToWide(const char* src, size_t src_len,
-                            std::wstring* output);
+bool UTF8ToWide(const char* src, size_t src_len, std::wstring* output);
 std::wstring UTF8ToWide(StringPiece utf8);
 
-bool WideToUTF16(const wchar_t* src, size_t src_len,
-                             string16* output);
+bool WideToUTF16(const wchar_t* src, size_t src_len, string16* output);
 string16 WideToUTF16(WStringPiece wide);
-bool UTF16ToWide(const char16* src, size_t src_len,
-                             std::wstring* output);
+bool UTF16ToWide(const char16* src, size_t src_len, std::wstring* output);
 std::wstring UTF16ToWide(StringPiece16 utf16);
 
 bool UTF8ToUTF16(const char* src, size_t src_len, string16* output);
 string16 UTF8ToUTF16(StringPiece utf8);
-bool UTF16ToUTF8(const char16* src, size_t src_len,
-                             std::string* output);
+bool UTF16ToUTF8(const char16* src, size_t src_len, std::string* output);
 std::string UTF16ToUTF8(StringPiece16 utf16);
 
 // This converts an ASCII string, typically a hardcoded constant, to a UTF16
diff --git a/base/synchronization/condition_variable.h b/base/synchronization/condition_variable.h
index 125bcb1..d778d13 100644
--- a/base/synchronization/condition_variable.h
+++ b/base/synchronization/condition_variable.h
@@ -102,7 +102,6 @@
   void Signal();
 
  private:
-
 #if defined(OS_WIN)
   CHROME_CONDITION_VARIABLE cv_;
   CHROME_SRWLOCK* const srwlock_;
diff --git a/base/synchronization/condition_variable_posix.cc b/base/synchronization/condition_variable_posix.cc
index 229b529..7a5ef5f 100644
--- a/base/synchronization/condition_variable_posix.cc
+++ b/base/synchronization/condition_variable_posix.cc
@@ -15,17 +15,16 @@
 namespace base {
 
 ConditionVariable::ConditionVariable(Lock* user_lock)
-    : user_mutex_(user_lock->lock_.native_handle())
-{
+    : user_mutex_(user_lock->lock_.native_handle()) {
   int rv = 0;
-  // http://crbug.com/293736
-  // NaCl doesn't support monotonic clock based absolute deadlines.
-  // On older Android platform versions, it's supported through the
-  // non-standard pthread_cond_timedwait_monotonic_np. Newer platform
-  // versions have pthread_condattr_setclock.
-  // Mac can use relative time deadlines.
+// http://crbug.com/293736
+// NaCl doesn't support monotonic clock based absolute deadlines.
+// On older Android platform versions, it's supported through the
+// non-standard pthread_cond_timedwait_monotonic_np. Newer platform
+// versions have pthread_condattr_setclock.
+// Mac can use relative time deadlines.
 #if !defined(OS_MACOSX) && !defined(OS_NACL) && \
-      !(defined(OS_ANDROID) && defined(HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC))
+    !(defined(OS_ANDROID) && defined(HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC))
   pthread_condattr_t attrs;
   rv = pthread_condattr_init(&attrs);
   DCHECK_EQ(0, rv);
@@ -70,8 +69,8 @@
       (usecs % Time::kMicrosecondsPerSecond) * Time::kNanosecondsPerMicrosecond;
 
 #if defined(OS_MACOSX)
-  int rv = pthread_cond_timedwait_relative_np(
-      &condition_, user_mutex_, &relative_time);
+  int rv = pthread_cond_timedwait_relative_np(&condition_, user_mutex_,
+                                              &relative_time);
 #else
   // The timeout argument to pthread_cond_timedwait is in absolute time.
   struct timespec absolute_time;
@@ -87,8 +86,8 @@
   DCHECK_GE(absolute_time.tv_sec, now.tv_sec);  // Overflow paranoia
 
 #if defined(OS_ANDROID) && defined(HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC)
-  int rv = pthread_cond_timedwait_monotonic_np(
-      &condition_, user_mutex_, &absolute_time);
+  int rv = pthread_cond_timedwait_monotonic_np(&condition_, user_mutex_,
+                                               &absolute_time);
 #else
   int rv = pthread_cond_timedwait(&condition_, user_mutex_, &absolute_time);
 #endif  // OS_ANDROID && HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC
diff --git a/base/synchronization/condition_variable_win.cc b/base/synchronization/condition_variable_win.cc
index d247e22..87cc353 100644
--- a/base/synchronization/condition_variable_win.cc
+++ b/base/synchronization/condition_variable_win.cc
@@ -12,8 +12,7 @@
 namespace base {
 
 ConditionVariable::ConditionVariable(Lock* user_lock)
-    : srwlock_(user_lock->lock_.native_handle())
-{
+    : srwlock_(user_lock->lock_.native_handle()) {
   DCHECK(user_lock);
   InitializeConditionVariable(reinterpret_cast<PCONDITION_VARIABLE>(&cv_));
 }
diff --git a/base/synchronization/lock.h b/base/synchronization/lock.h
index 27e493c..98668e9 100644
--- a/base/synchronization/lock.h
+++ b/base/synchronization/lock.h
@@ -17,7 +17,7 @@
 // AssertAcquired() method.
 class Lock {
  public:
-   // Optimized wrapper implementation
+  // Optimized wrapper implementation
   Lock() : lock_() {}
   ~Lock() {}
   void Acquire() { lock_.Lock(); }
@@ -66,9 +66,7 @@
  public:
   struct AlreadyAcquired {};
 
-  explicit AutoLock(Lock& lock) : lock_(lock) {
-    lock_.Acquire();
-  }
+  explicit AutoLock(Lock& lock) : lock_(lock) { lock_.Acquire(); }
 
   AutoLock(Lock& lock, const AlreadyAcquired&) : lock_(lock) {
     lock_.AssertAcquired();
@@ -94,9 +92,7 @@
     lock_.Release();
   }
 
-  ~AutoUnlock() {
-    lock_.Acquire();
-  }
+  ~AutoUnlock() { lock_.Acquire(); }
 
  private:
   Lock& lock_;
diff --git a/base/synchronization/waitable_event.h b/base/synchronization/waitable_event.h
index b4f713d..ee1d33a 100644
--- a/base/synchronization/waitable_event.h
+++ b/base/synchronization/waitable_event.h
@@ -241,8 +241,8 @@
   // so we have a kernel of the WaitableEvent, which is reference counted.
   // WaitableEventWatchers may then take a reference and thus match the Windows
   // behaviour.
-  struct WaitableEventKernel :
-      public RefCountedThreadSafe<WaitableEventKernel> {
+  struct WaitableEventKernel
+      : public RefCountedThreadSafe<WaitableEventKernel> {
    public:
     WaitableEventKernel(ResetPolicy reset_policy, InitialState initial_state);
 
@@ -266,7 +266,8 @@
   // second element is the index of the WaitableEvent in the original,
   // unsorted, array.
   static size_t EnqueueMany(WaiterAndIndex* waitables,
-                            size_t count, Waiter* waiter);
+                            size_t count,
+                            Waiter* waiter);
 
   bool SignalAll();
   bool SignalOne();
diff --git a/base/synchronization/waitable_event_posix.cc b/base/synchronization/waitable_event_posix.cc
index 3e32686..485038d 100644
--- a/base/synchronization/waitable_event_posix.cc
+++ b/base/synchronization/waitable_event_posix.cc
@@ -107,9 +107,7 @@
     return true;
   }
 
-  WaitableEvent* signaling_event() const {
-    return signaling_event_;
-  }
+  WaitableEvent* signaling_event() const { return signaling_event_; }
 
   // ---------------------------------------------------------------------------
   // These waiters are always stack allocated and don't delete themselves. Thus
@@ -120,26 +118,18 @@
   // ---------------------------------------------------------------------------
   // Called with lock held.
   // ---------------------------------------------------------------------------
-  bool fired() const {
-    return fired_;
-  }
+  bool fired() const { return fired_; }
 
   // ---------------------------------------------------------------------------
   // During a TimedWait, we need a way to make sure that an auto-reset
   // WaitableEvent doesn't think that this event has been signaled between
   // unlocking it and removing it from the wait-list. Called with lock held.
   // ---------------------------------------------------------------------------
-  void Disable() {
-    fired_ = true;
-  }
+  void Disable() { fired_ = true; }
 
-  base::Lock* lock() {
-    return &lock_;
-  }
+  base::Lock* lock() { return &lock_; }
 
-  base::ConditionVariable* cv() {
-    return &cv_;
-  }
+  base::ConditionVariable* cv() { return &cv_; }
 
  private:
   bool fired_;
@@ -222,20 +212,19 @@
 // Synchronous waiting on multiple objects.
 
 static bool  // StrictWeakOrdering
-cmp_fst_addr(const std::pair<WaitableEvent*, unsigned> &a,
-             const std::pair<WaitableEvent*, unsigned> &b) {
+cmp_fst_addr(const std::pair<WaitableEvent*, unsigned>& a,
+             const std::pair<WaitableEvent*, unsigned>& b) {
   return a.first < b.first;
 }
 
 // static
-size_t WaitableEvent::WaitMany(WaitableEvent** raw_waitables,
-                               size_t count) {
+size_t WaitableEvent::WaitMany(WaitableEvent** raw_waitables, size_t count) {
   DCHECK(count) << "Cannot wait on no events";
 
   // We need to acquire the locks in a globally consistent order. Thus we sort
   // the array of waitables by address. We actually sort a pairs so that we can
   // map back to the original index values later.
-  std::vector<std::pair<WaitableEvent*, size_t> > waitables;
+  std::vector<std::pair<WaitableEvent*, size_t>> waitables;
   waitables.reserve(count);
   for (size_t i = 0; i < count; ++i)
     waitables.push_back(std::make_pair(raw_waitables[i], i));
@@ -248,7 +237,7 @@
   // address, we can check this cheaply by comparing pairs of consecutive
   // elements.
   for (size_t i = 0; i < waitables.size() - 1; ++i) {
-    DCHECK(waitables[i].first != waitables[i+1].first);
+    DCHECK(waitables[i].first != waitables[i + 1].first);
   }
 
   SyncWaiter sw;
@@ -263,21 +252,21 @@
   // At this point, we hold the locks on all the WaitableEvents and we have
   // enqueued our waiter in them all.
   sw.lock()->Acquire();
-    // Release the WaitableEvent locks in the reverse order
-    for (size_t i = 0; i < count; ++i) {
-      waitables[count - (1 + i)].first->kernel_->lock_.Release();
-    }
+  // Release the WaitableEvent locks in the reverse order
+  for (size_t i = 0; i < count; ++i) {
+    waitables[count - (1 + i)].first->kernel_->lock_.Release();
+  }
 
-    for (;;) {
-      if (sw.fired())
-        break;
+  for (;;) {
+    if (sw.fired())
+      break;
 
-      sw.cv()->Wait();
-    }
+    sw.cv()->Wait();
+  }
   sw.lock()->Release();
 
   // The address of the WaitableEvent which fired is stored in the SyncWaiter.
-  WaitableEvent *const signaled_event = sw.signaling_event();
+  WaitableEvent* const signaled_event = sw.signaling_event();
   // This will store the index of the raw_waitables which fired.
   size_t signaled_index = 0;
 
@@ -286,10 +275,10 @@
   for (size_t i = 0; i < count; ++i) {
     if (raw_waitables[i] != signaled_event) {
       raw_waitables[i]->kernel_->lock_.Acquire();
-        // There's no possible ABA issue with the address of the SyncWaiter here
-        // because it lives on the stack. Thus the tag value is just the pointer
-        // value again.
-        raw_waitables[i]->kernel_->Dequeue(&sw, &sw);
+      // There's no possible ABA issue with the address of the SyncWaiter here
+      // because it lives on the stack. Thus the tag value is just the pointer
+      // value again.
+      raw_waitables[i]->kernel_->Dequeue(&sw, &sw);
       raw_waitables[i]->kernel_->lock_.Release();
     } else {
       // By taking this lock here we ensure that |Signal| has completed by the
@@ -353,7 +342,6 @@
 
 // -----------------------------------------------------------------------------
 
-
 // -----------------------------------------------------------------------------
 // Private functions...
 
@@ -371,8 +359,8 @@
 bool WaitableEvent::SignalAll() {
   bool signaled_at_least_one = false;
 
-  for (std::list<Waiter*>::iterator
-       i = kernel_->waiters_.begin(); i != kernel_->waiters_.end(); ++i) {
+  for (std::list<Waiter*>::iterator i = kernel_->waiters_.begin();
+       i != kernel_->waiters_.end(); ++i) {
     if ((*i)->Fire(this))
       signaled_at_least_one = true;
   }
@@ -409,8 +397,8 @@
 // actually removed. Called with lock held.
 // -----------------------------------------------------------------------------
 bool WaitableEvent::WaitableEventKernel::Dequeue(Waiter* waiter, void* tag) {
-  for (std::list<Waiter*>::iterator
-       i = waiters_.begin(); i != waiters_.end(); ++i) {
+  for (std::list<Waiter*>::iterator i = waiters_.begin(); i != waiters_.end();
+       ++i) {
     if (*i == waiter && (*i)->Compare(tag)) {
       waiters_.erase(i);
       return true;
diff --git a/base/synchronization/waitable_event_win.cc b/base/synchronization/waitable_event_win.cc
index 15dd10a..1301840 100644
--- a/base/synchronization/waitable_event_win.cc
+++ b/base/synchronization/waitable_event_win.cc
@@ -4,8 +4,8 @@
 
 #include "base/synchronization/waitable_event.h"
 
-#include <windows.h>
 #include <stddef.h>
+#include <windows.h>
 
 #include <algorithm>
 #include <utility>
@@ -127,8 +127,7 @@
 
   // The cast is safe because count is small - see the CHECK above.
   DWORD result =
-      WaitForMultipleObjects(static_cast<DWORD>(count),
-                             handles,
+      WaitForMultipleObjects(static_cast<DWORD>(count), handles,
                              FALSE,      // don't wait for all the objects
                              INFINITE);  // no timeout
   if (result >= WAIT_OBJECT_0 + count) {
diff --git a/base/template_util.h b/base/template_util.h
index 11e7ba8..e92be91 100644
--- a/base/template_util.h
+++ b/base/template_util.h
@@ -38,9 +38,12 @@
 
 namespace base {
 
-template <class T> struct is_non_const_reference : std::false_type {};
-template <class T> struct is_non_const_reference<T&> : std::true_type {};
-template <class T> struct is_non_const_reference<const T&> : std::false_type {};
+template <class T>
+struct is_non_const_reference : std::false_type {};
+template <class T>
+struct is_non_const_reference<T&> : std::true_type {};
+template <class T>
+struct is_non_const_reference<const T&> : std::false_type {};
 
 namespace internal {
 
diff --git a/base/third_party/icu/icu_utf.cc b/base/third_party/icu/icu_utf.cc
index a3262b0..8dcb401 100644
--- a/base/third_party/icu/icu_utf.cc
+++ b/base/third_party/icu/icu_utf.cc
@@ -25,23 +25,19 @@
 
 // source/common/utf_impl.cpp
 
-static const UChar32
-utf8_errorValue[6]={
+static const UChar32 utf8_errorValue[6] = {
     // Same values as UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_2, UTF_ERROR_VALUE,
     // but without relying on the obsolete unicode/utf_old.h.
-    0x15, 0x9f, 0xffff,
-    0x10ffff
-};
+    0x15, 0x9f, 0xffff, 0x10ffff};
 
-static UChar32
-errorValue(int32_t count, int8_t strict) {
-    if(strict>=0) {
-        return utf8_errorValue[count];
-    } else if(strict==-3) {
-        return 0xfffd;
-    } else {
-        return CBU_SENTINEL;
-    }
+static UChar32 errorValue(int32_t count, int8_t strict) {
+  if (strict >= 0) {
+    return utf8_errorValue[count];
+  } else if (strict == -3) {
+    return 0xfffd;
+  } else {
+    return CBU_SENTINEL;
+  }
 }
 
 /*
@@ -53,79 +49,81 @@
  * The "strict" parameter controls the error behavior:
  * <0  "Safe" behavior of U8_NEXT():
  *     -1: All illegal byte sequences yield U_SENTINEL=-1.
- *     -2: Same as -1, except for lenient treatment of surrogate code points as legal.
- *         Some implementations use this for roundtripping of
- *         Unicode 16-bit strings that are not well-formed UTF-16, that is, they
- *         contain unpaired surrogates.
- *     -3: All illegal byte sequences yield U+FFFD.
- *  0  Obsolete "safe" behavior of UTF8_NEXT_CHAR_SAFE(..., FALSE):
- *     All illegal byte sequences yield a positive code point such that this
- *     result code point would be encoded with the same number of bytes as
- *     the illegal sequence.
- * >0  Obsolete "strict" behavior of UTF8_NEXT_CHAR_SAFE(..., TRUE):
- *     Same as the obsolete "safe" behavior, but non-characters are also treated
- *     like illegal sequences.
+ *     -2: Same as -1, except for lenient treatment of surrogate code points as
+ * legal. Some implementations use this for roundtripping of Unicode 16-bit
+ * strings that are not well-formed UTF-16, that is, they contain
+ * unpaired surrogates. -3: All illegal byte sequences yield U+FFFD. 0
+ * Obsolete "safe" behavior of UTF8_NEXT_CHAR_SAFE(..., FALSE): All illegal
+ * byte sequences yield a positive code point such that this result code
+ * point would be encoded with the same number of bytes as the illegal
+ * sequence. >0  Obsolete "strict" behavior of UTF8_NEXT_CHAR_SAFE(...,
+ * TRUE): Same as the obsolete "safe" behavior, but non-characters are also
+ * treated like illegal sequences.
  *
  * Note that a UBool is the same as an int8_t.
  */
-UChar32
-utf8_nextCharSafeBody(const uint8_t *s, int32_t *pi, int32_t length, UChar32 c, UBool strict) {
-    // *pi is one after byte c.
-    int32_t i=*pi;
-    // length can be negative for NUL-terminated strings: Read and validate one byte at a time.
-    if(i==length || c>0xf4) {
-        // end of string, or not a lead byte
-    } else if(c>=0xf0) {
-        // Test for 4-byte sequences first because
-        // U8_NEXT() handles shorter valid sequences inline.
-        uint8_t t1=s[i], t2, t3;
-        c&=7;
-        if(CBU8_IS_VALID_LEAD4_AND_T1(c, t1) &&
-                ++i!=length && (t2=s[i]-0x80)<=0x3f &&
-                ++i!=length && (t3=s[i]-0x80)<=0x3f) {
-            ++i;
-            c=(c<<18)|((t1&0x3f)<<12)|(t2<<6)|t3;
-            // strict: forbid non-characters like U+fffe
-            if(strict<=0 || !CBU_IS_UNICODE_NONCHAR(c)) {
-                *pi=i;
-                return c;
-            }
+UChar32 utf8_nextCharSafeBody(const uint8_t* s,
+                              int32_t* pi,
+                              int32_t length,
+                              UChar32 c,
+                              UBool strict) {
+  // *pi is one after byte c.
+  int32_t i = *pi;
+  // length can be negative for NUL-terminated strings: Read and validate one
+  // byte at a time.
+  if (i == length || c > 0xf4) {
+    // end of string, or not a lead byte
+  } else if (c >= 0xf0) {
+    // Test for 4-byte sequences first because
+    // U8_NEXT() handles shorter valid sequences inline.
+    uint8_t t1 = s[i], t2, t3;
+    c &= 7;
+    if (CBU8_IS_VALID_LEAD4_AND_T1(c, t1) && ++i != length &&
+        (t2 = s[i] - 0x80) <= 0x3f && ++i != length &&
+        (t3 = s[i] - 0x80) <= 0x3f) {
+      ++i;
+      c = (c << 18) | ((t1 & 0x3f) << 12) | (t2 << 6) | t3;
+      // strict: forbid non-characters like U+fffe
+      if (strict <= 0 || !CBU_IS_UNICODE_NONCHAR(c)) {
+        *pi = i;
+        return c;
+      }
+    }
+  } else if (c >= 0xe0) {
+    c &= 0xf;
+    if (strict != -2) {
+      uint8_t t1 = s[i], t2;
+      if (CBU8_IS_VALID_LEAD3_AND_T1(c, t1) && ++i != length &&
+          (t2 = s[i] - 0x80) <= 0x3f) {
+        ++i;
+        c = (c << 12) | ((t1 & 0x3f) << 6) | t2;
+        // strict: forbid non-characters like U+fffe
+        if (strict <= 0 || !CBU_IS_UNICODE_NONCHAR(c)) {
+          *pi = i;
+          return c;
         }
-    } else if(c>=0xe0) {
-        c&=0xf;
-        if(strict!=-2) {
-            uint8_t t1=s[i], t2;
-            if(CBU8_IS_VALID_LEAD3_AND_T1(c, t1) &&
-                    ++i!=length && (t2=s[i]-0x80)<=0x3f) {
-                ++i;
-                c=(c<<12)|((t1&0x3f)<<6)|t2;
-                // strict: forbid non-characters like U+fffe
-                if(strict<=0 || !CBU_IS_UNICODE_NONCHAR(c)) {
-                    *pi=i;
-                    return c;
-                }
-            }
-        } else {
-            // strict=-2 -> lenient: allow surrogates
-            uint8_t t1=s[i]-0x80, t2;
-            if(t1<=0x3f && (c>0 || t1>=0x20) &&
-                    ++i!=length && (t2=s[i]-0x80)<=0x3f) {
-                *pi=i+1;
-                return (c<<12)|(t1<<6)|t2;
-            }
-        }
-    } else if(c>=0xc2) {
-        uint8_t t1=s[i]-0x80;
-        if(t1<=0x3f) {
-            *pi=i+1;
-            return ((c-0xc0)<<6)|t1;
-        }
-    }  // else 0x80<=c<0xc2 is not a lead byte
+      }
+    } else {
+      // strict=-2 -> lenient: allow surrogates
+      uint8_t t1 = s[i] - 0x80, t2;
+      if (t1 <= 0x3f && (c > 0 || t1 >= 0x20) && ++i != length &&
+          (t2 = s[i] - 0x80) <= 0x3f) {
+        *pi = i + 1;
+        return (c << 12) | (t1 << 6) | t2;
+      }
+    }
+  } else if (c >= 0xc2) {
+    uint8_t t1 = s[i] - 0x80;
+    if (t1 <= 0x3f) {
+      *pi = i + 1;
+      return ((c - 0xc0) << 6) | t1;
+    }
+  }  // else 0x80<=c<0xc2 is not a lead byte
 
-    /* error handling */
-    c=errorValue(i-*pi, strict);
-    *pi=i;
-    return c;
+  /* error handling */
+  c = errorValue(i - *pi, strict);
+  *pi = i;
+  return c;
 }
 
 }  // namespace base_icu
diff --git a/base/third_party/icu/icu_utf.h b/base/third_party/icu/icu_utf.h
index 2ba8231..b626b39 100644
--- a/base/third_party/icu/icu_utf.h
+++ b/base/third_party/icu/icu_utf.h
@@ -68,9 +68,9 @@
  * @return TRUE or FALSE
  * @stable ICU 2.4
  */
-#define CBU_IS_UNICODE_NONCHAR(c) \
-    ((c)>=0xfdd0 && \
-     ((c)<=0xfdef || ((c)&0xfffe)==0xfffe) && (c)<=0x10ffff)
+#define CBU_IS_UNICODE_NONCHAR(c)                                \
+  ((c) >= 0xfdd0 && ((c) <= 0xfdef || ((c)&0xfffe) == 0xfffe) && \
+   (c) <= 0x10ffff)
 
 /**
  * Is c a Unicode code point value (0..U+10ffff)
@@ -78,9 +78,9 @@
  *
  * Code points that are not characters include:
  * - single surrogate code points (U+d800..U+dfff, 2048 code points)
- * - the last two code points on each plane (U+__fffe and U+__ffff, 34 code points)
- * - U+fdd0..U+fdef (new with Unicode 3.1, 32 code points)
- * - the highest Unicode code point value is U+10ffff
+ * - the last two code points on each plane (U+__fffe and U+__ffff, 34 code
+ * points) - U+fdd0..U+fdef (new with Unicode 3.1, 32 code points) - the highest
+ * Unicode code point value is U+10ffff
  *
  * This means that all code points below U+d800 are character code points,
  * and that boundary is tested first for performance.
@@ -90,8 +90,8 @@
  * @stable ICU 2.4
  */
 #define CBU_IS_UNICODE_CHAR(c) \
-    ((uint32_t)(c)<0xd800 || \
-        (0xdfff<(c) && (c)<=0x10ffff && !CBU_IS_UNICODE_NONCHAR(c)))
+  ((uint32_t)(c) < 0xd800 ||   \
+   (0xdfff < (c) && (c) <= 0x10ffff && !CBU_IS_UNICODE_NONCHAR(c)))
 
 /**
  * Is this code point a surrogate (U+d800..U+dfff)?
@@ -99,7 +99,7 @@
  * @return TRUE or FALSE
  * @stable ICU 2.4
  */
-#define CBU_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
+#define CBU_IS_SURROGATE(c) (((c)&0xfffff800) == 0xd800)
 
 /**
  * Assuming c is a surrogate code point (U_IS_SURROGATE(c)),
@@ -108,43 +108,51 @@
  * @return TRUE or FALSE
  * @stable ICU 2.4
  */
-#define CBU_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
+#define CBU_IS_SURROGATE_LEAD(c) (((c)&0x400) == 0)
 
 // source/common/unicode/utf8.h
 
 /**
- * Internal bit vector for 3-byte UTF-8 validity check, for use in U8_IS_VALID_LEAD3_AND_T1.
- * Each bit indicates whether one lead byte + first trail byte pair starts a valid sequence.
- * Lead byte E0..EF bits 3..0 are used as byte index,
- * first trail byte bits 7..5 are used as bit index into that byte.
+ * Internal bit vector for 3-byte UTF-8 validity check, for use in
+ * U8_IS_VALID_LEAD3_AND_T1. Each bit indicates whether one lead byte + first
+ * trail byte pair starts a valid sequence. Lead byte E0..EF bits 3..0 are used
+ * as byte index, first trail byte bits 7..5 are used as bit index into that
+ * byte.
  * @see U8_IS_VALID_LEAD3_AND_T1
  * @internal
  */
-#define CBU8_LEAD3_T1_BITS "\x20\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x10\x30\x30"
+#define CBU8_LEAD3_T1_BITS \
+  "\x20\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x10\x30\x30"
 
 /**
  * Internal 3-byte UTF-8 validity check.
- * Non-zero if lead byte E0..EF and first trail byte 00..FF start a valid sequence.
+ * Non-zero if lead byte E0..EF and first trail byte 00..FF start a valid
+ * sequence.
  * @internal
  */
-#define CBU8_IS_VALID_LEAD3_AND_T1(lead, t1) (CBU8_LEAD3_T1_BITS[(lead)&0xf]&(1<<((uint8_t)(t1)>>5)))
+#define CBU8_IS_VALID_LEAD3_AND_T1(lead, t1) \
+  (CBU8_LEAD3_T1_BITS[(lead)&0xf] & (1 << ((uint8_t)(t1) >> 5)))
 
 /**
- * Internal bit vector for 4-byte UTF-8 validity check, for use in U8_IS_VALID_LEAD4_AND_T1.
- * Each bit indicates whether one lead byte + first trail byte pair starts a valid sequence.
- * First trail byte bits 7..4 are used as byte index,
- * lead byte F0..F4 bits 2..0 are used as bit index into that byte.
+ * Internal bit vector for 4-byte UTF-8 validity check, for use in
+ * U8_IS_VALID_LEAD4_AND_T1. Each bit indicates whether one lead byte + first
+ * trail byte pair starts a valid sequence. First trail byte bits 7..4 are used
+ * as byte index, lead byte F0..F4 bits 2..0 are used as bit index into that
+ * byte.
  * @see U8_IS_VALID_LEAD4_AND_T1
  * @internal
  */
-#define CBU8_LEAD4_T1_BITS "\x00\x00\x00\x00\x00\x00\x00\x00\x1E\x0F\x0F\x0F\x00\x00\x00\x00"
+#define CBU8_LEAD4_T1_BITS \
+  "\x00\x00\x00\x00\x00\x00\x00\x00\x1E\x0F\x0F\x0F\x00\x00\x00\x00"
 
 /**
  * Internal 4-byte UTF-8 validity check.
- * Non-zero if lead byte F0..F4 and first trail byte 00..FF start a valid sequence.
+ * Non-zero if lead byte F0..F4 and first trail byte 00..FF start a valid
+ * sequence.
  * @internal
  */
-#define CBU8_IS_VALID_LEAD4_AND_T1(lead, t1) (CBU8_LEAD4_T1_BITS[(uint8_t)(t1)>>4]&(1<<((lead)&7)))
+#define CBU8_IS_VALID_LEAD4_AND_T1(lead, t1) \
+  (CBU8_LEAD4_T1_BITS[(uint8_t)(t1) >> 4] & (1 << ((lead)&7)))
 
 /**
  * Function for handling "next code point" with error-checking.
@@ -158,8 +166,11 @@
  * functions are hidden (otherwise public macros would fail to compile).
  * @internal
  */
-UChar32
-utf8_nextCharSafeBody(const uint8_t *s, int32_t *pi, int32_t length, ::base_icu::UChar32 c, ::base_icu::UBool strict);
+UChar32 utf8_nextCharSafeBody(const uint8_t* s,
+                              int32_t* pi,
+                              int32_t length,
+                              ::base_icu::UChar32 c,
+                              ::base_icu::UBool strict);
 
 /**
  * Does this code unit (byte) encode a code point by itself (US-ASCII 0..0x7f)?
@@ -167,7 +178,7 @@
  * @return TRUE or FALSE
  * @stable ICU 2.4
  */
-#define CBU8_IS_SINGLE(c) (((c)&0x80)==0)
+#define CBU8_IS_SINGLE(c) (((c)&0x80) == 0)
 
 /**
  * Is this code unit (byte) a UTF-8 lead byte? (0xC2..0xF4)
@@ -175,7 +186,7 @@
  * @return TRUE or FALSE
  * @stable ICU 2.4
  */
-#define CBU8_IS_LEAD(c) ((uint8_t)((c)-0xc2)<=0x32)
+#define CBU8_IS_LEAD(c) ((uint8_t)((c)-0xc2) <= 0x32)
 
 /**
  * Is this code unit (byte) a UTF-8 trail byte? (0x80..0xBF)
@@ -183,7 +194,7 @@
  * @return TRUE or FALSE
  * @stable ICU 2.4
  */
-#define CBU8_IS_TRAIL(c) ((int8_t)(c)<-0x40)
+#define CBU8_IS_TRAIL(c) ((int8_t)(c) < -0x40)
 
 /**
  * How many code units (bytes) are used for the UTF-8 encoding
@@ -192,19 +203,20 @@
  * @return 1..4, or 0 if c is a surrogate or not a Unicode code point
  * @stable ICU 2.4
  */
-#define CBU8_LENGTH(c) \
-    ((uint32_t)(c)<=0x7f ? 1 : \
-        ((uint32_t)(c)<=0x7ff ? 2 : \
-            ((uint32_t)(c)<=0xd7ff ? 3 : \
-                ((uint32_t)(c)<=0xdfff || (uint32_t)(c)>0x10ffff ? 0 : \
-                    ((uint32_t)(c)<=0xffff ? 3 : 4)\
-                ) \
-            ) \
-        ) \
-    )
+#define CBU8_LENGTH(c)                                                      \
+  ((uint32_t)(c) <= 0x7f                                                    \
+       ? 1                                                                  \
+       : ((uint32_t)(c) <= 0x7ff                                            \
+              ? 2                                                           \
+              : ((uint32_t)(c) <= 0xd7ff                                    \
+                     ? 3                                                    \
+                     : ((uint32_t)(c) <= 0xdfff || (uint32_t)(c) > 0x10ffff \
+                            ? 0                                             \
+                            : ((uint32_t)(c) <= 0xffff ? 3 : 4)))))
 
 /**
- * The maximum number of UTF-8 code units (bytes) per Unicode code point (U+0000..U+10ffff).
+ * The maximum number of UTF-8 code units (bytes) per Unicode code point
+ * (U+0000..U+10ffff).
  * @return 4
  * @stable ICU 2.4
  */
@@ -230,36 +242,37 @@
  * @see U8_NEXT_UNSAFE
  * @stable ICU 2.4
  */
-#define CBU8_NEXT(s, i, length, c) { \
-    (c)=(uint8_t)(s)[(i)++]; \
-    if(!CBU8_IS_SINGLE(c)) { \
-        uint8_t __t1, __t2; \
-        if( /* handle U+0800..U+FFFF inline */ \
-                (0xe0<=(c) && (c)<0xf0) && \
-                (((i)+1)<(length) || (length)<0) && \
-                CBU8_IS_VALID_LEAD3_AND_T1((c), __t1=(s)[i]) && \
-                (__t2=(s)[(i)+1]-0x80)<=0x3f) { \
-            (c)=(((c)&0xf)<<12)|((__t1&0x3f)<<6)|__t2; \
-            (i)+=2; \
-        } else if( /* handle U+0080..U+07FF inline */ \
-                ((c)<0xe0 && (c)>=0xc2) && \
-                ((i)!=(length)) && \
-                (__t1=(s)[i]-0x80)<=0x3f) { \
-            (c)=(((c)&0x1f)<<6)|__t1; \
-            ++(i); \
-        } else { \
-            /* function call for "complicated" and error cases */ \
-            (c)=::base_icu::utf8_nextCharSafeBody((const uint8_t *)s, &(i), (length), c, -1); \
-        } \
-    } \
-}
+#define CBU8_NEXT(s, i, length, c)                                       \
+  {                                                                      \
+    (c) = (uint8_t)(s)[(i)++];                                           \
+    if (!CBU8_IS_SINGLE(c)) {                                            \
+      uint8_t __t1, __t2;                                                \
+      if (/* handle U+0800..U+FFFF inline */                             \
+          (0xe0 <= (c) && (c) < 0xf0) &&                                 \
+          (((i) + 1) < (length) || (length) < 0) &&                      \
+          CBU8_IS_VALID_LEAD3_AND_T1((c), __t1 = (s)[i]) &&              \
+          (__t2 = (s)[(i) + 1] - 0x80) <= 0x3f) {                        \
+        (c) = (((c)&0xf) << 12) | ((__t1 & 0x3f) << 6) | __t2;           \
+        (i) += 2;                                                        \
+      } else if (/* handle U+0080..U+07FF inline */                      \
+                 ((c) < 0xe0 && (c) >= 0xc2) && ((i) != (length)) &&     \
+                 (__t1 = (s)[i] - 0x80) <= 0x3f) {                       \
+        (c) = (((c)&0x1f) << 6) | __t1;                                  \
+        ++(i);                                                           \
+      } else {                                                           \
+        /* function call for "complicated" and error cases */            \
+        (c) = ::base_icu::utf8_nextCharSafeBody((const uint8_t*)s, &(i), \
+                                                (length), c, -1);        \
+      }                                                                  \
+    }                                                                    \
+  }
 
 /**
  * Append a code point to a string, overwriting 1 to 4 bytes.
  * The offset points to the current end of the string contents
  * and is advanced (post-increment).
- * "Unsafe" macro, assumes a valid code point and sufficient space in the string.
- * Otherwise, the result is undefined.
+ * "Unsafe" macro, assumes a valid code point and sufficient space in the
+ * string. Otherwise, the result is undefined.
  *
  * @param s const uint8_t * string buffer
  * @param i string offset
@@ -267,24 +280,25 @@
  * @see U8_APPEND
  * @stable ICU 2.4
  */
-#define CBU8_APPEND_UNSAFE(s, i, c) { \
-    if((uint32_t)(c)<=0x7f) { \
-        (s)[(i)++]=(uint8_t)(c); \
-    } else { \
-        if((uint32_t)(c)<=0x7ff) { \
-            (s)[(i)++]=(uint8_t)(((c)>>6)|0xc0); \
-        } else { \
-            if((uint32_t)(c)<=0xffff) { \
-                (s)[(i)++]=(uint8_t)(((c)>>12)|0xe0); \
-            } else { \
-                (s)[(i)++]=(uint8_t)(((c)>>18)|0xf0); \
-                (s)[(i)++]=(uint8_t)((((c)>>12)&0x3f)|0x80); \
-            } \
-            (s)[(i)++]=(uint8_t)((((c)>>6)&0x3f)|0x80); \
-        } \
-        (s)[(i)++]=(uint8_t)(((c)&0x3f)|0x80); \
-    } \
-}
+#define CBU8_APPEND_UNSAFE(s, i, c)                            \
+  {                                                            \
+    if ((uint32_t)(c) <= 0x7f) {                               \
+      (s)[(i)++] = (uint8_t)(c);                               \
+    } else {                                                   \
+      if ((uint32_t)(c) <= 0x7ff) {                            \
+        (s)[(i)++] = (uint8_t)(((c) >> 6) | 0xc0);             \
+      } else {                                                 \
+        if ((uint32_t)(c) <= 0xffff) {                         \
+          (s)[(i)++] = (uint8_t)(((c) >> 12) | 0xe0);          \
+        } else {                                               \
+          (s)[(i)++] = (uint8_t)(((c) >> 18) | 0xf0);          \
+          (s)[(i)++] = (uint8_t)((((c) >> 12) & 0x3f) | 0x80); \
+        }                                                      \
+        (s)[(i)++] = (uint8_t)((((c) >> 6) & 0x3f) | 0x80);    \
+      }                                                        \
+      (s)[(i)++] = (uint8_t)(((c)&0x3f) | 0x80);               \
+    }                                                          \
+  }
 
 // source/common/unicode/utf16.h
 
@@ -302,7 +316,7 @@
  * @return TRUE or FALSE
  * @stable ICU 2.4
  */
-#define CBU16_IS_LEAD(c) (((c)&0xfffffc00)==0xd800)
+#define CBU16_IS_LEAD(c) (((c)&0xfffffc00) == 0xd800)
 
 /**
  * Is this code unit a trail surrogate (U+dc00..U+dfff)?
@@ -310,7 +324,7 @@
  * @return TRUE or FALSE
  * @stable ICU 2.4
  */
-#define CBU16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
+#define CBU16_IS_TRAIL(c) (((c)&0xfffffc00) == 0xdc00)
 
 /**
  * Is this code unit a surrogate (U+d800..U+dfff)?
@@ -327,13 +341,13 @@
  * @return TRUE or FALSE
  * @stable ICU 2.4
  */
-#define CBU16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
+#define CBU16_IS_SURROGATE_LEAD(c) (((c)&0x400) == 0)
 
 /**
  * Helper constant for U16_GET_SUPPLEMENTARY.
  * @internal
  */
-#define CBU16_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000)
+#define CBU16_SURROGATE_OFFSET ((0xd800 << 10UL) + 0xdc00 - 0x10000)
 
 /**
  * Get a supplementary code point value (U+10000..U+10ffff)
@@ -347,7 +361,8 @@
  * @stable ICU 2.4
  */
 #define CBU16_GET_SUPPLEMENTARY(lead, trail) \
-    (((::base_icu::UChar32)(lead)<<10UL)+(::base_icu::UChar32)(trail)-CBU16_SURROGATE_OFFSET)
+  (((::base_icu::UChar32)(lead) << 10UL) +   \
+   (::base_icu::UChar32)(trail)-CBU16_SURROGATE_OFFSET)
 
 /**
  * Get the lead surrogate (0xd800..0xdbff) for a
@@ -356,7 +371,8 @@
  * @return lead surrogate (U+d800..U+dbff) for supplementary
  * @stable ICU 2.4
  */
-#define CBU16_LEAD(supplementary) (::base_icu::UChar)(((supplementary)>>10)+0xd7c0)
+#define CBU16_LEAD(supplementary) \
+  (::base_icu::UChar)(((supplementary) >> 10) + 0xd7c0)
 
 /**
  * Get the trail surrogate (0xdc00..0xdfff) for a
@@ -365,19 +381,22 @@
  * @return trail surrogate (U+dc00..U+dfff) for supplementary
  * @stable ICU 2.4
  */
-#define CBU16_TRAIL(supplementary) (::base_icu::UChar)(((supplementary)&0x3ff)|0xdc00)
+#define CBU16_TRAIL(supplementary) \
+  (::base_icu::UChar)(((supplementary)&0x3ff) | 0xdc00)
 
 /**
- * How many 16-bit code units are used to encode this Unicode code point? (1 or 2)
- * The result is not defined if c is not a Unicode code point (U+0000..U+10ffff).
+ * How many 16-bit code units are used to encode this Unicode code point? (1 or
+ * 2) The result is not defined if c is not a Unicode code point
+ * (U+0000..U+10ffff).
  * @param c 32-bit code point
  * @return 1 or 2
  * @stable ICU 2.4
  */
-#define CBU16_LENGTH(c) ((uint32_t)(c)<=0xffff ? 1 : 2)
+#define CBU16_LENGTH(c) ((uint32_t)(c) <= 0xffff ? 1 : 2)
 
 /**
- * The maximum number of 16-bit code units per Unicode code point (U+0000..U+10ffff).
+ * The maximum number of 16-bit code units per Unicode code point
+ * (U+0000..U+10ffff).
  * @return 2
  * @stable ICU 2.4
  */
@@ -395,7 +414,8 @@
  * for a supplementary code point, in which case the macro will read
  * the following trail surrogate as well.
  * If the offset points to a trail surrogate or
- * to a single, unpaired lead surrogate, then c is set to that unpaired surrogate.
+ * to a single, unpaired lead surrogate, then c is set to that unpaired
+ * surrogate.
  *
  * @param s const UChar * string
  * @param i string offset, must be i<length
@@ -404,23 +424,24 @@
  * @see U16_NEXT_UNSAFE
  * @stable ICU 2.4
  */
-#define CBU16_NEXT(s, i, length, c) { \
-    (c)=(s)[(i)++]; \
-    if(CBU16_IS_LEAD(c)) { \
-        uint16_t __c2; \
-        if((i)!=(length) && CBU16_IS_TRAIL(__c2=(s)[(i)])) { \
-            ++(i); \
-            (c)=CBU16_GET_SUPPLEMENTARY((c), __c2); \
-        } \
-    } \
-}
+#define CBU16_NEXT(s, i, length, c)                             \
+  {                                                             \
+    (c) = (s)[(i)++];                                           \
+    if (CBU16_IS_LEAD(c)) {                                     \
+      uint16_t __c2;                                            \
+      if ((i) != (length) && CBU16_IS_TRAIL(__c2 = (s)[(i)])) { \
+        ++(i);                                                  \
+        (c) = CBU16_GET_SUPPLEMENTARY((c), __c2);               \
+      }                                                         \
+    }                                                           \
+  }
 
 /**
  * Append a code point to a string, overwriting 1 or 2 code units.
  * The offset points to the current end of the string contents
  * and is advanced (post-increment).
- * "Unsafe" macro, assumes a valid code point and sufficient space in the string.
- * Otherwise, the result is undefined.
+ * "Unsafe" macro, assumes a valid code point and sufficient space in the
+ * string. Otherwise, the result is undefined.
  *
  * @param s const UChar * string buffer
  * @param i string offset
@@ -428,15 +449,16 @@
  * @see U16_APPEND
  * @stable ICU 2.4
  */
-#define CBU16_APPEND_UNSAFE(s, i, c) { \
-    if((uint32_t)(c)<=0xffff) { \
-        (s)[(i)++]=(uint16_t)(c); \
-    } else { \
-        (s)[(i)++]=(uint16_t)(((c)>>10)+0xd7c0); \
-        (s)[(i)++]=(uint16_t)(((c)&0x3ff)|0xdc00); \
-    } \
-}
+#define CBU16_APPEND_UNSAFE(s, i, c)                 \
+  {                                                  \
+    if ((uint32_t)(c) <= 0xffff) {                   \
+      (s)[(i)++] = (uint16_t)(c);                    \
+    } else {                                         \
+      (s)[(i)++] = (uint16_t)(((c) >> 10) + 0xd7c0); \
+      (s)[(i)++] = (uint16_t)(((c)&0x3ff) | 0xdc00); \
+    }                                                \
+  }
 
-}  // namesapce base_icu
+}  // namespace base_icu
 
 #endif  // BASE_THIRD_PARTY_ICU_ICU_UTF_H_
diff --git a/base/threading/platform_thread.h b/base/threading/platform_thread.h
index 6fbe327..3f1cc75 100644
--- a/base/threading/platform_thread.h
+++ b/base/threading/platform_thread.h
@@ -54,15 +54,12 @@
 
   explicit constexpr PlatformThreadRef(RefType id) : id_(id) {}
 
-  bool operator==(PlatformThreadRef other) const {
-    return id_ == other.id_;
-  }
+  bool operator==(PlatformThreadRef other) const { return id_ == other.id_; }
 
   bool operator!=(PlatformThreadRef other) const { return id_ != other.id_; }
 
-  bool is_null() const {
-    return id_ == 0;
-  }
+  bool is_null() const { return id_ == 0; }
+
  private:
   RefType id_;
 };
@@ -84,13 +81,9 @@
     return handle_ == other.handle_;
   }
 
-  bool is_null() const {
-    return !handle_;
-  }
+  bool is_null() const { return !handle_; }
 
-  Handle platform_handle() const {
-    return handle_;
-  }
+  Handle platform_handle() const { return handle_; }
 
  private:
   Handle handle_;
diff --git a/base/threading/platform_thread_mac.mm b/base/threading/platform_thread_mac.mm
index 8174dba..2a7cd48 100644
--- a/base/threading/platform_thread_mac.mm
+++ b/base/threading/platform_thread_mac.mm
@@ -71,16 +71,14 @@
   if (pthread_attr_getstacksize(&attributes, &default_stack_size) == 0 &&
       getrlimit(RLIMIT_STACK, &stack_rlimit) == 0 &&
       stack_rlimit.rlim_cur != RLIM_INFINITY) {
-    default_stack_size =
-        std::max(std::max(default_stack_size,
-                          static_cast<size_t>(PTHREAD_STACK_MIN)),
-                 static_cast<size_t>(stack_rlimit.rlim_cur));
+    default_stack_size = std::max(
+        std::max(default_stack_size, static_cast<size_t>(PTHREAD_STACK_MIN)),
+        static_cast<size_t>(stack_rlimit.rlim_cur));
   }
   return default_stack_size;
 #endif
 }
 
-void TerminateOnThread() {
-}
+void TerminateOnThread() {}
 
 }  // namespace base
diff --git a/base/threading/platform_thread_posix.cc b/base/threading/platform_thread_posix.cc
index 32a052a..bfec23c 100644
--- a/base/threading/platform_thread_posix.cc
+++ b/base/threading/platform_thread_posix.cc
@@ -104,8 +104,8 @@
 
 // static
 PlatformThreadId PlatformThread::CurrentId() {
-  // Pthreads doesn't have the concept of a thread ID, so we have to reach down
-  // into the kernel.
+// Pthreads doesn't have the concept of a thread ID, so we have to reach down
+// into the kernel.
 #if defined(OS_MACOSX)
   return pthread_mach_thread_np(pthread_self());
 #elif defined(OS_LINUX)
diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc
index 9efc951..95accd5 100644
--- a/base/threading/platform_thread_win.cc
+++ b/base/threading/platform_thread_win.cc
@@ -21,10 +21,10 @@
 const DWORD kVCThreadNameException = 0x406D1388;
 
 typedef struct tagTHREADNAME_INFO {
-  DWORD dwType;  // Must be 0x1000.
-  LPCSTR szName;  // Pointer to name (in user addr space).
+  DWORD dwType;      // Must be 0x1000.
+  LPCSTR szName;     // Pointer to name (in user addr space).
   DWORD dwThreadID;  // Thread ID (-1=caller thread).
-  DWORD dwFlags;  // Reserved for future use, must be zero.
+  DWORD dwFlags;     // Reserved for future use, must be zero.
 } THREADNAME_INFO;
 
 // The SetThreadDescription API was brought in version 1607 of Windows 10.
@@ -40,9 +40,9 @@
   info.dwFlags = 0;
 
   __try {
-    RaiseException(kVCThreadNameException, 0, sizeof(info)/sizeof(DWORD),
+    RaiseException(kVCThreadNameException, 0, sizeof(info) / sizeof(DWORD),
                    reinterpret_cast<DWORD_PTR*>(&info));
-  } __except(EXCEPTION_CONTINUE_EXECUTION) {
+  } __except (EXCEPTION_CONTINUE_EXECUTION) {
   }
 }
 
@@ -58,13 +58,9 @@
   // Retrieve a copy of the thread handle to use as the key in the
   // thread name mapping.
   PlatformThreadHandle::Handle platform_handle;
-  BOOL did_dup = DuplicateHandle(GetCurrentProcess(),
-                                GetCurrentThread(),
-                                GetCurrentProcess(),
-                                &platform_handle,
-                                0,
-                                FALSE,
-                                DUPLICATE_SAME_ACCESS);
+  BOOL did_dup = DuplicateHandle(GetCurrentProcess(), GetCurrentThread(),
+                                 GetCurrentProcess(), &platform_handle, 0,
+                                 FALSE, DUPLICATE_SAME_ACCESS);
 
   win::ScopedHandle scoped_platform_handle;
 
diff --git a/base/time/time.cc b/base/time/time.cc
index bd746b3..8708c49 100644
--- a/base/time/time.cc
+++ b/base/time/time.cc
@@ -98,7 +98,7 @@
     return std::numeric_limits<int64_t>::max();
   }
   return (delta_ + Time::kMicrosecondsPerMillisecond - 1) /
-      Time::kMicrosecondsPerMillisecond;
+         Time::kMicrosecondsPerMillisecond;
 }
 
 int64_t TimeDelta::InMicroseconds() const {
@@ -194,8 +194,8 @@
     return std::numeric_limits<time_t>::max();
   }
   if (std::numeric_limits<int64_t>::max() - kTimeTToMicrosecondsOffset <= us_) {
-    DLOG(WARNING) << "Overflow when converting base::Time with internal " <<
-                     "value " << us_ << " to time_t.";
+    DLOG(WARNING) << "Overflow when converting base::Time with internal "
+                  << "value " << us_ << " to time_t.";
     return std::numeric_limits<time_t>::max();
   }
   return (us_ - kTimeTToMicrosecondsOffset) / kMicrosecondsPerSecond;
@@ -222,9 +222,8 @@
 #if defined(OS_POSIX)
 // static
 Time Time::FromTimeSpec(const timespec& ts) {
-  return FromDoubleT(ts.tv_sec +
-                     static_cast<double>(ts.tv_nsec) /
-                         base::Time::kNanosecondsPerSecond);
+  return FromDoubleT(ts.tv_sec + static_cast<double>(ts.tv_nsec) /
+                                     base::Time::kNanosecondsPerSecond);
 }
 #endif
 
@@ -263,8 +262,7 @@
     // Preserve max without offset to prevent overflow.
     return std::numeric_limits<int64_t>::max();
   }
-  return ((us_ - kTimeTToMicrosecondsOffset) /
-          kMicrosecondsPerMillisecond);
+  return ((us_ - kTimeTToMicrosecondsOffset) / kMicrosecondsPerMillisecond);
 }
 
 // static
@@ -301,14 +299,10 @@
   Time::Exploded exploded;
   time.UTCExplode(&exploded);
   // Use StringPrintf because iostreams formatting is painful.
-  return os << StringPrintf("%04d-%02d-%02d %02d:%02d:%02d.%03d UTC",
-                            exploded.year,
-                            exploded.month,
-                            exploded.day_of_month,
-                            exploded.hour,
-                            exploded.minute,
-                            exploded.second,
-                            exploded.millisecond);
+  return os << StringPrintf(
+             "%04d-%02d-%02d %02d:%02d:%02d.%03d UTC", exploded.year,
+             exploded.month, exploded.day_of_month, exploded.hour,
+             exploded.minute, exploded.second, exploded.millisecond);
 }
 
 // TimeTicks ------------------------------------------------------------------
@@ -369,12 +363,9 @@
 }
 
 bool Time::Exploded::HasValidValues() const {
-  return is_in_range(month, 1, 12) &&
-         is_in_range(day_of_week, 0, 6) &&
-         is_in_range(day_of_month, 1, 31) &&
-         is_in_range(hour, 0, 23) &&
-         is_in_range(minute, 0, 59) &&
-         is_in_range(second, 0, 60) &&
+  return is_in_range(month, 1, 12) && is_in_range(day_of_week, 0, 6) &&
+         is_in_range(day_of_month, 1, 31) && is_in_range(hour, 0, 23) &&
+         is_in_range(minute, 0, 59) && is_in_range(second, 0, 60) &&
          is_in_range(millisecond, 0, 999);
 }
 
diff --git a/base/time/time.h b/base/time/time.h
index 931cf27..1243ac4 100644
--- a/base/time/time.h
+++ b/base/time/time.h
@@ -69,8 +69,8 @@
 #endif
 
 #if defined(OS_POSIX)
-#include <unistd.h>
 #include <sys/time.h>
+#include <unistd.h>
 #endif
 
 #if defined(OS_WIN)
@@ -205,12 +205,8 @@
     return TimeDelta(time_internal::SaturatedSub(*this, other.delta_));
   }
 
-  TimeDelta& operator+=(TimeDelta other) {
-    return *this = (*this + other);
-  }
-  TimeDelta& operator-=(TimeDelta other) {
-    return *this = (*this - other);
-  }
+  TimeDelta& operator+=(TimeDelta other) { return *this = (*this + other); }
+  TimeDelta& operator-=(TimeDelta other) { return *this = (*this - other); }
   constexpr TimeDelta operator-() const { return TimeDelta(-delta_); }
 
   // Computations with numeric types. operator*() isn't constexpr because of a
@@ -317,7 +313,7 @@
 // classes. Each subclass provides for strong type-checking to ensure
 // semantically meaningful comparison/math of time values from the same clock
 // source or timeline.
-template<class TimeClass>
+template <class TimeClass>
 class TimeBase {
  public:
   static const int64_t kHoursPerDay = 24;
@@ -341,9 +337,7 @@
   // Warning: Be careful when writing code that performs math on time values,
   // since it's possible to produce a valid "zero" result that should not be
   // interpreted as a "null" value.
-  bool is_null() const {
-    return us_ == 0;
-  }
+  bool is_null() const { return us_ == 0; }
 
   // Returns true if this object represents the maximum/minimum time.
   bool is_max() const { return us_ == std::numeric_limits<int64_t>::max(); }
@@ -402,24 +396,12 @@
   }
 
   // Comparison operators
-  bool operator==(TimeClass other) const {
-    return us_ == other.us_;
-  }
-  bool operator!=(TimeClass other) const {
-    return us_ != other.us_;
-  }
-  bool operator<(TimeClass other) const {
-    return us_ < other.us_;
-  }
-  bool operator<=(TimeClass other) const {
-    return us_ <= other.us_;
-  }
-  bool operator>(TimeClass other) const {
-    return us_ > other.us_;
-  }
-  bool operator>=(TimeClass other) const {
-    return us_ >= other.us_;
-  }
+  bool operator==(TimeClass other) const { return us_ == other.us_; }
+  bool operator!=(TimeClass other) const { return us_ != other.us_; }
+  bool operator<(TimeClass other) const { return us_ < other.us_; }
+  bool operator<=(TimeClass other) const { return us_ <= other.us_; }
+  bool operator>(TimeClass other) const { return us_ > other.us_; }
+  bool operator>=(TimeClass other) const { return us_ >= other.us_; }
 
  protected:
   constexpr explicit TimeBase(int64_t us) : us_(us) {}
@@ -430,7 +412,7 @@
 
 }  // namespace time_internal
 
-template<class TimeClass>
+template <class TimeClass>
 inline TimeClass operator+(TimeDelta delta, TimeClass t) {
   return t + delta;
 }
@@ -620,9 +602,7 @@
 
   // Fills the given exploded structure with either the local time or UTC from
   // this time structure (containing UTC).
-  void UTCExplode(Exploded* exploded) const {
-    return Explode(false, exploded);
-  }
+  void UTCExplode(Exploded* exploded) const { return Explode(false, exploded); }
   void LocalExplode(Exploded* exploded) const {
     return Explode(true, exploded);
   }
@@ -854,8 +834,7 @@
 // thread is running.
 class ThreadTicks : public time_internal::TimeBase<ThreadTicks> {
  public:
-  ThreadTicks() : TimeBase(0) {
-  }
+  ThreadTicks() : TimeBase(0) {}
 
   // Returns true if ThreadTicks::Now() is supported on this system.
   static bool IsSupported() WARN_UNUSED_RESULT {
diff --git a/base/time/time_exploded_posix.cc b/base/time/time_exploded_posix.cc
index ae1b4df..c9ec2df 100644
--- a/base/time/time_exploded_posix.cc
+++ b/base/time/time_exploded_posix.cc
@@ -117,7 +117,7 @@
   timestruct.tm_yday = 0;                     // mktime/timegm ignore this
   timestruct.tm_isdst = -1;                   // attempt to figure it out
 #if !defined(OS_NACL) && !defined(OS_SOLARIS) && !defined(OS_AIX)
-  timestruct.tm_gmtoff = 0;   // not a POSIX field, so mktime/timegm ignore
+  timestruct.tm_gmtoff = 0;      // not a POSIX field, so mktime/timegm ignore
   timestruct.tm_zone = nullptr;  // not a POSIX field, so mktime/timegm ignore
 #endif
 
diff --git a/base/time/time_mac.cc b/base/time/time_mac.cc
index 567696d..7b6452e 100644
--- a/base/time/time_mac.cc
+++ b/base/time/time_mac.cc
@@ -109,10 +109,8 @@
   }
 
   kern_return_t kr = thread_info(
-      thread.get(),
-      THREAD_BASIC_INFO,
-      reinterpret_cast<thread_info_t>(&thread_info_data),
-      &thread_info_count);
+      thread.get(), THREAD_BASIC_INFO,
+      reinterpret_cast<thread_info_t>(&thread_info_data), &thread_info_count);
   MACH_DCHECK(kr == KERN_SUCCESS, kr) << "thread_info";
 
   base::CheckedNumeric<int64_t> absolute_micros(
@@ -263,8 +261,8 @@
   // Calculate milliseconds ourselves, since we rounded the |seconds|, making
   // sure to round towards -infinity.
   exploded->millisecond =
-      (microsecond >= 0) ? microsecond / kMicrosecondsPerMillisecond :
-                           (microsecond - kMicrosecondsPerMillisecond + 1) /
+      (microsecond >= 0) ? microsecond / kMicrosecondsPerMillisecond
+                         : (microsecond - kMicrosecondsPerMillisecond + 1) /
                                kMicrosecondsPerMillisecond;
 }
 #endif  // OS_IOS
diff --git a/base/time/time_win.cc b/base/time/time_win.cc
index ba220d6..438049d 100644
--- a/base/time/time_win.cc
+++ b/base/time/time_win.cc
@@ -2,7 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-
 // Windows Timer Primer
 //
 // A good article:  http://www.ddj.com/windows/184416651
@@ -34,6 +33,7 @@
 #include "base/time/time.h"
 
 #include <windows.h>
+
 #include <mmsystem.h>
 #include <stdint.h>
 
@@ -58,7 +58,7 @@
 
 void MicrosecondsToFileTime(int64_t us, FILETIME* ft) {
   DCHECK_GE(us, 0LL) << "Time is less than 0, negative values are not "
-      "representable in FILETIME";
+                        "representable in FILETIME";
 
   // Multiply by 10 to convert microseconds to 100-nanoseconds. Bit_cast will
   // handle alignment problems. This only works on little-endian machines.
@@ -467,7 +467,7 @@
   return g_time_ticks_now_ignoring_override_function();
 }
 
-}  // namespace
+}  // namespace base
 
 namespace subtle {
 TimeTicks TimeTicksNowIgnoringOverride() {
@@ -488,7 +488,8 @@
   // Vista. So if we are using QPC then we are consistent which is the same as
   // being high resolution.
   //
-  // [1] https://msdn.microsoft.com/en-us/library/windows/desktop/dn553408(v=vs.85).aspx
+  // [1]
+  // https://msdn.microsoft.com/en-us/library/windows/desktop/dn553408(v=vs.85).aspx
   //
   // "In general, the performance counter results are consistent across all
   // processors in multi-core and multi-processor systems, even when measured on
@@ -504,8 +505,8 @@
 
 // static
 TimeTicks::Clock TimeTicks::GetClock() {
-  return IsHighResolution() ?
-      Clock::WIN_QPC : Clock::WIN_ROLLOVER_PROTECTED_TIME_GET_TIME;
+  return IsHighResolution() ? Clock::WIN_QPC
+                            : Clock::WIN_ROLLOVER_PROTECTED_TIME_GET_TIME;
 }
 
 // ThreadTicks ----------------------------------------------------------------
diff --git a/base/value_iterators.h b/base/value_iterators.h
index 878ae7b..4c814c5 100644
--- a/base/value_iterators.h
+++ b/base/value_iterators.h
@@ -57,10 +57,8 @@
   dict_iterator& operator--();
   dict_iterator operator--(int);
 
-  friend bool operator==(const dict_iterator& lhs,
-                                     const dict_iterator& rhs);
-  friend bool operator!=(const dict_iterator& lhs,
-                                     const dict_iterator& rhs);
+  friend bool operator==(const dict_iterator& lhs, const dict_iterator& rhs);
+  friend bool operator!=(const dict_iterator& lhs, const dict_iterator& rhs);
 
  private:
   DictStorage::iterator dict_iter_;
@@ -104,9 +102,9 @@
   const_dict_iterator operator--(int);
 
   friend bool operator==(const const_dict_iterator& lhs,
-                                     const const_dict_iterator& rhs);
+                         const const_dict_iterator& rhs);
   friend bool operator!=(const const_dict_iterator& lhs,
-                                     const const_dict_iterator& rhs);
+                         const const_dict_iterator& rhs);
 
  private:
   DictStorage::const_iterator dict_iter_;
diff --git a/base/values.cc b/base/values.cc
index 905a468..0b348b7 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -23,8 +23,8 @@
 
 namespace {
 
-const char* const kTypeNames[] = {"null",   "boolean", "integer",
-                                  "string", "binary",  "dictionary", "list"};
+const char* const kTypeNames[] = {"null",   "boolean",    "integer", "string",
+                                  "binary", "dictionary", "list"};
 static_assert(arraysize(kTypeNames) ==
                   static_cast<size_t>(Value::Type::LIST) + 1,
               "kTypeNames Has Wrong Size");
@@ -525,12 +525,11 @@
     case Value::Type::DICTIONARY:
       if (lhs.dict_.size() != rhs.dict_.size())
         return false;
-      return std::equal(std::begin(lhs.dict_), std::end(lhs.dict_),
-                        std::begin(rhs.dict_),
-                        [](const auto& u, const auto& v) {
-                          return std::tie(u.first, *u.second) ==
-                                 std::tie(v.first, *v.second);
-                        });
+      return std::equal(
+          std::begin(lhs.dict_), std::end(lhs.dict_), std::begin(rhs.dict_),
+          [](const auto& u, const auto& v) {
+            return std::tie(u.first, *u.second) == std::tie(v.first, *v.second);
+          });
     case Value::Type::LIST:
       return lhs.list_ == rhs.list_;
   }
@@ -738,8 +737,7 @@
   return result.first->second.get();
 }
 
-bool DictionaryValue::Get(StringPiece path,
-                          const Value** out_value) const {
+bool DictionaryValue::Get(StringPiece path, const Value** out_value) const {
   DCHECK(IsStringUTF8(path));
   StringPiece current_path(path);
   const DictionaryValue* current_dictionary = this;
@@ -759,10 +757,9 @@
   return current_dictionary->GetWithoutPathExpansion(current_path, out_value);
 }
 
-bool DictionaryValue::Get(StringPiece path, Value** out_value)  {
+bool DictionaryValue::Get(StringPiece path, Value** out_value) {
   return static_cast<const DictionaryValue&>(*this).Get(
-      path,
-      const_cast<const Value**>(out_value));
+      path, const_cast<const Value**>(out_value));
 }
 
 bool DictionaryValue::GetBoolean(StringPiece path, bool* bool_value) const {
@@ -847,8 +844,7 @@
 bool DictionaryValue::GetDictionary(StringPiece path,
                                     DictionaryValue** out_value) {
   return static_cast<const DictionaryValue&>(*this).GetDictionary(
-      path,
-      const_cast<const DictionaryValue**>(out_value));
+      path, const_cast<const DictionaryValue**>(out_value));
 }
 
 bool DictionaryValue::GetList(StringPiece path,
@@ -866,8 +862,7 @@
 
 bool DictionaryValue::GetList(StringPiece path, ListValue** out_value) {
   return static_cast<const DictionaryValue&>(*this).GetList(
-      path,
-      const_cast<const ListValue**>(out_value));
+      path, const_cast<const ListValue**>(out_value));
 }
 
 bool DictionaryValue::GetWithoutPathExpansion(StringPiece key,
@@ -885,8 +880,7 @@
 bool DictionaryValue::GetWithoutPathExpansion(StringPiece key,
                                               Value** out_value) {
   return static_cast<const DictionaryValue&>(*this).GetWithoutPathExpansion(
-      key,
-      const_cast<const Value**>(out_value));
+      key, const_cast<const Value**>(out_value));
 }
 
 bool DictionaryValue::GetBooleanWithoutPathExpansion(StringPiece key,
@@ -946,8 +940,7 @@
   const DictionaryValue& const_this =
       static_cast<const DictionaryValue&>(*this);
   return const_this.GetDictionaryWithoutPathExpansion(
-          key,
-          const_cast<const DictionaryValue**>(out_value));
+      key, const_cast<const DictionaryValue**>(out_value));
 }
 
 bool DictionaryValue::GetListWithoutPathExpansion(
@@ -966,10 +959,8 @@
 
 bool DictionaryValue::GetListWithoutPathExpansion(StringPiece key,
                                                   ListValue** out_value) {
-  return
-      static_cast<const DictionaryValue&>(*this).GetListWithoutPathExpansion(
-          key,
-          const_cast<const ListValue**>(out_value));
+  return static_cast<const DictionaryValue&>(*this).GetListWithoutPathExpansion(
+      key, const_cast<const ListValue**>(out_value));
 }
 
 bool DictionaryValue::Remove(StringPiece path,
@@ -1015,8 +1006,7 @@
   DictionaryValue* subdict = nullptr;
   if (!GetDictionary(subdict_path, &subdict))
     return false;
-  result = subdict->RemovePath(path.substr(delimiter_position + 1),
-                               out_value);
+  result = subdict->RemovePath(path.substr(delimiter_position + 1), out_value);
   if (result && subdict->empty())
     RemoveWithoutPathExpansion(subdict_path, nullptr);
 
@@ -1118,8 +1108,7 @@
 
 bool ListValue::Get(size_t index, Value** out_value) {
   return static_cast<const ListValue&>(*this).Get(
-      index,
-      const_cast<const Value**>(out_value));
+      index, const_cast<const Value**>(out_value));
 }
 
 bool ListValue::GetBoolean(size_t index, bool* bool_value) const {
@@ -1169,8 +1158,7 @@
 
 bool ListValue::GetDictionary(size_t index, DictionaryValue** out_value) {
   return static_cast<const ListValue&>(*this).GetDictionary(
-      index,
-      const_cast<const DictionaryValue**>(out_value));
+      index, const_cast<const DictionaryValue**>(out_value));
 }
 
 bool ListValue::GetList(size_t index, const ListValue** out_value) const {
@@ -1187,8 +1175,7 @@
 
 bool ListValue::GetList(size_t index, ListValue** out_value) {
   return static_cast<const ListValue&>(*this).GetList(
-      index,
-      const_cast<const ListValue**>(out_value));
+      index, const_cast<const ListValue**>(out_value));
 }
 
 bool ListValue::Remove(size_t index, std::unique_ptr<Value>* out_value) {
diff --git a/base/values.h b/base/values.h
index 99e00c5..c3ec875 100644
--- a/base/values.h
+++ b/base/values.h
@@ -460,8 +460,7 @@
   // DEPRECATED, use Value::FindPath(path) and Value::GetBlob() instead.
   bool GetBinary(StringPiece path, Value** out_value);
   // DEPRECATED, use Value::FindPath(path) and Value's Dictionary API instead.
-  bool GetDictionary(StringPiece path,
-                     const DictionaryValue** out_value) const;
+  bool GetDictionary(StringPiece path, const DictionaryValue** out_value) const;
   // DEPRECATED, use Value::FindPath(path) and Value's Dictionary API instead.
   bool GetDictionary(StringPiece path, DictionaryValue** out_value);
   // DEPRECATED, use Value::FindPath(path) and Value::GetList() instead.
@@ -742,18 +741,16 @@
 std::ostream& operator<<(std::ostream& out, const Value& value);
 
 inline std::ostream& operator<<(std::ostream& out,
-                                            const DictionaryValue& value) {
+                                const DictionaryValue& value) {
   return out << static_cast<const Value&>(value);
 }
 
-inline std::ostream& operator<<(std::ostream& out,
-                                            const ListValue& value) {
+inline std::ostream& operator<<(std::ostream& out, const ListValue& value) {
   return out << static_cast<const Value&>(value);
 }
 
 // Stream operator so that enum class Types can be used in log statements.
-std::ostream& operator<<(std::ostream& out,
-                                     const Value::Type& type);
+std::ostream& operator<<(std::ostream& out, const Value::Type& type);
 
 }  // namespace base
 
diff --git a/base/win/com_init_check_hook.cc b/base/win/com_init_check_hook.cc
index 3da7622..7055bb0 100644
--- a/base/win/com_init_check_hook.cc
+++ b/base/win/com_init_check_hook.cc
@@ -4,10 +4,10 @@
 
 #include "base/win/com_init_check_hook.h"
 
-#include <windows.h>
 #include <objbase.h>
 #include <stdint.h>
 #include <string.h>
+#include <windows.h>
 
 #include "base/strings/stringprintf.h"
 #include "base/synchronization/lock.h"
@@ -134,7 +134,8 @@
     // See banner comment above why this subtracts 5 bytes.
     co_create_instance_padded_address_ =
         reinterpret_cast<uint32_t>(
-            GetProcAddress(ole32_library_, "CoCreateInstance")) - 5;
+            GetProcAddress(ole32_library_, "CoCreateInstance")) -
+        5;
 
     // See banner comment above why this adds 7 bytes.
     original_co_create_instance_body_function_ =
diff --git a/base/win/core_winrt_util.h b/base/win/core_winrt_util.h
index 4698f78..d760c79 100644
--- a/base/win/core_winrt_util.h
+++ b/base/win/core_winrt_util.h
@@ -30,11 +30,10 @@
 void RoUninitialize();
 
 HRESULT RoGetActivationFactory(HSTRING class_id,
-                                           const IID& iid,
-                                           void** out_factory);
+                               const IID& iid,
+                               void** out_factory);
 
-HRESULT RoActivateInstance(HSTRING class_id,
-                                       IInspectable** instance);
+HRESULT RoActivateInstance(HSTRING class_id, IInspectable** instance);
 
 // Retrieves an activation factory for the type specified.
 template <typename InterfaceType, char16 const* runtime_class_id>
diff --git a/base/win/enum_variant.cc b/base/win/enum_variant.cc
index 2975560..fd81775 100644
--- a/base/win/enum_variant.cc
+++ b/base/win/enum_variant.cc
@@ -12,13 +12,9 @@
 namespace win {
 
 EnumVariant::EnumVariant(unsigned long count)
-    : items_(new VARIANT[count]),
-      count_(count),
-      current_index_(0) {
-}
+    : items_(new VARIANT[count]), count_(count), current_index_(0) {}
 
-EnumVariant::~EnumVariant() {
-}
+EnumVariant::~EnumVariant() {}
 
 VARIANT* EnumVariant::ItemAt(unsigned long index) {
   DCHECK(index < count_);
diff --git a/base/win/enum_variant.h b/base/win/enum_variant.h
index b61fc8f..d12f350 100644
--- a/base/win/enum_variant.h
+++ b/base/win/enum_variant.h
@@ -15,9 +15,7 @@
 namespace win {
 
 // A simple implementation of IEnumVARIANT.
-class EnumVariant
-  : public IEnumVARIANT,
-    public IUnknownImpl {
+class EnumVariant : public IEnumVARIANT, public IUnknownImpl {
  public:
   // The constructor allocates an array of size |count|. Then use
   // ItemAt to set the value of each item in the array to initialize it.
diff --git a/base/win/event_trace_consumer.h b/base/win/event_trace_consumer.h
index 9f97e0d..93e8a24 100644
--- a/base/win/event_trace_consumer.h
+++ b/base/win/event_trace_consumer.h
@@ -6,10 +6,10 @@
 #ifndef BASE_WIN_EVENT_TRACE_CONSUMER_H_
 #define BASE_WIN_EVENT_TRACE_CONSUMER_H_
 
-#include <windows.h>
-#include <wmistr.h>
 #include <evntrace.h>
 #include <stddef.h>
+#include <windows.h>
+#include <wmistr.h>
 #include <vector>
 
 #include "base/macros.h"
@@ -34,12 +34,9 @@
 class EtwTraceConsumerBase {
  public:
   // Constructs a closed consumer.
-  EtwTraceConsumerBase() {
-  }
+  EtwTraceConsumerBase() {}
 
-  ~EtwTraceConsumerBase() {
-    Close();
-  }
+  ~EtwTraceConsumerBase() { Close(); }
 
   // Opens the named realtime session, which must be existent.
   // Note: You can use OpenRealtimeSession or OpenFileSession
@@ -62,8 +59,7 @@
 
  protected:
   // Override in subclasses to handle events.
-  static void ProcessEvent(EVENT_TRACE* event) {
-  }
+  static void ProcessEvent(EVENT_TRACE* event) {}
   // Override in subclasses to handle buffers.
   static bool ProcessBuffer(EVENT_TRACE_LOGFILE* buffer) {
     return true;  // keep going
@@ -85,8 +81,8 @@
   DISALLOW_COPY_AND_ASSIGN(EtwTraceConsumerBase);
 };
 
-template <class ImplClass> inline
-HRESULT EtwTraceConsumerBase<ImplClass>::OpenRealtimeSession(
+template <class ImplClass>
+inline HRESULT EtwTraceConsumerBase<ImplClass>::OpenRealtimeSession(
     const wchar_t* session_name) {
   EVENT_TRACE_LOGFILE logfile = {};
   logfile.LoggerName = const_cast<wchar_t*>(session_name);
@@ -102,8 +98,8 @@
   return S_OK;
 }
 
-template <class ImplClass> inline
-HRESULT EtwTraceConsumerBase<ImplClass>::OpenFileSession(
+template <class ImplClass>
+inline HRESULT EtwTraceConsumerBase<ImplClass>::OpenFileSession(
     const wchar_t* file_name) {
   EVENT_TRACE_LOGFILE logfile = {};
   logfile.LogFileName = const_cast<wchar_t*>(file_name);
@@ -118,17 +114,16 @@
   return S_OK;
 }
 
-template <class ImplClass> inline
-HRESULT EtwTraceConsumerBase<ImplClass>::Consume() {
-  ULONG err = ::ProcessTrace(&trace_handles_[0],
-                             static_cast<ULONG>(trace_handles_.size()),
-                             NULL,
-                             NULL);
+template <class ImplClass>
+inline HRESULT EtwTraceConsumerBase<ImplClass>::Consume() {
+  ULONG err =
+      ::ProcessTrace(&trace_handles_[0],
+                     static_cast<ULONG>(trace_handles_.size()), NULL, NULL);
   return HRESULT_FROM_WIN32(err);
 }
 
-template <class ImplClass> inline
-HRESULT EtwTraceConsumerBase<ImplClass>::Close() {
+template <class ImplClass>
+inline HRESULT EtwTraceConsumerBase<ImplClass>::Close() {
   HRESULT hr = S_OK;
   for (size_t i = 0; i < trace_handles_.size(); ++i) {
     if (NULL != trace_handles_[i]) {
diff --git a/base/win/event_trace_controller.cc b/base/win/event_trace_controller.cc
deleted file mode 100644
index ff392a3..0000000
--- a/base/win/event_trace_controller.cc
+++ /dev/null
@@ -1,174 +0,0 @@
-// Copyright (c) 2009 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.
-//
-// Implementation of a Windows event trace controller class.
-#include "base/win/event_trace_controller.h"
-#include "base/logging.h"
-
-namespace base {
-namespace win {
-
-EtwTraceProperties::EtwTraceProperties() {
-  memset(buffer_, 0, sizeof(buffer_));
-  EVENT_TRACE_PROPERTIES* prop = get();
-
-  prop->Wnode.BufferSize = sizeof(buffer_);
-  prop->Wnode.Flags = WNODE_FLAG_TRACED_GUID;
-  prop->LoggerNameOffset = sizeof(EVENT_TRACE_PROPERTIES);
-  prop->LogFileNameOffset = sizeof(EVENT_TRACE_PROPERTIES) +
-                            sizeof(wchar_t) * kMaxStringLen;
-}
-
-HRESULT EtwTraceProperties::SetLoggerName(const wchar_t* logger_name) {
-  size_t len = wcslen(logger_name) + 1;
-  if (kMaxStringLen < len)
-    return E_INVALIDARG;
-
-  memcpy(buffer_ + get()->LoggerNameOffset,
-         logger_name,
-         sizeof(wchar_t) * len);
-  return S_OK;
-}
-
-HRESULT EtwTraceProperties::SetLoggerFileName(const wchar_t* logger_file_name) {
-  size_t len = wcslen(logger_file_name) + 1;
-  if (kMaxStringLen < len)
-    return E_INVALIDARG;
-
-  memcpy(buffer_ + get()->LogFileNameOffset,
-         logger_file_name,
-         sizeof(wchar_t) * len);
-  return S_OK;
-}
-
-EtwTraceController::EtwTraceController() : session_(NULL) {
-}
-
-EtwTraceController::~EtwTraceController() {
-  if (session_)
-    Stop(NULL);
-}
-
-HRESULT EtwTraceController::Start(const wchar_t* session_name,
-    EtwTraceProperties* prop) {
-  DCHECK(NULL == session_ && session_name_.empty());
-  EtwTraceProperties ignore;
-  if (prop == NULL)
-    prop = &ignore;
-
-  HRESULT hr = Start(session_name, prop, &session_);
-  if (SUCCEEDED(hr))
-    session_name_ = session_name;
-
-  return hr;
-}
-
-HRESULT EtwTraceController::StartFileSession(const wchar_t* session_name,
-    const wchar_t* logfile_path, bool realtime) {
-  DCHECK(NULL == session_ && session_name_.empty());
-
-  EtwTraceProperties prop;
-  prop.SetLoggerFileName(logfile_path);
-  EVENT_TRACE_PROPERTIES& p = *prop.get();
-  p.Wnode.ClientContext = 1;  // QPC timer accuracy.
-  p.LogFileMode = EVENT_TRACE_FILE_MODE_SEQUENTIAL;  // Sequential log.
-  if (realtime)
-    p.LogFileMode |= EVENT_TRACE_REAL_TIME_MODE;
-
-  p.MaximumFileSize = 100;  // 100M file size.
-  p.FlushTimer = 30;  // 30 seconds flush lag.
-  return Start(session_name, &prop);
-}
-
-HRESULT EtwTraceController::StartRealtimeSession(const wchar_t* session_name,
-    size_t buffer_size) {
-  DCHECK(NULL == session_ && session_name_.empty());
-  EtwTraceProperties prop;
-  EVENT_TRACE_PROPERTIES& p = *prop.get();
-  p.LogFileMode = EVENT_TRACE_REAL_TIME_MODE | EVENT_TRACE_USE_PAGED_MEMORY;
-  p.FlushTimer = 1;  // flush every second.
-  p.BufferSize = 16;  // 16 K buffers.
-  p.LogFileNameOffset = 0;
-  return Start(session_name, &prop);
-}
-
-HRESULT EtwTraceController::EnableProvider(REFGUID provider, UCHAR level,
-    ULONG flags) {
-  ULONG error = ::EnableTrace(TRUE, flags, level, &provider, session_);
-  return HRESULT_FROM_WIN32(error);
-}
-
-HRESULT EtwTraceController::DisableProvider(REFGUID provider) {
-  ULONG error = ::EnableTrace(FALSE, 0, 0, &provider, session_);
-  return HRESULT_FROM_WIN32(error);
-}
-
-HRESULT EtwTraceController::Stop(EtwTraceProperties* properties) {
-  EtwTraceProperties ignore;
-  if (properties == NULL)
-    properties = &ignore;
-
-  ULONG error = ::ControlTrace(session_, NULL, properties->get(),
-    EVENT_TRACE_CONTROL_STOP);
-  if (ERROR_SUCCESS != error)
-    return HRESULT_FROM_WIN32(error);
-
-  session_ = NULL;
-  session_name_.clear();
-  return S_OK;
-}
-
-HRESULT EtwTraceController::Flush(EtwTraceProperties* properties) {
-  EtwTraceProperties ignore;
-  if (properties == NULL)
-    properties = &ignore;
-
-  ULONG error = ::ControlTrace(session_, NULL, properties->get(),
-                               EVENT_TRACE_CONTROL_FLUSH);
-  if (ERROR_SUCCESS != error)
-    return HRESULT_FROM_WIN32(error);
-
-  return S_OK;
-}
-
-HRESULT EtwTraceController::Start(const wchar_t* session_name,
-    EtwTraceProperties* properties, TRACEHANDLE* session_handle) {
-  DCHECK(properties != NULL);
-  ULONG err = ::StartTrace(session_handle, session_name, properties->get());
-  return HRESULT_FROM_WIN32(err);
-}
-
-HRESULT EtwTraceController::Query(const wchar_t* session_name,
-    EtwTraceProperties* properties) {
-  ULONG err = ::ControlTrace(NULL, session_name, properties->get(),
-                             EVENT_TRACE_CONTROL_QUERY);
-  return HRESULT_FROM_WIN32(err);
-};
-
-HRESULT EtwTraceController::Update(const wchar_t* session_name,
-    EtwTraceProperties* properties) {
-  DCHECK(properties != NULL);
-  ULONG err = ::ControlTrace(NULL, session_name, properties->get(),
-                             EVENT_TRACE_CONTROL_UPDATE);
-  return HRESULT_FROM_WIN32(err);
-}
-
-HRESULT EtwTraceController::Stop(const wchar_t* session_name,
-    EtwTraceProperties* properties) {
-  DCHECK(properties != NULL);
-  ULONG err = ::ControlTrace(NULL, session_name, properties->get(),
-                             EVENT_TRACE_CONTROL_STOP);
-  return HRESULT_FROM_WIN32(err);
-}
-
-HRESULT EtwTraceController::Flush(const wchar_t* session_name,
-    EtwTraceProperties* properties) {
-  DCHECK(properties != NULL);
-  ULONG err = ::ControlTrace(NULL, session_name, properties->get(),
-                             EVENT_TRACE_CONTROL_FLUSH);
-  return HRESULT_FROM_WIN32(err);
-}
-
-}  // namespace win
-}  // namespace base
diff --git a/base/win/event_trace_controller.h b/base/win/event_trace_controller.h
deleted file mode 100644
index 17b82bc..0000000
--- a/base/win/event_trace_controller.h
+++ /dev/null
@@ -1,151 +0,0 @@
-// Copyright (c) 2011 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.
-//
-// Declaration of a Windows event trace controller class.
-// The controller takes care of creating and manipulating event trace
-// sessions.
-//
-// Event tracing for Windows is a system-provided service that provides
-// logging control and high-performance transport for generic, binary trace
-// events. Event trace providers register with the system by their name,
-// which is a GUID, and can from that point forward receive callbacks that
-// start or end tracing and that change their trace level and enable mask.
-//
-// A trace controller can create an event tracing session, which either
-// sends events to a binary file, or to a realtime consumer, or both.
-//
-// A trace consumer consumes events from zero or one realtime session,
-// as well as potentially from multiple binary trace files.
-#ifndef BASE_WIN_EVENT_TRACE_CONTROLLER_H_
-#define BASE_WIN_EVENT_TRACE_CONTROLLER_H_
-
-#include <windows.h>
-#include <wmistr.h>
-#include <evntrace.h>
-#include <stddef.h>
-#include <string>
-
-#include "base/macros.h"
-
-namespace base {
-namespace win {
-
-// Utility class to make it easier to work with EVENT_TRACE_PROPERTIES.
-// The EVENT_TRACE_PROPERTIES structure contains information about an
-// event tracing session.
-class EtwTraceProperties {
- public:
-  EtwTraceProperties();
-
-  EVENT_TRACE_PROPERTIES* get() {
-    return &properties_;
-  }
-
-  const EVENT_TRACE_PROPERTIES* get() const {
-    return reinterpret_cast<const EVENT_TRACE_PROPERTIES*>(&properties_);
-  }
-
-  const wchar_t* GetLoggerName() const {
-    return reinterpret_cast<const wchar_t *>(buffer_ + get()->LoggerNameOffset);
-  }
-
-  // Copies logger_name to the properties structure.
-  HRESULT SetLoggerName(const wchar_t* logger_name);
-  const wchar_t* GetLoggerFileName() const {
-    return reinterpret_cast<const wchar_t*>(buffer_ + get()->LogFileNameOffset);
-  }
-
-  // Copies logger_file_name to the properties structure.
-  HRESULT SetLoggerFileName(const wchar_t* logger_file_name);
-
-  // Max string len for name and session name is 1024 per documentation.
-  static const size_t kMaxStringLen = 1024;
-  // Properties buffer allocates space for header and for
-  // max length for name and session name.
-  static const size_t kBufSize = sizeof(EVENT_TRACE_PROPERTIES)
-      + 2 * sizeof(wchar_t) * (kMaxStringLen);
-
- private:
-  // The EVENT_TRACE_PROPERTIES structure needs to be overlaid on a
-  // larger buffer to allow storing the logger name and logger file
-  // name contiguously with the structure.
-  union {
-   public:
-    // Our properties header.
-    EVENT_TRACE_PROPERTIES properties_;
-    // The actual size of the buffer is forced by this member.
-    char buffer_[kBufSize];
-  };
-
-  DISALLOW_COPY_AND_ASSIGN(EtwTraceProperties);
-};
-
-// This class implements an ETW controller, which knows how to start and
-// stop event tracing sessions, as well as controlling ETW provider
-// log levels and enable bit masks under the session.
-class EtwTraceController {
- public:
-  EtwTraceController();
-  ~EtwTraceController();
-
-  // Start a session with given name and properties.
-  HRESULT Start(const wchar_t* session_name, EtwTraceProperties* prop);
-
-  // Starts a session tracing to a file with some default properties.
-  HRESULT StartFileSession(const wchar_t* session_name,
-                           const wchar_t* logfile_path,
-                           bool realtime = false);
-
-  // Starts a realtime session with some default properties.
-  HRESULT StartRealtimeSession(const wchar_t* session_name,
-                               size_t buffer_size);
-
-  // Enables "provider" at "level" for this session.
-  // This will cause all providers registered with the GUID
-  // "provider" to start tracing at the new level, systemwide.
-  HRESULT EnableProvider(const GUID& provider, UCHAR level,
-                         ULONG flags = 0xFFFFFFFF);
-  // Disables "provider".
-  HRESULT DisableProvider(const GUID& provider);
-
-  // Stops our session and retrieve the new properties of the session,
-  // properties may be NULL.
-  HRESULT Stop(EtwTraceProperties* properties);
-
-  // Flushes our session and retrieve the current properties,
-  // properties may be NULL.
-  HRESULT Flush(EtwTraceProperties* properties);
-
-  // Static utility functions for controlling
-  // sessions we don't necessarily own.
-  static HRESULT Start(const wchar_t* session_name,
-                       EtwTraceProperties* properties,
-                       TRACEHANDLE* session_handle);
-
-  static HRESULT Query(const wchar_t* session_name,
-                       EtwTraceProperties* properties);
-
-  static HRESULT Update(const wchar_t* session_name,
-                        EtwTraceProperties* properties);
-
-  static HRESULT Stop(const wchar_t* session_name,
-                      EtwTraceProperties* properties);
-  static HRESULT Flush(const wchar_t* session_name,
-                       EtwTraceProperties* properties);
-
-  // Accessors.
-  TRACEHANDLE session() const { return session_; }
-  const wchar_t* session_name() const { return session_name_.c_str(); }
-
- private:
-  std::wstring session_name_;
-  TRACEHANDLE session_;
-
-  DISALLOW_COPY_AND_ASSIGN(EtwTraceController);
-};
-
-}  // namespace win
-}  // namespace base
-
-#endif  // BASE_WIN_EVENT_TRACE_CONTROLLER_H_
diff --git a/base/win/event_trace_provider.cc b/base/win/event_trace_provider.cc
deleted file mode 100644
index 8fcf67d..0000000
--- a/base/win/event_trace_provider.cc
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright (c) 2012 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.
-//
-#include "base/win/event_trace_provider.h"
-#include <windows.h>
-#include <cguid.h>
-
-namespace base {
-namespace win {
-
-TRACE_GUID_REGISTRATION EtwTraceProvider::obligatory_guid_registration_ = {
-  &GUID_NULL,
-  NULL
-};
-
-EtwTraceProvider::EtwTraceProvider(const GUID& provider_name)
-    : provider_name_(provider_name), registration_handle_(NULL),
-      session_handle_(NULL), enable_flags_(0), enable_level_(0) {
-}
-
-EtwTraceProvider::EtwTraceProvider()
-    : provider_name_(GUID_NULL), registration_handle_(NULL),
-      session_handle_(NULL), enable_flags_(0), enable_level_(0) {
-}
-
-EtwTraceProvider::~EtwTraceProvider() {
-  Unregister();
-}
-
-ULONG EtwTraceProvider::EnableEvents(void* buffer) {
-  session_handle_ = ::GetTraceLoggerHandle(buffer);
-  if (NULL == session_handle_) {
-    return ::GetLastError();
-  }
-
-  enable_flags_ = ::GetTraceEnableFlags(session_handle_);
-  enable_level_ = ::GetTraceEnableLevel(session_handle_);
-
-  // Give subclasses a chance to digest the state change.
-  OnEventsEnabled();
-
-  return ERROR_SUCCESS;
-}
-
-ULONG EtwTraceProvider::DisableEvents() {
-  // Give subclasses a chance to digest the state change.
-  OnEventsDisabled();
-
-  enable_level_ = 0;
-  enable_flags_ = 0;
-  session_handle_ = NULL;
-
-  PostEventsDisabled();
-
-  return ERROR_SUCCESS;
-}
-
-ULONG EtwTraceProvider::Callback(WMIDPREQUESTCODE request, void* buffer) {
-  switch (request) {
-    case WMI_ENABLE_EVENTS:
-      return EnableEvents(buffer);
-    case WMI_DISABLE_EVENTS:
-      return DisableEvents();
-    default:
-      return ERROR_INVALID_PARAMETER;
-  }
-  // Not reached.
-}
-
-ULONG WINAPI EtwTraceProvider::ControlCallback(WMIDPREQUESTCODE request,
-    void* context, ULONG *reserved, void* buffer) {
-  EtwTraceProvider *provider = reinterpret_cast<EtwTraceProvider*>(context);
-
-  return provider->Callback(request, buffer);
-}
-
-ULONG EtwTraceProvider::Register() {
-  if (provider_name_ == GUID_NULL)
-    return ERROR_INVALID_NAME;
-
-  return ::RegisterTraceGuids(ControlCallback, this, &provider_name_,
-      1, &obligatory_guid_registration_, NULL, NULL, &registration_handle_);
-}
-
-ULONG EtwTraceProvider::Unregister() {
-  // If a session is active, notify subclasses that it's going away.
-  if (session_handle_ != NULL)
-    DisableEvents();
-
-  ULONG ret = ::UnregisterTraceGuids(registration_handle_);
-
-  registration_handle_ = NULL;
-
-  return ret;
-}
-
-ULONG EtwTraceProvider::Log(const EtwEventClass& event_class,
-    EtwEventType type, EtwEventLevel level, const char *message) {
-  if (NULL == session_handle_ || enable_level_ < level)
-    return ERROR_SUCCESS;  // No one listening.
-
-  EtwMofEvent<1> event(event_class, type, level);
-
-  event.fields[0].DataPtr = reinterpret_cast<ULONG64>(message);
-  event.fields[0].Length = message ?
-      static_cast<ULONG>(sizeof(message[0]) * (1 + strlen(message))) : 0;
-
-  return ::TraceEvent(session_handle_, &event.header);
-}
-
-ULONG EtwTraceProvider::Log(const EtwEventClass& event_class,
-    EtwEventType type, EtwEventLevel level, const wchar_t *message) {
-  if (NULL == session_handle_ || enable_level_ < level)
-    return ERROR_SUCCESS;  // No one listening.
-
-  EtwMofEvent<1> event(event_class, type, level);
-
-  event.fields[0].DataPtr = reinterpret_cast<ULONG64>(message);
-  event.fields[0].Length = message ?
-      static_cast<ULONG>(sizeof(message[0]) * (1 + wcslen(message))) : 0;
-
-  return ::TraceEvent(session_handle_, &event.header);
-}
-
-ULONG EtwTraceProvider::Log(EVENT_TRACE_HEADER* event) {
-  if (enable_level_ < event->Class.Level)
-    return ERROR_SUCCESS;
-
-  return ::TraceEvent(session_handle_, event);
-}
-
-}  // namespace win
-}  // namespace base
diff --git a/base/win/event_trace_provider.h b/base/win/event_trace_provider.h
deleted file mode 100644
index 321f539..0000000
--- a/base/win/event_trace_provider.h
+++ /dev/null
@@ -1,183 +0,0 @@
-// Copyright (c) 2011 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.
-//
-// Declaration of a Windows event trace provider class, to allow using
-// Windows Event Tracing for logging transport and control.
-#ifndef BASE_WIN_EVENT_TRACE_PROVIDER_H_
-#define BASE_WIN_EVENT_TRACE_PROVIDER_H_
-
-#include <windows.h>
-#include <wmistr.h>
-#include <evntrace.h>
-#include <stddef.h>
-#include <stdint.h>
-
-#include <limits>
-
-#include "base/macros.h"
-
-namespace base {
-namespace win {
-
-typedef GUID EtwEventClass;
-typedef UCHAR EtwEventType;
-typedef UCHAR EtwEventLevel;
-typedef USHORT EtwEventVersion;
-typedef ULONG EtwEventFlags;
-
-// Base class is a POD for correctness.
-template <size_t N> struct EtwMofEventBase {
-  EVENT_TRACE_HEADER header;
-  MOF_FIELD fields[N];
-};
-
-// Utility class to auto-initialize event trace header structures.
-template <size_t N> class EtwMofEvent: public EtwMofEventBase<N> {
- public:
-  typedef EtwMofEventBase<N> Super;
-
-  // Clang and the C++ standard don't allow unqualified lookup into dependent
-  // bases, hence these using decls to explicitly pull the names out.
-  using EtwMofEventBase<N>::header;
-  using EtwMofEventBase<N>::fields;
-
-  EtwMofEvent() {
-    memset(static_cast<Super*>(this), 0, sizeof(Super));
-  }
-
-  EtwMofEvent(const EtwEventClass& event_class, EtwEventType type,
-              EtwEventLevel level) {
-    memset(static_cast<Super*>(this), 0, sizeof(Super));
-    header.Size = sizeof(Super);
-    header.Guid = event_class;
-    header.Class.Type = type;
-    header.Class.Level = level;
-    header.Flags = WNODE_FLAG_TRACED_GUID | WNODE_FLAG_USE_MOF_PTR;
-  }
-
-  EtwMofEvent(const EtwEventClass& event_class, EtwEventType type,
-              EtwEventVersion version, EtwEventLevel level) {
-    memset(static_cast<Super*>(this), 0, sizeof(Super));
-    header.Size = sizeof(Super);
-    header.Guid = event_class;
-    header.Class.Type = type;
-    header.Class.Version = version;
-    header.Class.Level = level;
-    header.Flags = WNODE_FLAG_TRACED_GUID | WNODE_FLAG_USE_MOF_PTR;
-  }
-
-  void SetField(size_t field, size_t size, const void* data) {
-    // DCHECK(field < N);
-    if ((field < N) && (size <= std::numeric_limits<uint32_t>::max())) {
-      fields[field].DataPtr = reinterpret_cast<ULONG64>(data);
-      fields[field].Length = static_cast<ULONG>(size);
-    }
-  }
-
-  EVENT_TRACE_HEADER* get() { return& header; }
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(EtwMofEvent);
-};
-
-// Trace provider with Event Tracing for Windows. The trace provider
-// registers with ETW by its name which is a GUID. ETW calls back to
-// the object whenever the trace level or enable flags for this provider
-// name changes.
-// Users of this class can test whether logging is currently enabled at
-// a particular trace level, and whether particular enable flags are set,
-// before other resources are consumed to generate and issue the log
-// messages themselves.
-class EtwTraceProvider {
- public:
-  // Creates an event trace provider identified by provider_name, which
-  // will be the name registered with Event Tracing for Windows (ETW).
-  explicit EtwTraceProvider(const GUID& provider_name);
-
-  // Creates an unnamed event trace provider, the provider must be given
-  // a name before registration.
-  EtwTraceProvider();
-  virtual ~EtwTraceProvider();
-
-  // Registers the trace provider with Event Tracing for Windows.
-  // Note: from this point forward ETW may call the provider's control
-  //    callback. If the provider's name is enabled in some trace session
-  //    already, the callback may occur recursively from this call, so
-  //    call this only when you're ready to handle callbacks.
-  ULONG Register();
-  // Unregisters the trace provider with ETW.
-  ULONG Unregister();
-
-  // Accessors.
-  void set_provider_name(const GUID& provider_name) {
-    provider_name_ = provider_name;
-  }
-  const GUID& provider_name() const { return provider_name_; }
-  TRACEHANDLE registration_handle() const { return registration_handle_; }
-  TRACEHANDLE session_handle() const { return session_handle_; }
-  EtwEventFlags enable_flags() const { return enable_flags_; }
-  EtwEventLevel enable_level() const { return enable_level_; }
-
-  // Returns true iff logging should be performed for "level" and "flags".
-  // Note: flags is treated as a bitmask, and should normally have a single
-  //      bit set, to test whether to log for a particular sub "facility".
-  bool ShouldLog(EtwEventLevel level, EtwEventFlags flags) {
-    return NULL != session_handle_ && level >= enable_level_ &&
-        (0 != (flags & enable_flags_));
-  }
-
-  // Simple wrappers to log Unicode and ANSI strings.
-  // Do nothing if !ShouldLog(level, 0xFFFFFFFF).
-  ULONG Log(const EtwEventClass& event_class, EtwEventType type,
-            EtwEventLevel level, const char *message);
-  ULONG Log(const EtwEventClass& event_class, EtwEventType type,
-            EtwEventLevel level, const wchar_t *message);
-
-  // Log the provided event.
-  ULONG Log(EVENT_TRACE_HEADER* event);
-
- protected:
-  // Called after events have been enabled, override in subclasses
-  // to set up state or log at the start of a session.
-  // Note: This function may be called ETW's thread and may be racy,
-  //    bring your own locking if needed.
-  virtual void OnEventsEnabled() {}
-
-  // Called just before events are disabled, override in subclasses
-  // to tear down state or log at the end of a session.
-  // Note: This function may be called ETW's thread and may be racy,
-  //    bring your own locking if needed.
-  virtual void OnEventsDisabled() {}
-
-  // Called just after events have been disabled, override in subclasses
-  // to tear down state at the end of a session. At this point it's
-  // to late to log anything to the session.
-  // Note: This function may be called ETW's thread and may be racy,
-  //    bring your own locking if needed.
-  virtual void PostEventsDisabled() {}
-
- private:
-  ULONG EnableEvents(PVOID buffer);
-  ULONG DisableEvents();
-  ULONG Callback(WMIDPREQUESTCODE request, PVOID buffer);
-  static ULONG WINAPI ControlCallback(WMIDPREQUESTCODE request, PVOID context,
-                                      ULONG *reserved, PVOID buffer);
-
-  GUID provider_name_;
-  TRACEHANDLE registration_handle_;
-  TRACEHANDLE session_handle_;
-  EtwEventFlags enable_flags_;
-  EtwEventLevel enable_level_;
-
-  // We don't use this, but on XP we're obliged to pass one in to
-  // RegisterTraceGuids. Non-const, because that's how the API needs it.
-  static TRACE_GUID_REGISTRATION obligatory_guid_registration_;
-
-  DISALLOW_COPY_AND_ASSIGN(EtwTraceProvider);
-};
-
-}  // namespace win
-}  // namespace base
-
-#endif  // BASE_WIN_EVENT_TRACE_PROVIDER_H_
diff --git a/base/win/iat_patch_function.cc b/base/win/iat_patch_function.cc
index 3cc747b..5f151f9 100644
--- a/base/win/iat_patch_function.cc
+++ b/base/win/iat_patch_function.cc
@@ -42,11 +42,15 @@
   return iat_function.pointer;
 }
 
-bool InterceptEnumCallback(const base::win::PEImage& image, const char* module,
-                           DWORD ordinal, const char* name, DWORD hint,
-                           IMAGE_THUNK_DATA* iat, void* cookie) {
+bool InterceptEnumCallback(const base::win::PEImage& image,
+                           const char* module,
+                           DWORD ordinal,
+                           const char* name,
+                           DWORD hint,
+                           IMAGE_THUNK_DATA* iat,
+                           void* cookie) {
   InterceptFunctionInformation* intercept_information =
-    reinterpret_cast<InterceptFunctionInformation*>(cookie);
+      reinterpret_cast<InterceptFunctionInformation*>(cookie);
 
   if (NULL == intercept_information) {
     NOTREACHED();
@@ -56,8 +60,8 @@
   DCHECK(module);
 
   if ((0 == lstrcmpiA(module, intercept_information->imported_from_module)) &&
-     (NULL != name) &&
-     (0 == lstrcmpiA(name, intercept_information->function_name))) {
+      (NULL != name) &&
+      (0 == lstrcmpiA(name, intercept_information->function_name))) {
     // Save the old pointer.
     if (NULL != intercept_information->old_function) {
       *(intercept_information->old_function) = GetIATFunction(iat);
@@ -101,11 +105,12 @@
 //          as defined in winerror.h
 DWORD InterceptImportedFunction(HMODULE module_handle,
                                 const char* imported_from_module,
-                                const char* function_name, void* new_function,
+                                const char* function_name,
+                                void* new_function,
                                 void** old_function,
                                 IMAGE_THUNK_DATA** iat_thunk) {
   if ((NULL == module_handle) || (NULL == imported_from_module) ||
-     (NULL == function_name) || (NULL == new_function)) {
+      (NULL == function_name) || (NULL == new_function)) {
     NOTREACHED();
     return ERROR_INVALID_PARAMETER;
   }
@@ -116,14 +121,13 @@
     return ERROR_INVALID_PARAMETER;
   }
 
-  InterceptFunctionInformation intercept_information = {
-    false,
-    imported_from_module,
-    function_name,
-    new_function,
-    old_function,
-    iat_thunk,
-    ERROR_GEN_FAILURE};
+  InterceptFunctionInformation intercept_information = {false,
+                                                        imported_from_module,
+                                                        function_name,
+                                                        new_function,
+                                                        old_function,
+                                                        iat_thunk,
+                                                        ERROR_GEN_FAILURE};
 
   // First go through the IAT. If we don't find the import we are looking
   // for in IAT, search delay import table.
@@ -170,8 +174,7 @@
     : module_handle_(NULL),
       intercept_function_(NULL),
       original_function_(NULL),
-      iat_thunk_(NULL) {
-}
+      iat_thunk_(NULL) {}
 
 IATPatchFunction::~IATPatchFunction() {
   if (NULL != intercept_function_) {
@@ -210,12 +213,9 @@
   DCHECK_EQ(static_cast<void*>(NULL), intercept_function_);
   DCHECK(module);
 
-  DWORD error = InterceptImportedFunction(module,
-                                          imported_from_module,
-                                          function_name,
-                                          new_function,
-                                          &original_function_,
-                                          &iat_thunk_);
+  DWORD error =
+      InterceptImportedFunction(module, imported_from_module, function_name,
+                                new_function, &original_function_, &iat_thunk_);
 
   if (NO_ERROR == error) {
     DCHECK_NE(original_function_, intercept_function_);
@@ -226,8 +226,7 @@
 }
 
 DWORD IATPatchFunction::Unpatch() {
-  DWORD error = RestoreImportedFunction(intercept_function_,
-                                        original_function_,
+  DWORD error = RestoreImportedFunction(intercept_function_, original_function_,
                                         iat_thunk_);
   DCHECK_EQ(static_cast<DWORD>(NO_ERROR), error);
 
diff --git a/base/win/iat_patch_function.h b/base/win/iat_patch_function.h
index 30f0ab9..c9f2d6c 100644
--- a/base/win/iat_patch_function.h
+++ b/base/win/iat_patch_function.h
@@ -58,13 +58,10 @@
   // Returns: Windows error code (winerror.h). NO_ERROR if successful
   DWORD Unpatch();
 
-  bool is_patched() const {
-    return (NULL != intercept_function_);
-  }
+  bool is_patched() const { return (NULL != intercept_function_); }
 
   void* original_function() const;
 
-
  private:
   HMODULE module_handle_;
   void* intercept_function_;
diff --git a/base/win/iunknown_impl.cc b/base/win/iunknown_impl.cc
index 2a88439..2d83523 100644
--- a/base/win/iunknown_impl.cc
+++ b/base/win/iunknown_impl.cc
@@ -7,12 +7,9 @@
 namespace base {
 namespace win {
 
-IUnknownImpl::IUnknownImpl()
-    : ref_count_(0) {
-}
+IUnknownImpl::IUnknownImpl() : ref_count_(0) {}
 
-IUnknownImpl::~IUnknownImpl() {
-}
+IUnknownImpl::~IUnknownImpl() {}
 
 ULONG STDMETHODCALLTYPE IUnknownImpl::AddRef() {
   ref_count_.Increment();
diff --git a/base/win/patch_util.cc b/base/win/patch_util.cc
index eb3bd65..c53a8e4 100644
--- a/base/win/patch_util.cc
+++ b/base/win/patch_util.cc
@@ -49,4 +49,4 @@
 
 }  // namespace internal
 }  // namespace win
-}  // namespace bsae
+}  // namespace base
diff --git a/base/win/patch_util.h b/base/win/patch_util.h
index 02ac72c..6668273 100644
--- a/base/win/patch_util.h
+++ b/base/win/patch_util.h
@@ -7,7 +7,6 @@
 
 #include <windows.h>
 
-
 namespace base {
 namespace win {
 namespace internal {
@@ -19,6 +18,6 @@
 
 }  // namespace internal
 }  // namespace win
-}  // namespace bsae
+}  // namespace base
 
 #endif  // BASE_WIN_PATCH_UTIL_H_
diff --git a/base/win/pe_image.cc b/base/win/pe_image.cc
index 4705348..ea58504 100644
--- a/base/win/pe_image.cc
+++ b/base/win/pe_image.cc
@@ -48,9 +48,11 @@
 }  // namespace
 
 // Callback used to enumerate imports. See EnumImportChunksFunction.
-bool ProcessImportChunk(const PEImage &image, LPCSTR module,
+bool ProcessImportChunk(const PEImage& image,
+                        LPCSTR module,
                         PIMAGE_THUNK_DATA name_table,
-                        PIMAGE_THUNK_DATA iat, PVOID cookie) {
+                        PIMAGE_THUNK_DATA iat,
+                        PVOID cookie) {
   EnumAllImportsStorage& storage =
       *reinterpret_cast<EnumAllImportsStorage*>(cookie);
 
@@ -120,8 +122,8 @@
 
   for (UINT i = 0; NULL != (section = GetSectionHeader(i)); i++) {
     // Don't use the virtual RVAToAddr.
-    PBYTE start = reinterpret_cast<PBYTE>(
-                      PEImage::RVAToAddr(section->VirtualAddress));
+    PBYTE start =
+        reinterpret_cast<PBYTE>(PEImage::RVAToAddr(section->VirtualAddress));
 
     DWORD size = section->Misc.VirtualSize;
 
@@ -157,10 +159,9 @@
       GetImageDirectoryEntrySize(IMAGE_DIRECTORY_ENTRY_DEBUG);
   PIMAGE_DEBUG_DIRECTORY debug_directory =
       reinterpret_cast<PIMAGE_DEBUG_DIRECTORY>(
-      GetImageDirectoryEntryAddr(IMAGE_DIRECTORY_ENTRY_DEBUG));
+          GetImageDirectoryEntryAddr(IMAGE_DIRECTORY_ENTRY_DEBUG));
 
-  size_t directory_count =
-      debug_directory_size / sizeof(IMAGE_DEBUG_DIRECTORY);
+  size_t directory_count = debug_directory_size / sizeof(IMAGE_DEBUG_DIRECTORY);
 
   for (size_t index = 0; index < directory_count; ++index) {
     if (debug_directory[index].Type == IMAGE_DEBUG_TYPE_CODEVIEW) {
@@ -193,8 +194,8 @@
   if (!GetProcOrdinal(name, &ordinal))
     return NULL;
 
-  PDWORD functions = reinterpret_cast<PDWORD>(
-                         RVAToAddr(exports->AddressOfFunctions));
+  PDWORD functions =
+      reinterpret_cast<PDWORD>(RVAToAddr(exports->AddressOfFunctions));
 
   return functions + ordinal - exports->Base;
 }
@@ -217,7 +218,7 @@
   return reinterpret_cast<FARPROC>(function);
 }
 
-bool PEImage::GetProcOrdinal(LPCSTR function_name, WORD *ordinal) const {
+bool PEImage::GetProcOrdinal(LPCSTR function_name, WORD* ordinal) const {
   if (NULL == ordinal)
     return false;
 
@@ -257,9 +258,8 @@
     if (cmp != 0)
       return false;
 
-
-    PWORD ordinals = reinterpret_cast<PWORD>(
-                         RVAToAddr(exports->AddressOfNameOrdinals));
+    PWORD ordinals =
+        reinterpret_cast<PWORD>(RVAToAddr(exports->AddressOfNameOrdinals));
 
     *ordinal = ordinals[lower - names] + static_cast<WORD>(exports->Base);
   }
@@ -291,16 +291,16 @@
   if (NULL == directory || 0 == size)
     return true;
 
-  PIMAGE_EXPORT_DIRECTORY exports = reinterpret_cast<PIMAGE_EXPORT_DIRECTORY>(
-                                        directory);
+  PIMAGE_EXPORT_DIRECTORY exports =
+      reinterpret_cast<PIMAGE_EXPORT_DIRECTORY>(directory);
   UINT ordinal_base = exports->Base;
   UINT num_funcs = exports->NumberOfFunctions;
   UINT num_names = exports->NumberOfNames;
-  PDWORD functions  = reinterpret_cast<PDWORD>(RVAToAddr(
-                          exports->AddressOfFunctions));
+  PDWORD functions =
+      reinterpret_cast<PDWORD>(RVAToAddr(exports->AddressOfFunctions));
   PDWORD names = reinterpret_cast<PDWORD>(RVAToAddr(exports->AddressOfNames));
-  PWORD ordinals = reinterpret_cast<PWORD>(RVAToAddr(
-                       exports->AddressOfNameOrdinals));
+  PWORD ordinals =
+      reinterpret_cast<PWORD>(RVAToAddr(exports->AddressOfNameOrdinals));
 
   for (UINT count = 0; count < num_funcs; count++) {
     PVOID func = RVAToAddr(functions[count]);
@@ -323,8 +323,8 @@
     // Check for forwarded exports.
     LPCSTR forward = NULL;
     if (reinterpret_cast<char*>(func) >= reinterpret_cast<char*>(directory) &&
-        reinterpret_cast<char*>(func) <= reinterpret_cast<char*>(directory) +
-            size) {
+        reinterpret_cast<char*>(func) <=
+            reinterpret_cast<char*>(directory) + size) {
       forward = reinterpret_cast<LPCSTR>(func);
       func = 0;
     }
@@ -340,8 +340,8 @@
 bool PEImage::EnumRelocs(EnumRelocsFunction callback, PVOID cookie) const {
   PVOID directory = GetImageDirectoryEntryAddr(IMAGE_DIRECTORY_ENTRY_BASERELOC);
   DWORD size = GetImageDirectoryEntrySize(IMAGE_DIRECTORY_ENTRY_BASERELOC);
-  PIMAGE_BASE_RELOCATION base = reinterpret_cast<PIMAGE_BASE_RELOCATION>(
-      directory);
+  PIMAGE_BASE_RELOCATION base =
+      reinterpret_cast<PIMAGE_BASE_RELOCATION>(directory);
 
   if (!directory)
     return true;
@@ -349,8 +349,8 @@
   while (size >= sizeof(IMAGE_BASE_RELOCATION) && base->SizeOfBlock &&
          size >= base->SizeOfBlock) {
     PWORD reloc = reinterpret_cast<PWORD>(base + 1);
-    UINT num_relocs = (base->SizeOfBlock - sizeof(IMAGE_BASE_RELOCATION)) /
-        sizeof(WORD);
+    UINT num_relocs =
+        (base->SizeOfBlock - sizeof(IMAGE_BASE_RELOCATION)) / sizeof(WORD);
 
     for (UINT i = 0; i < num_relocs; i++, reloc++) {
       WORD type = *reloc >> 12;
@@ -362,7 +362,7 @@
 
     size -= base->SizeOfBlock;
     base = reinterpret_cast<PIMAGE_BASE_RELOCATION>(
-               reinterpret_cast<char*>(base) + base->SizeOfBlock);
+        reinterpret_cast<char*>(base) + base->SizeOfBlock);
   }
 
   return true;
@@ -379,9 +379,9 @@
   for (; import->FirstThunk; import++) {
     LPCSTR module_name = reinterpret_cast<LPCSTR>(RVAToAddr(import->Name));
     PIMAGE_THUNK_DATA name_table = reinterpret_cast<PIMAGE_THUNK_DATA>(
-                                       RVAToAddr(import->OriginalFirstThunk));
-    PIMAGE_THUNK_DATA iat = reinterpret_cast<PIMAGE_THUNK_DATA>(
-                                RVAToAddr(import->FirstThunk));
+        RVAToAddr(import->OriginalFirstThunk));
+    PIMAGE_THUNK_DATA iat =
+        reinterpret_cast<PIMAGE_THUNK_DATA>(RVAToAddr(import->FirstThunk));
 
     if (!callback(*this, module_name, name_table, iat, cookie))
       return false;
@@ -393,7 +393,8 @@
 bool PEImage::EnumOneImportChunk(EnumImportsFunction callback,
                                  LPCSTR module_name,
                                  PIMAGE_THUNK_DATA name_table,
-                                 PIMAGE_THUNK_DATA iat, PVOID cookie) const {
+                                 PIMAGE_THUNK_DATA iat,
+                                 PVOID cookie) const {
   if (NULL == name_table)
     return false;
 
@@ -420,14 +421,14 @@
 }
 
 bool PEImage::EnumAllImports(EnumImportsFunction callback, PVOID cookie) const {
-  EnumAllImportsStorage temp = { callback, cookie };
+  EnumAllImportsStorage temp = {callback, cookie};
   return EnumImportChunks(ProcessImportChunk, &temp);
 }
 
 bool PEImage::EnumDelayImportChunks(EnumDelayImportChunksFunction callback,
                                     PVOID cookie) const {
-  PVOID directory = GetImageDirectoryEntryAddr(
-                        IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT);
+  PVOID directory =
+      GetImageDirectoryEntryAddr(IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT);
   DWORD size = GetImageDirectoryEntrySize(IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT);
   PImgDelayDescr delay_descriptor = reinterpret_cast<PImgDelayDescr>(directory);
 
@@ -488,10 +489,10 @@
 
       if (rvas) {
         import = reinterpret_cast<PIMAGE_IMPORT_BY_NAME>(
-                     RVAToAddr(name_table->u1.ForwarderString));
+            RVAToAddr(name_table->u1.ForwarderString));
       } else {
         import = reinterpret_cast<PIMAGE_IMPORT_BY_NAME>(
-                     name_table->u1.ForwarderString);
+            name_table->u1.ForwarderString);
       }
 
       hint = import->Hint;
@@ -507,7 +508,7 @@
 
 bool PEImage::EnumAllDelayImports(EnumImportsFunction callback,
                                   PVOID cookie) const {
-  EnumAllImportsStorage temp = { callback, cookie };
+  EnumAllImportsStorage temp = {callback, cookie};
   return EnumDelayImportChunks(ProcessDelayImportChunk, &temp);
 }
 
diff --git a/base/win/pe_image.h b/base/win/pe_image.h
index 3f8f868..7766b49 100644
--- a/base/win/pe_image.h
+++ b/base/win/pe_image.h
@@ -30,9 +30,10 @@
   // Callback to enumerate sections.
   // cookie is the value passed to the enumerate method.
   // Returns true to continue the enumeration.
-  typedef bool (*EnumSectionsFunction)(const PEImage &image,
+  typedef bool (*EnumSectionsFunction)(const PEImage& image,
                                        PIMAGE_SECTION_HEADER header,
-                                       PVOID section_start, DWORD section_size,
+                                       PVOID section_start,
+                                       DWORD section_size,
                                        PVOID cookie);
 
   // Callback to enumerate exports.
@@ -40,31 +41,41 @@
   // contains the dll and symbol to forward this export to. cookie is the value
   // passed to the enumerate method.
   // Returns true to continue the enumeration.
-  typedef bool (*EnumExportsFunction)(const PEImage &image, DWORD ordinal,
-                                      DWORD hint, LPCSTR name, PVOID function,
-                                      LPCSTR forward, PVOID cookie);
+  typedef bool (*EnumExportsFunction)(const PEImage& image,
+                                      DWORD ordinal,
+                                      DWORD hint,
+                                      LPCSTR name,
+                                      PVOID function,
+                                      LPCSTR forward,
+                                      PVOID cookie);
 
   // Callback to enumerate import blocks.
   // name_table and iat point to the imports name table and address table for
   // this block. cookie is the value passed to the enumerate method.
   // Returns true to continue the enumeration.
-  typedef bool (*EnumImportChunksFunction)(const PEImage &image, LPCSTR module,
+  typedef bool (*EnumImportChunksFunction)(const PEImage& image,
+                                           LPCSTR module,
                                            PIMAGE_THUNK_DATA name_table,
-                                           PIMAGE_THUNK_DATA iat, PVOID cookie);
+                                           PIMAGE_THUNK_DATA iat,
+                                           PVOID cookie);
 
   // Callback to enumerate imports.
   // module is the dll that exports this symbol. cookie is the value passed to
   // the enumerate method.
   // Returns true to continue the enumeration.
-  typedef bool (*EnumImportsFunction)(const PEImage &image, LPCSTR module,
-                                      DWORD ordinal, LPCSTR name, DWORD hint,
-                                      PIMAGE_THUNK_DATA iat, PVOID cookie);
+  typedef bool (*EnumImportsFunction)(const PEImage& image,
+                                      LPCSTR module,
+                                      DWORD ordinal,
+                                      LPCSTR name,
+                                      DWORD hint,
+                                      PIMAGE_THUNK_DATA iat,
+                                      PVOID cookie);
 
   // Callback to enumerate delayed import blocks.
   // module is the dll that exports this block of symbols. cookie is the value
   // passed to the enumerate method.
   // Returns true to continue the enumeration.
-  typedef bool (*EnumDelayImportChunksFunction)(const PEImage &image,
+  typedef bool (*EnumDelayImportChunksFunction)(const PEImage& image,
                                                 PImgDelayDescr delay_descriptor,
                                                 LPCSTR module,
                                                 PIMAGE_THUNK_DATA name_table,
@@ -74,8 +85,10 @@
   // Callback to enumerate relocations.
   // cookie is the value passed to the enumerate method.
   // Returns true to continue the enumeration.
-  typedef bool (*EnumRelocsFunction)(const PEImage &image, WORD type,
-                                     PVOID address, PVOID cookie);
+  typedef bool (*EnumRelocsFunction)(const PEImage& image,
+                                     WORD type,
+                                     PVOID address,
+                                     PVOID cookie);
 
   explicit PEImage(HMODULE module) : module_(module) {}
   explicit PEImage(const void* module) {
@@ -155,7 +168,7 @@
 
   // Retrieves the ordinal for a given exported symbol.
   // Returns true if the symbol was found.
-  bool GetProcOrdinal(LPCSTR function_name, WORD *ordinal) const;
+  bool GetProcOrdinal(LPCSTR function_name, WORD* ordinal) const;
 
   // Enumerates PE sections.
   // cookie is a generic cookie to pass to the callback.
@@ -180,11 +193,12 @@
   // Enumerates the imports from a single PE import block.
   // cookie is a generic cookie to pass to the callback.
   // Returns true on success.
-  bool EnumOneImportChunk(EnumImportsFunction callback, LPCSTR module_name,
-                          PIMAGE_THUNK_DATA name_table, PIMAGE_THUNK_DATA iat,
+  bool EnumOneImportChunk(EnumImportsFunction callback,
+                          LPCSTR module_name,
+                          PIMAGE_THUNK_DATA name_table,
+                          PIMAGE_THUNK_DATA iat,
                           PVOID cookie) const;
 
-
   // Enumerates PE delay imports.
   // cookie is a generic cookie to pass to the callback.
   // Returns true on success.
@@ -220,11 +234,11 @@
 
   // Converts an rva value to an offset on disk.
   // Returns true on success.
-  bool ImageRVAToOnDiskOffset(DWORD rva, DWORD *on_disk_offset) const;
+  bool ImageRVAToOnDiskOffset(DWORD rva, DWORD* on_disk_offset) const;
 
   // Converts an address to an offset on disk.
   // Returns true on success.
-  bool ImageAddrToOnDiskOffset(LPVOID address, DWORD *on_disk_offset) const;
+  bool ImageAddrToOnDiskOffset(LPVOID address, DWORD* on_disk_offset) const;
 
  private:
   HMODULE module_;
@@ -253,12 +267,12 @@
 
 inline PIMAGE_IMPORT_DESCRIPTOR PEImage::GetFirstImportChunk() const {
   return reinterpret_cast<PIMAGE_IMPORT_DESCRIPTOR>(
-             GetImageDirectoryEntryAddr(IMAGE_DIRECTORY_ENTRY_IMPORT));
+      GetImageDirectoryEntryAddr(IMAGE_DIRECTORY_ENTRY_IMPORT));
 }
 
 inline PIMAGE_EXPORT_DIRECTORY PEImage::GetExportDirectory() const {
   return reinterpret_cast<PIMAGE_EXPORT_DIRECTORY>(
-             GetImageDirectoryEntryAddr(IMAGE_DIRECTORY_ENTRY_EXPORT));
+      GetImageDirectoryEntryAddr(IMAGE_DIRECTORY_ENTRY_EXPORT));
 }
 
 }  // namespace win
diff --git a/base/win/process_startup_helper.cc b/base/win/process_startup_helper.cc
index de44b2a..347db71 100644
--- a/base/win/process_startup_helper.cc
+++ b/base/win/process_startup_helper.cc
@@ -13,8 +13,10 @@
 #pragma optimize("", off)
 // Handlers for invalid parameter and pure call. They generate a breakpoint to
 // tell breakpad that it needs to dump the process.
-void InvalidParameter(const wchar_t* expression, const wchar_t* function,
-                      const wchar_t* file, unsigned int line,
+void InvalidParameter(const wchar_t* expression,
+                      const wchar_t* function,
+                      const wchar_t* file,
+                      unsigned int line,
                       uintptr_t reserved) {
   __debugbreak();
   _exit(1);
diff --git a/base/win/process_startup_helper.h b/base/win/process_startup_helper.h
index 2f19ac9..c579433 100644
--- a/base/win/process_startup_helper.h
+++ b/base/win/process_startup_helper.h
@@ -5,7 +5,6 @@
 #ifndef BASE_WIN_PROCESS_STARTUP_HELPER_H_
 #define BASE_WIN_PROCESS_STARTUP_HELPER_H_
 
-
 namespace base {
 
 class CommandLine;
diff --git a/base/win/registry.cc b/base/win/registry.cc
index 3de51e3..1ca839d 100644
--- a/base/win/registry.cc
+++ b/base/win/registry.cc
@@ -37,15 +37,12 @@
 
 // RegKey ----------------------------------------------------------------------
 
-RegKey::RegKey() : key_(NULL), wow64access_(0) {
-}
+RegKey::RegKey() : key_(NULL), wow64access_(0) {}
 
-RegKey::RegKey(HKEY key) : key_(key), wow64access_(0) {
-}
+RegKey::RegKey(HKEY key) : key_(key), wow64access_(0) {}
 
 RegKey::RegKey(HKEY rootkey, const wchar_t* subkey, REGSAM access)
-    : key_(NULL),
-      wow64access_(0) {
+    : key_(NULL), wow64access_(0) {
   if (rootkey) {
     if (access & (KEY_SET_VALUE | KEY_CREATE_SUB_KEY | KEY_CREATE_LINK))
       Create(rootkey, subkey, access);
@@ -66,13 +63,15 @@
   return CreateWithDisposition(rootkey, subkey, &disposition_value, access);
 }
 
-LONG RegKey::CreateWithDisposition(HKEY rootkey, const wchar_t* subkey,
-                                   DWORD* disposition, REGSAM access) {
+LONG RegKey::CreateWithDisposition(HKEY rootkey,
+                                   const wchar_t* subkey,
+                                   DWORD* disposition,
+                                   REGSAM access) {
   DCHECK(rootkey && subkey && access && disposition);
   HKEY subhkey = NULL;
-  LONG result = RegCreateKeyEx(rootkey, subkey, 0, NULL,
-                               REG_OPTION_NON_VOLATILE, access, NULL, &subhkey,
-                               disposition);
+  LONG result =
+      RegCreateKeyEx(rootkey, subkey, 0, NULL, REG_OPTION_NON_VOLATILE, access,
+                     NULL, &subhkey, disposition);
   if (result == ERROR_SUCCESS) {
     Close();
     key_ = subhkey;
@@ -208,8 +207,8 @@
   DCHECK(name);
 
   HKEY target_key = NULL;
-  LONG result = RegOpenKeyEx(key_, name, 0, KEY_READ | wow64access_,
-                             &target_key);
+  LONG result =
+      RegOpenKeyEx(key_, name, 0, KEY_READ | wow64access_, &target_key);
 
   if (result != ERROR_SUCCESS)
     return result;
@@ -339,12 +338,13 @@
 }
 
 LONG RegKey::WriteValue(const wchar_t* name, DWORD in_value) {
-  return WriteValue(
-      name, &in_value, static_cast<DWORD>(sizeof(in_value)), REG_DWORD);
+  return WriteValue(name, &in_value, static_cast<DWORD>(sizeof(in_value)),
+                    REG_DWORD);
 }
 
-LONG RegKey::WriteValue(const wchar_t * name, const wchar_t* in_value) {
-  return WriteValue(name, in_value,
+LONG RegKey::WriteValue(const wchar_t* name, const wchar_t* in_value) {
+  return WriteValue(
+      name, in_value,
       static_cast<DWORD>(sizeof(*in_value) * (wcslen(in_value) + 1)), REG_SZ);
 }
 
@@ -354,8 +354,9 @@
                         DWORD dtype) {
   DCHECK(data || !dsize);
 
-  LONG result = RegSetValueEx(key_, name, 0, dtype,
-      reinterpret_cast<LPBYTE>(const_cast<void*>(data)), dsize);
+  LONG result =
+      RegSetValueEx(key_, name, 0, dtype,
+                    reinterpret_cast<LPBYTE>(const_cast<void*>(data)), dsize);
   return result;
 }
 
@@ -364,7 +365,7 @@
                                    const wchar_t* lpSubKey,
                                    REGSAM samDesired,
                                    DWORD Reserved) {
-  typedef LSTATUS(WINAPI* RegDeleteKeyExPtr)(HKEY, LPCWSTR, REGSAM, DWORD);
+  typedef LSTATUS(WINAPI * RegDeleteKeyExPtr)(HKEY, LPCWSTR, REGSAM, DWORD);
 
   RegDeleteKeyExPtr reg_delete_key_ex_func =
       reinterpret_cast<RegDeleteKeyExPtr>(
@@ -387,8 +388,8 @@
     return result;
 
   HKEY target_key = NULL;
-  result = RegOpenKeyEx(
-      root_key, name.c_str(), 0, KEY_ENUMERATE_SUB_KEYS | access, &target_key);
+  result = RegOpenKeyEx(root_key, name.c_str(), 0,
+                        KEY_ENUMERATE_SUB_KEYS | access, &target_key);
 
   if (result == ERROR_FILE_NOT_FOUND)
     return ERROR_SUCCESS;
@@ -408,14 +409,9 @@
   std::wstring key_name;
   while (result == ERROR_SUCCESS) {
     DWORD key_size = kMaxKeyNameLength;
-    result = RegEnumKeyEx(target_key,
-                          0,
-                          WriteInto(&key_name, kMaxKeyNameLength),
-                          &key_size,
-                          NULL,
-                          NULL,
-                          NULL,
-                          NULL);
+    result =
+        RegEnumKeyEx(target_key, 0, WriteInto(&key_name, kMaxKeyNameLength),
+                     &key_size, NULL, NULL, NULL, NULL);
 
     if (result != ERROR_SUCCESS)
       break;
@@ -441,15 +437,13 @@
 RegistryValueIterator::RegistryValueIterator(HKEY root_key,
                                              const wchar_t* folder_key,
                                              REGSAM wow64access)
-    : name_(MAX_PATH, L'\0'),
-      value_(MAX_PATH, L'\0') {
+    : name_(MAX_PATH, L'\0'), value_(MAX_PATH, L'\0') {
   Initialize(root_key, folder_key, wow64access);
 }
 
 RegistryValueIterator::RegistryValueIterator(HKEY root_key,
                                              const wchar_t* folder_key)
-    : name_(MAX_PATH, L'\0'),
-      value_(MAX_PATH, L'\0') {
+    : name_(MAX_PATH, L'\0'), value_(MAX_PATH, L'\0') {
   Initialize(root_key, folder_key, 0);
 }
 
@@ -484,8 +478,8 @@
 
 DWORD RegistryValueIterator::ValueCount() const {
   DWORD count = 0;
-  LONG result = ::RegQueryInfoKey(key_, NULL, 0, NULL, NULL, NULL, NULL,
-                                  &count, NULL, NULL, NULL, NULL);
+  LONG result = ::RegQueryInfoKey(key_, NULL, 0, NULL, NULL, NULL, NULL, &count,
+                                  NULL, NULL, NULL, NULL);
   if (result != ERROR_SUCCESS)
     return 0;
 
@@ -561,8 +555,8 @@
 
 DWORD RegistryKeyIterator::SubkeyCount() const {
   DWORD count = 0;
-  LONG result = ::RegQueryInfoKey(key_, NULL, 0, NULL, &count, NULL, NULL,
-                                  NULL, NULL, NULL, NULL, NULL);
+  LONG result = ::RegQueryInfoKey(key_, NULL, 0, NULL, &count, NULL, NULL, NULL,
+                                  NULL, NULL, NULL, NULL);
   if (result != ERROR_SUCCESS)
     return 0;
 
@@ -582,8 +576,8 @@
   if (Valid()) {
     DWORD ncount = arraysize(name_);
     FILETIME written;
-    LONG r = ::RegEnumKeyEx(key_, index_, name_, &ncount, NULL, NULL,
-                            NULL, &written);
+    LONG r = ::RegEnumKeyEx(key_, index_, name_, &ncount, NULL, NULL, NULL,
+                            &written);
     if (ERROR_SUCCESS == r)
       return true;
   }
diff --git a/base/win/registry.h b/base/win/registry.h
index 413ee7a..e2e0d30 100644
--- a/base/win/registry.h
+++ b/base/win/registry.h
@@ -34,8 +34,10 @@
 
   LONG Create(HKEY rootkey, const wchar_t* subkey, REGSAM access);
 
-  LONG CreateWithDisposition(HKEY rootkey, const wchar_t* subkey,
-                             DWORD* disposition, REGSAM access);
+  LONG CreateWithDisposition(HKEY rootkey,
+                             const wchar_t* subkey,
+                             DWORD* disposition,
+                             REGSAM access);
 
   // Creates a subkey or open it if it already exists.
   LONG CreateKey(const wchar_t* name, REGSAM access);
diff --git a/base/win/resource_util.cc b/base/win/resource_util.cc
index 0c10078..b964aee 100644
--- a/base/win/resource_util.cc
+++ b/base/win/resource_util.cc
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "base/logging.h"
 #include "base/win/resource_util.h"
+#include "base/logging.h"
 
 namespace base {
 namespace win {
@@ -21,8 +21,8 @@
     return false;
   }
 
-  HRSRC hres_info = FindResource(module, MAKEINTRESOURCE(resource_id),
-                                 resource_type);
+  HRSRC hres_info =
+      FindResource(module, MAKEINTRESOURCE(resource_id), resource_type);
   if (NULL == hres_info)
     return false;
 
diff --git a/base/win/resource_util.h b/base/win/resource_util.h
index 3e6b145..b4473fd 100644
--- a/base/win/resource_util.h
+++ b/base/win/resource_util.h
@@ -8,9 +8,8 @@
 #ifndef BASE_WIN_RESOURCE_UTIL_H_
 #define BASE_WIN_RESOURCE_UTIL_H_
 
-#include <windows.h>
 #include <stddef.h>
-
+#include <windows.h>
 
 namespace base {
 namespace win {
@@ -19,18 +18,18 @@
 // a dll.  Some resources are optional, especially in unit tests, so this
 // returns false but doesn't raise an error if the resource can't be loaded.
 bool GetResourceFromModule(HMODULE module,
-                                       int resource_id,
-                                       LPCTSTR resource_type,
-                                       void** data,
-                                       size_t* length);
+                           int resource_id,
+                           LPCTSTR resource_type,
+                           void** data,
+                           size_t* length);
 
 // Function for getting a data resource (BINDATA) from a dll.  Some
 // resources are optional, especially in unit tests, so this returns false
 // but doesn't raise an error if the resource can't be loaded.
 bool GetDataResourceFromModule(HMODULE module,
-                                           int resource_id,
-                                           void** data,
-                                           size_t* length);
+                               int resource_id,
+                               void** data,
+                               size_t* length);
 
 }  // namespace win
 }  // namespace base
diff --git a/base/win/scoped_bstr.cc b/base/win/scoped_bstr.cc
deleted file mode 100644
index 02f3d54..0000000
--- a/base/win/scoped_bstr.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) 2010 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.
-
-#include "base/win/scoped_bstr.h"
-
-#include <stdint.h>
-
-#include "base/logging.h"
-
-namespace base {
-namespace win {
-
-ScopedBstr::ScopedBstr(const char16* non_bstr)
-    : bstr_(SysAllocString(non_bstr)) {
-}
-
-ScopedBstr::~ScopedBstr() {
-  static_assert(sizeof(ScopedBstr) == sizeof(BSTR), "ScopedBstrSize");
-  SysFreeString(bstr_);
-}
-
-void ScopedBstr::Reset(BSTR bstr) {
-  if (bstr != bstr_) {
-    // if |bstr_| is NULL, SysFreeString does nothing.
-    SysFreeString(bstr_);
-    bstr_ = bstr;
-  }
-}
-
-BSTR ScopedBstr::Release() {
-  BSTR bstr = bstr_;
-  bstr_ = NULL;
-  return bstr;
-}
-
-void ScopedBstr::Swap(ScopedBstr& bstr2) {
-  BSTR tmp = bstr_;
-  bstr_ = bstr2.bstr_;
-  bstr2.bstr_ = tmp;
-}
-
-BSTR* ScopedBstr::Receive() {
-  DCHECK(!bstr_) << "BSTR leak.";
-  return &bstr_;
-}
-
-BSTR ScopedBstr::Allocate(const char16* str) {
-  Reset(SysAllocString(str));
-  return bstr_;
-}
-
-BSTR ScopedBstr::AllocateBytes(size_t bytes) {
-  Reset(SysAllocStringByteLen(NULL, static_cast<UINT>(bytes)));
-  return bstr_;
-}
-
-void ScopedBstr::SetByteLen(size_t bytes) {
-  DCHECK(bstr_ != NULL) << "attempting to modify a NULL bstr";
-  uint32_t* data = reinterpret_cast<uint32_t*>(bstr_);
-  data[-1] = static_cast<uint32_t>(bytes);
-}
-
-size_t ScopedBstr::Length() const {
-  return SysStringLen(bstr_);
-}
-
-size_t ScopedBstr::ByteLength() const {
-  return SysStringByteLen(bstr_);
-}
-
-}  // namespace win
-}  // namespace base
diff --git a/base/win/scoped_bstr.h b/base/win/scoped_bstr.h
deleted file mode 100644
index 02f73ed..0000000
--- a/base/win/scoped_bstr.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (c) 2011 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.
-
-#ifndef BASE_WIN_SCOPED_BSTR_H_
-#define BASE_WIN_SCOPED_BSTR_H_
-
-#include <windows.h>
-#include <oleauto.h>
-#include <stddef.h>
-
-#include "base/logging.h"
-#include "base/macros.h"
-#include "base/strings/string16.h"
-
-namespace base {
-namespace win {
-
-// Manages a BSTR string pointer.
-// The class interface is based on unique_ptr.
-class ScopedBstr {
- public:
-  ScopedBstr() : bstr_(NULL) {
-  }
-
-  // Constructor to create a new BSTR.
-  //
-  // NOTE: Do not pass a BSTR to this constructor expecting ownership to
-  // be transferred - even though it compiles! ;-)
-  explicit ScopedBstr(const char16* non_bstr);
-  ~ScopedBstr();
-
-  // Give ScopedBstr ownership over an already allocated BSTR or NULL.
-  // If you need to allocate a new BSTR instance, use |allocate| instead.
-  void Reset(BSTR bstr = NULL);
-
-  // Releases ownership of the BSTR to the caller.
-  BSTR Release();
-
-  // Creates a new BSTR from a 16-bit C-style string.
-  //
-  // If you already have a BSTR and want to transfer ownership to the
-  // ScopedBstr instance, call |reset| instead.
-  //
-  // Returns a pointer to the new BSTR, or NULL if allocation failed.
-  BSTR Allocate(const char16* str);
-
-  // Allocates a new BSTR with the specified number of bytes.
-  // Returns a pointer to the new BSTR, or NULL if allocation failed.
-  BSTR AllocateBytes(size_t bytes);
-
-  // Sets the allocated length field of the already-allocated BSTR to be
-  // |bytes|.  This is useful when the BSTR was preallocated with e.g.
-  // SysAllocStringLen or SysAllocStringByteLen (call |AllocateBytes|) and then
-  // not all the bytes are being used.
-  //
-  // Note that if you want to set the length to a specific number of
-  // characters, you need to multiply by sizeof(wchar_t).  Oddly, there's no
-  // public API to set the length, so we do this ourselves by hand.
-  //
-  // NOTE: The actual allocated size of the BSTR MUST be >= bytes.  That
-  // responsibility is with the caller.
-  void SetByteLen(size_t bytes);
-
-  // Swap values of two ScopedBstr's.
-  void Swap(ScopedBstr& bstr2);
-
-  // Retrieves the pointer address.
-  // Used to receive BSTRs as out arguments (and take ownership).
-  // The function DCHECKs on the current value being NULL.
-  // Usage: GetBstr(bstr.Receive());
-  BSTR* Receive();
-
-  // Returns number of chars in the BSTR.
-  size_t Length() const;
-
-  // Returns the number of bytes allocated for the BSTR.
-  size_t ByteLength() const;
-
-  operator BSTR() const {
-    return bstr_;
-  }
-
- protected:
-  BSTR bstr_;
-
- private:
-  // Forbid comparison of ScopedBstr types.  You should never have the same
-  // BSTR owned by two different scoped_ptrs.
-  bool operator==(const ScopedBstr& bstr2) const;
-  bool operator!=(const ScopedBstr& bstr2) const;
-  DISALLOW_COPY_AND_ASSIGN(ScopedBstr);
-};
-
-}  // namespace win
-}  // namespace base
-
-#endif  // BASE_WIN_SCOPED_BSTR_H_
diff --git a/base/win/scoped_co_mem.h b/base/win/scoped_co_mem.h
index a3737dd..3c31f3f 100644
--- a/base/win/scoped_co_mem.h
+++ b/base/win/scoped_co_mem.h
@@ -19,22 +19,18 @@
 //   SHGetSomeInfo(&file_item, ...);
 //   ...
 //   return;  <-- memory released
-template<typename T>
+template <typename T>
 class ScopedCoMem {
  public:
   ScopedCoMem() : mem_ptr_(NULL) {}
-  ~ScopedCoMem() {
-    Reset(NULL);
-  }
+  ~ScopedCoMem() { Reset(NULL); }
 
-  T** operator&() {  // NOLINT
+  T** operator&() {            // NOLINT
     DCHECK(mem_ptr_ == NULL);  // To catch memory leaks.
     return &mem_ptr_;
   }
 
-  operator T*() {
-    return mem_ptr_;
-  }
+  operator T*() { return mem_ptr_; }
 
   T* operator->() {
     DCHECK(mem_ptr_ != NULL);
@@ -52,9 +48,7 @@
     mem_ptr_ = ptr;
   }
 
-  T* get() const {
-    return mem_ptr_;
-  }
+  T* get() const { return mem_ptr_; }
 
  private:
   T* mem_ptr_;
diff --git a/base/win/scoped_handle.cc b/base/win/scoped_handle.cc
index b47183e..ddc744f 100644
--- a/base/win/scoped_handle.cc
+++ b/base/win/scoped_handle.cc
@@ -16,20 +16,20 @@
 }
 
 // Static.
-void VerifierTraits::StartTracking(HANDLE handle, const void* owner,
-                                   const void* pc1, const void* pc2) {
-}
+void VerifierTraits::StartTracking(HANDLE handle,
+                                   const void* owner,
+                                   const void* pc1,
+                                   const void* pc2) {}
 
 // Static.
-void VerifierTraits::StopTracking(HANDLE handle, const void* owner,
-                                  const void* pc1, const void* pc2) {
-}
+void VerifierTraits::StopTracking(HANDLE handle,
+                                  const void* owner,
+                                  const void* pc1,
+                                  const void* pc2) {}
 
-void DisableHandleVerifier() {
-}
+void DisableHandleVerifier() {}
 
-void OnHandleBeingClosed(HANDLE handle) {
-}
+void OnHandleBeingClosed(HANDLE handle) {}
 
 }  // namespace win
 }  // namespace base
diff --git a/base/win/scoped_handle.h b/base/win/scoped_handle.h
index 7c63bb7..e67e447 100644
--- a/base/win/scoped_handle.h
+++ b/base/win/scoped_handle.h
@@ -16,8 +16,8 @@
 #include <intrin.h>
 #define BASE_WIN_GET_CALLER _ReturnAddress()
 #elif defined(COMPILER_GCC)
-#define BASE_WIN_GET_CALLER __builtin_extract_return_addr(\\
-    __builtin_return_address(0))
+#define BASE_WIN_GET_CALLER \
+  __builtin_extract_return_addr(\ __builtin_return_address(0))
 #endif
 
 namespace base {
@@ -48,13 +48,9 @@
     Set(other.Take());
   }
 
-  ~GenericScopedHandle() {
-    Close();
-  }
+  ~GenericScopedHandle() { Close(); }
 
-  bool IsValid() const {
-    return Traits::IsHandleValid(handle_);
-  }
+  bool IsValid() const { return Traits::IsHandleValid(handle_); }
 
   GenericScopedHandle& operator=(GenericScopedHandle&& other) {
     DCHECK_NE(this, &other);
@@ -75,9 +71,7 @@
     }
   }
 
-  Handle Get() const {
-    return handle_;
-  }
+  Handle Get() const { return handle_; }
 
   // Transfers ownership away from this object.
   Handle Take() {
@@ -118,9 +112,7 @@
   }
 
   // Returns NULL handle value.
-  static HANDLE NullHandle() {
-    return NULL;
-  }
+  static HANDLE NullHandle() { return NULL; }
 
  private:
   DISALLOW_IMPLICIT_CONSTRUCTORS(HandleTraits);
@@ -131,10 +123,14 @@
  public:
   typedef HANDLE Handle;
 
-  static void StartTracking(HANDLE handle, const void* owner,
-                            const void* pc1, const void* pc2) {}
-  static void StopTracking(HANDLE handle, const void* owner,
-                           const void* pc1, const void* pc2) {}
+  static void StartTracking(HANDLE handle,
+                            const void* owner,
+                            const void* pc1,
+                            const void* pc2) {}
+  static void StopTracking(HANDLE handle,
+                           const void* owner,
+                           const void* pc1,
+                           const void* pc2) {}
 
  private:
   DISALLOW_IMPLICIT_CONSTRUCTORS(DummyVerifierTraits);
@@ -145,10 +141,14 @@
  public:
   typedef HANDLE Handle;
 
-  static void StartTracking(HANDLE handle, const void* owner,
-                            const void* pc1, const void* pc2);
-  static void StopTracking(HANDLE handle, const void* owner,
-                           const void* pc1, const void* pc2);
+  static void StartTracking(HANDLE handle,
+                            const void* owner,
+                            const void* pc1,
+                            const void* pc2);
+  static void StopTracking(HANDLE handle,
+                           const void* owner,
+                           const void* pc1,
+                           const void* pc2);
 
  private:
   DISALLOW_IMPLICIT_CONSTRUCTORS(VerifierTraits);
diff --git a/base/win/scoped_handle_test_dll.cc b/base/win/scoped_handle_test_dll.cc
index e17d6fd..9603d68 100644
--- a/base/win/scoped_handle_test_dll.cc
+++ b/base/win/scoped_handle_test_dll.cc
@@ -52,7 +52,7 @@
   if (!ready_event)
     return false;
 
-  ThreadParams thread_params = { ready_event, start_event };
+  ThreadParams thread_params = {ready_event, start_event};
 
   for (size_t i = 0; i < kNumThreads; i++) {
     HANDLE thread_handle =
@@ -115,6 +115,6 @@
   return InternalRunThreadTest() && InternalRunLocationTest();
 }
 
-}  // testing
-}  // win
-}  // base
+}  // namespace testing
+}  // namespace win
+}  // namespace base
diff --git a/base/win/scoped_hdc.h b/base/win/scoped_hdc.h
index ef50e05..226b0b9 100644
--- a/base/win/scoped_hdc.h
+++ b/base/win/scoped_hdc.h
@@ -18,9 +18,7 @@
 // GetDC.
 class ScopedGetDC {
  public:
-  explicit ScopedGetDC(HWND hwnd)
-      : hwnd_(hwnd),
-        hdc_(GetDC(hwnd)) {
+  explicit ScopedGetDC(HWND hwnd) : hwnd_(hwnd), hdc_(GetDC(hwnd)) {
     if (hwnd_) {
       DCHECK(IsWindow(hwnd_));
       DCHECK(hdc_);
@@ -53,17 +51,11 @@
  public:
   typedef HDC Handle;
 
-  static bool CloseHandle(HDC handle) {
-    return ::DeleteDC(handle) != FALSE;
-  }
+  static bool CloseHandle(HDC handle) { return ::DeleteDC(handle) != FALSE; }
 
-  static bool IsHandleValid(HDC handle) {
-    return handle != NULL;
-  }
+  static bool IsHandleValid(HDC handle) { return handle != NULL; }
 
-  static HDC NullHandle() {
-    return NULL;
-  }
+  static HDC NullHandle() { return NULL; }
 
  private:
   DISALLOW_IMPLICIT_CONSTRUCTORS(CreateDCTraits);
diff --git a/base/win/scoped_hglobal.h b/base/win/scoped_hglobal.h
index abe9a5a..2fa8aaa 100644
--- a/base/win/scoped_hglobal.h
+++ b/base/win/scoped_hglobal.h
@@ -5,8 +5,8 @@
 #ifndef BASE_WIN_SCOPED_HGLOBAL_H_
 #define BASE_WIN_SCOPED_HGLOBAL_H_
 
-#include <windows.h>
 #include <stddef.h>
+#include <windows.h>
 
 #include "base/macros.h"
 
@@ -14,15 +14,13 @@
 namespace win {
 
 // Like ScopedHandle except for HGLOBAL.
-template<class T>
+template <class T>
 class ScopedHGlobal {
  public:
   explicit ScopedHGlobal(HGLOBAL glob) : glob_(glob) {
     data_ = static_cast<T>(GlobalLock(glob_));
   }
-  ~ScopedHGlobal() {
-    GlobalUnlock(glob_);
-  }
+  ~ScopedHGlobal() { GlobalUnlock(glob_); }
 
   T get() { return data_; }
 
diff --git a/base/win/scoped_process_information.cc b/base/win/scoped_process_information.cc
index 935a4cc..93fb9e6 100644
--- a/base/win/scoped_process_information.cc
+++ b/base/win/scoped_process_information.cc
@@ -20,9 +20,8 @@
     return true;
 
   HANDLE temp = NULL;
-  if (!::DuplicateHandle(::GetCurrentProcess(), source,
-                         ::GetCurrentProcess(), &temp, 0, FALSE,
-                         DUPLICATE_SAME_ACCESS)) {
+  if (!::DuplicateHandle(::GetCurrentProcess(), source, ::GetCurrentProcess(),
+                         &temp, 0, FALSE, DUPLICATE_SAME_ACCESS)) {
     DWORD last_error = ::GetLastError();
     DPLOG(ERROR) << "Failed to duplicate a handle " << last_error;
     ::SetLastError(last_error);
@@ -35,11 +34,11 @@
 }  // namespace
 
 ScopedProcessInformation::ScopedProcessInformation()
-    : process_id_(0), thread_id_(0) {
-}
+    : process_id_(0), thread_id_(0) {}
 
 ScopedProcessInformation::ScopedProcessInformation(
-    const PROCESS_INFORMATION& process_info) : process_id_(0), thread_id_(0) {
+    const PROCESS_INFORMATION& process_info)
+    : process_id_(0), thread_id_(0) {
   Set(process_info);
 }
 
@@ -48,8 +47,8 @@
 }
 
 bool ScopedProcessInformation::IsValid() const {
-  return process_id_ || process_handle_.Get() ||
-         thread_id_ || thread_handle_.Get();
+  return process_id_ || process_handle_.Get() || thread_id_ ||
+         thread_handle_.Get();
 }
 
 void ScopedProcessInformation::Close() {
diff --git a/base/win/scoped_process_information.h b/base/win/scoped_process_information.h
index ca76e21..557555d 100644
--- a/base/win/scoped_process_information.h
+++ b/base/win/scoped_process_information.h
@@ -48,24 +48,16 @@
   HANDLE TakeThreadHandle();
 
   // Returns the held process handle, if any, while retaining ownership.
-  HANDLE process_handle() const {
-    return process_handle_.Get();
-  }
+  HANDLE process_handle() const { return process_handle_.Get(); }
 
   // Returns the held thread handle, if any, while retaining ownership.
-  HANDLE thread_handle() const {
-    return thread_handle_.Get();
-  }
+  HANDLE thread_handle() const { return thread_handle_.Get(); }
 
   // Returns the held process id, if any.
-  DWORD process_id() const {
-    return process_id_;
-  }
+  DWORD process_id() const { return process_id_; }
 
   // Returns the held thread id, if any.
-  DWORD thread_id() const {
-    return thread_id_;
-  }
+  DWORD thread_id() const { return thread_id_; }
 
  private:
   ScopedHandle process_handle_;
diff --git a/base/win/scoped_propvariant.h b/base/win/scoped_propvariant.h
index aa9afec..0f1d5c8 100644
--- a/base/win/scoped_propvariant.h
+++ b/base/win/scoped_propvariant.h
@@ -17,13 +17,9 @@
 // construction and destruction of this class.
 class ScopedPropVariant {
  public:
-  ScopedPropVariant() {
-    PropVariantInit(&pv_);
-  }
+  ScopedPropVariant() { PropVariantInit(&pv_); }
 
-  ~ScopedPropVariant() {
-    Reset();
-  }
+  ~ScopedPropVariant() { Reset(); }
 
   // Returns a pointer to the underlying PROPVARIANT for use as an out param in
   // a function call.
diff --git a/base/win/scoped_select_object.h b/base/win/scoped_select_object.h
index 59b21c1..d4b1a81 100644
--- a/base/win/scoped_select_object.h
+++ b/base/win/scoped_select_object.h
@@ -17,8 +17,7 @@
 class ScopedSelectObject {
  public:
   ScopedSelectObject(HDC hdc, HGDIOBJ object)
-      : hdc_(hdc),
-        oldobj_(SelectObject(hdc, object)) {
+      : hdc_(hdc), oldobj_(SelectObject(hdc, object)) {
     DCHECK(hdc_);
     DCHECK(object);
     DCHECK(oldobj_ != NULL && oldobj_ != HGDI_ERROR);
diff --git a/base/win/scoped_variant.cc b/base/win/scoped_variant.cc
deleted file mode 100644
index 0c1ee31..0000000
--- a/base/win/scoped_variant.cc
+++ /dev/null
@@ -1,277 +0,0 @@
-// Copyright (c) 2010 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.
-
-#include "base/win/scoped_variant.h"
-
-#include "base/logging.h"
-
-namespace base {
-namespace win {
-
-// Global, const instance of an empty variant.
-const VARIANT ScopedVariant::kEmptyVariant = {{{VT_EMPTY}}};
-
-ScopedVariant::~ScopedVariant() {
-  static_assert(sizeof(ScopedVariant) == sizeof(VARIANT), "ScopedVariantSize");
-  ::VariantClear(&var_);
-}
-
-ScopedVariant::ScopedVariant(const wchar_t* str) {
-  var_.vt = VT_EMPTY;
-  Set(str);
-}
-
-ScopedVariant::ScopedVariant(const wchar_t* str, UINT length) {
-  var_.vt = VT_BSTR;
-  var_.bstrVal = ::SysAllocStringLen(str, length);
-}
-
-ScopedVariant::ScopedVariant(int value, VARTYPE vt) {
-  var_.vt = vt;
-  var_.lVal = value;
-}
-
-ScopedVariant::ScopedVariant(double value, VARTYPE vt) {
-  DCHECK(vt == VT_R8 || vt == VT_DATE);
-  var_.vt = vt;
-  var_.dblVal = value;
-}
-
-ScopedVariant::ScopedVariant(IDispatch* dispatch) {
-  var_.vt = VT_EMPTY;
-  Set(dispatch);
-}
-
-ScopedVariant::ScopedVariant(IUnknown* unknown) {
-  var_.vt = VT_EMPTY;
-  Set(unknown);
-}
-
-ScopedVariant::ScopedVariant(SAFEARRAY* safearray) {
-  var_.vt = VT_EMPTY;
-  Set(safearray);
-}
-
-ScopedVariant::ScopedVariant(const VARIANT& var) {
-  var_.vt = VT_EMPTY;
-  Set(var);
-}
-
-void ScopedVariant::Reset(const VARIANT& var) {
-  if (&var != &var_) {
-    ::VariantClear(&var_);
-    var_ = var;
-  }
-}
-
-VARIANT ScopedVariant::Release() {
-  VARIANT var = var_;
-  var_.vt = VT_EMPTY;
-  return var;
-}
-
-void ScopedVariant::Swap(ScopedVariant& var) {
-  VARIANT tmp = var_;
-  var_ = var.var_;
-  var.var_ = tmp;
-}
-
-VARIANT* ScopedVariant::Receive() {
-  DCHECK(!IsLeakableVarType(var_.vt)) << "variant leak. type: " << var_.vt;
-  return &var_;
-}
-
-VARIANT ScopedVariant::Copy() const {
-  VARIANT ret = {{{VT_EMPTY}}};
-  ::VariantCopy(&ret, &var_);
-  return ret;
-}
-
-int ScopedVariant::Compare(const VARIANT& var, bool ignore_case) const {
-  ULONG flags = ignore_case ? NORM_IGNORECASE : 0;
-  HRESULT hr = ::VarCmp(const_cast<VARIANT*>(&var_), const_cast<VARIANT*>(&var),
-                        LOCALE_USER_DEFAULT, flags);
-  int ret = 0;
-
-  switch (hr) {
-    case VARCMP_LT:
-      ret = -1;
-      break;
-
-    case VARCMP_GT:
-    case VARCMP_NULL:
-      ret = 1;
-      break;
-
-    default:
-      // Equal.
-      break;
-  }
-
-  return ret;
-}
-
-void ScopedVariant::Set(const wchar_t* str) {
-  DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
-  var_.vt = VT_BSTR;
-  var_.bstrVal = ::SysAllocString(str);
-}
-
-void ScopedVariant::Set(int8_t i8) {
-  DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
-  var_.vt = VT_I1;
-  var_.cVal = i8;
-}
-
-void ScopedVariant::Set(uint8_t ui8) {
-  DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
-  var_.vt = VT_UI1;
-  var_.bVal = ui8;
-}
-
-void ScopedVariant::Set(int16_t i16) {
-  DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
-  var_.vt = VT_I2;
-  var_.iVal = i16;
-}
-
-void ScopedVariant::Set(uint16_t ui16) {
-  DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
-  var_.vt = VT_UI2;
-  var_.uiVal = ui16;
-}
-
-void ScopedVariant::Set(int32_t i32) {
-  DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
-  var_.vt = VT_I4;
-  var_.lVal = i32;
-}
-
-void ScopedVariant::Set(uint32_t ui32) {
-  DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
-  var_.vt = VT_UI4;
-  var_.ulVal = ui32;
-}
-
-void ScopedVariant::Set(int64_t i64) {
-  DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
-  var_.vt = VT_I8;
-  var_.llVal = i64;
-}
-
-void ScopedVariant::Set(uint64_t ui64) {
-  DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
-  var_.vt = VT_UI8;
-  var_.ullVal = ui64;
-}
-
-void ScopedVariant::Set(float r32) {
-  DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
-  var_.vt = VT_R4;
-  var_.fltVal = r32;
-}
-
-void ScopedVariant::Set(double r64) {
-  DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
-  var_.vt = VT_R8;
-  var_.dblVal = r64;
-}
-
-void ScopedVariant::SetDate(DATE date) {
-  DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
-  var_.vt = VT_DATE;
-  var_.date = date;
-}
-
-void ScopedVariant::Set(IDispatch* disp) {
-  DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
-  var_.vt = VT_DISPATCH;
-  var_.pdispVal = disp;
-  if (disp)
-    disp->AddRef();
-}
-
-void ScopedVariant::Set(bool b) {
-  DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
-  var_.vt = VT_BOOL;
-  var_.boolVal = b ? VARIANT_TRUE : VARIANT_FALSE;
-}
-
-void ScopedVariant::Set(IUnknown* unk) {
-  DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
-  var_.vt = VT_UNKNOWN;
-  var_.punkVal = unk;
-  if (unk)
-    unk->AddRef();
-}
-
-void ScopedVariant::Set(SAFEARRAY* array) {
-  DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
-  if (SUCCEEDED(::SafeArrayGetVartype(array, &var_.vt))) {
-    var_.vt |= VT_ARRAY;
-    var_.parray = array;
-  } else {
-    DCHECK(!array) << "Unable to determine safearray vartype";
-    var_.vt = VT_EMPTY;
-  }
-}
-
-void ScopedVariant::Set(const VARIANT& var) {
-  DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
-  if (FAILED(::VariantCopy(&var_, &var))) {
-    DLOG(ERROR) << "VariantCopy failed";
-    var_.vt = VT_EMPTY;
-  }
-}
-
-ScopedVariant& ScopedVariant::operator=(const VARIANT& var) {
-  if (&var != &var_) {
-    VariantClear(&var_);
-    Set(var);
-  }
-  return *this;
-}
-
-bool ScopedVariant::IsLeakableVarType(VARTYPE vt) {
-  bool leakable = false;
-  switch (vt & VT_TYPEMASK) {
-    case VT_BSTR:
-    case VT_DISPATCH:
-    // we treat VT_VARIANT as leakable to err on the safe side.
-    case VT_VARIANT:
-    case VT_UNKNOWN:
-    case VT_SAFEARRAY:
-
-    // very rarely used stuff (if ever):
-    case VT_VOID:
-    case VT_PTR:
-    case VT_CARRAY:
-    case VT_USERDEFINED:
-    case VT_LPSTR:
-    case VT_LPWSTR:
-    case VT_RECORD:
-    case VT_INT_PTR:
-    case VT_UINT_PTR:
-    case VT_FILETIME:
-    case VT_BLOB:
-    case VT_STREAM:
-    case VT_STORAGE:
-    case VT_STREAMED_OBJECT:
-    case VT_STORED_OBJECT:
-    case VT_BLOB_OBJECT:
-    case VT_VERSIONED_STREAM:
-    case VT_BSTR_BLOB:
-      leakable = true;
-      break;
-  }
-
-  if (!leakable && (vt & VT_ARRAY) != 0) {
-    leakable = true;
-  }
-
-  return leakable;
-}
-
-}  // namespace win
-}  // namespace base
diff --git a/base/win/scoped_variant.h b/base/win/scoped_variant.h
deleted file mode 100644
index 5390eb9..0000000
--- a/base/win/scoped_variant.h
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright (c) 2011 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.
-
-#ifndef BASE_WIN_SCOPED_VARIANT_H_
-#define BASE_WIN_SCOPED_VARIANT_H_
-
-#include <windows.h>
-#include <oleauto.h>
-#include <stdint.h>
-
-#include "base/macros.h"
-
-namespace base {
-namespace win {
-
-// Scoped VARIANT class for automatically freeing a COM VARIANT at the
-// end of a scope.  Additionally provides a few functions to make the
-// encapsulated VARIANT easier to use.
-// Instead of inheriting from VARIANT, we take the containment approach
-// in order to have more control over the usage of the variant and guard
-// against memory leaks.
-class ScopedVariant {
- public:
-  // Declaration of a global variant variable that's always VT_EMPTY
-  static const VARIANT kEmptyVariant;
-
-  // Default constructor.
-  ScopedVariant() {
-    // This is equivalent to what VariantInit does, but less code.
-    var_.vt = VT_EMPTY;
-  }
-
-  // Constructor to create a new VT_BSTR VARIANT.
-  // NOTE: Do not pass a BSTR to this constructor expecting ownership to
-  // be transferred
-  explicit ScopedVariant(const wchar_t* str);
-
-  // Creates a new VT_BSTR variant of a specified length.
-  ScopedVariant(const wchar_t* str, UINT length);
-
-  // Creates a new integral type variant and assigns the value to
-  // VARIANT.lVal (32 bit sized field).
-  explicit ScopedVariant(int value, VARTYPE vt = VT_I4);
-
-  // Creates a new double-precision type variant.  |vt| must be either VT_R8
-  // or VT_DATE.
-  explicit ScopedVariant(double value, VARTYPE vt = VT_R8);
-
-  // VT_DISPATCH
-  explicit ScopedVariant(IDispatch* dispatch);
-
-  // VT_UNKNOWN
-  explicit ScopedVariant(IUnknown* unknown);
-
-  // SAFEARRAY
-  explicit ScopedVariant(SAFEARRAY* safearray);
-
-  // Copies the variant.
-  explicit ScopedVariant(const VARIANT& var);
-
-  ~ScopedVariant();
-
-  inline VARTYPE type() const {
-    return var_.vt;
-  }
-
-  // Give ScopedVariant ownership over an already allocated VARIANT.
-  void Reset(const VARIANT& var = kEmptyVariant);
-
-  // Releases ownership of the VARIANT to the caller.
-  VARIANT Release();
-
-  // Swap two ScopedVariant's.
-  void Swap(ScopedVariant& var);
-
-  // Returns a copy of the variant.
-  VARIANT Copy() const;
-
-  // The return value is 0 if the variants are equal, 1 if this object is
-  // greater than |var|, -1 if it is smaller.
-  int Compare(const VARIANT& var, bool ignore_case = false) const;
-
-  // Retrieves the pointer address.
-  // Used to receive a VARIANT as an out argument (and take ownership).
-  // The function DCHECKs on the current value being empty/null.
-  // Usage: GetVariant(var.receive());
-  VARIANT* Receive();
-
-  void Set(const wchar_t* str);
-
-  // Setters for simple types.
-  void Set(int8_t i8);
-  void Set(uint8_t ui8);
-  void Set(int16_t i16);
-  void Set(uint16_t ui16);
-  void Set(int32_t i32);
-  void Set(uint32_t ui32);
-  void Set(int64_t i64);
-  void Set(uint64_t ui64);
-  void Set(float r32);
-  void Set(double r64);
-  void Set(bool b);
-
-  // Creates a copy of |var| and assigns as this instance's value.
-  // Note that this is different from the Reset() method that's used to
-  // free the current value and assume ownership.
-  void Set(const VARIANT& var);
-
-  // COM object setters
-  void Set(IDispatch* disp);
-  void Set(IUnknown* unk);
-
-  // SAFEARRAY support
-  void Set(SAFEARRAY* array);
-
-  // Special setter for DATE since DATE is a double and we already have
-  // a setter for double.
-  void SetDate(DATE date);
-
-  // Allows const access to the contained variant without DCHECKs etc.
-  // This support is necessary for the V_XYZ (e.g. V_BSTR) set of macros to
-  // work properly but still doesn't allow modifications since we want control
-  // over that.
-  const VARIANT* ptr() const { return &var_; }
-
-  // Like other scoped classes (e.g. scoped_refptr, ScopedBstr,
-  // Microsoft::WRL::ComPtr) we support the assignment operator for the type we
-  // wrap.
-  ScopedVariant& operator=(const VARIANT& var);
-
-  // A hack to pass a pointer to the variant where the accepting
-  // function treats the variant as an input-only, read-only value
-  // but the function prototype requires a non const variant pointer.
-  // There's no DCHECK or anything here.  Callers must know what they're doing.
-  VARIANT* AsInput() const {
-    // The nature of this function is const, so we declare
-    // it as such and cast away the constness here.
-    return const_cast<VARIANT*>(&var_);
-  }
-
-  // Allows the ScopedVariant instance to be passed to functions either by value
-  // or by const reference.
-  operator const VARIANT&() const {
-    return var_;
-  }
-
-  // Used as a debug check to see if we're leaking anything.
-  static bool IsLeakableVarType(VARTYPE vt);
-
- protected:
-  VARIANT var_;
-
- private:
-  // Comparison operators for ScopedVariant are not supported at this point.
-  // Use the Compare method instead.
-  bool operator==(const ScopedVariant& var) const;
-  bool operator!=(const ScopedVariant& var) const;
-  DISALLOW_COPY_AND_ASSIGN(ScopedVariant);
-};
-
-}  // namespace win
-}  // namespace base
-
-#endif  // BASE_WIN_SCOPED_VARIANT_H_
diff --git a/base/win/shortcut.cc b/base/win/shortcut.cc
index 8abd5a6..fcd8a70 100644
--- a/base/win/shortcut.cc
+++ b/base/win/shortcut.cc
@@ -5,9 +5,9 @@
 #include "base/win/shortcut.h"
 
 #include <objbase.h>
+#include <propkey.h>
 #include <shellapi.h>
 #include <shlobj.h>
-#include <propkey.h>
 #include <wrl/client.h>
 
 #include "base/files/file_util.h"
@@ -44,14 +44,12 @@
 }  // namespace
 
 ShortcutProperties::ShortcutProperties()
-    : icon_index(-1), dual_mode(false), options(0U) {
-}
+    : icon_index(-1), dual_mode(false), options(0U) {}
 
 ShortcutProperties::ShortcutProperties(const ShortcutProperties& other) =
     default;
 
-ShortcutProperties::~ShortcutProperties() {
-}
+ShortcutProperties::~ShortcutProperties() {}
 
 bool CreateOrUpdateShortcutLink(const FilePath& shortcut_path,
                                 const ShortcutProperties& properties,
@@ -114,8 +112,8 @@
       return false;
   } else if (old_i_persist_file.Get()) {
     wchar_t current_arguments[MAX_PATH] = {0};
-    if (SUCCEEDED(old_i_shell_link->GetArguments(current_arguments,
-                                                 MAX_PATH))) {
+    if (SUCCEEDED(
+            old_i_shell_link->GetArguments(current_arguments, MAX_PATH))) {
       i_shell_link->SetArguments(current_arguments);
     }
   }
@@ -144,15 +142,13 @@
         !property_store.Get())
       return false;
 
-    if (has_app_id &&
-        !SetAppIdForPropertyStore(property_store.Get(),
-                                  properties.app_id.c_str())) {
+    if (has_app_id && !SetAppIdForPropertyStore(property_store.Get(),
+                                                properties.app_id.c_str())) {
       return false;
     }
-    if (has_dual_mode &&
-        !SetBooleanValueForPropertyStore(property_store.Get(),
-                                         PKEY_AppUserModel_IsDualMode,
-                                         properties.dual_mode)) {
+    if (has_dual_mode && !SetBooleanValueForPropertyStore(
+                             property_store.Get(), PKEY_AppUserModel_IsDualMode,
+                             properties.dual_mode)) {
       return false;
     }
     if (has_toast_activator_clsid &&
@@ -262,8 +258,8 @@
 
     if (options & ShortcutProperties::PROPERTIES_APP_ID) {
       ScopedPropVariant pv_app_id;
-      if (property_store->GetValue(PKEY_AppUserModel_ID,
-                                   pv_app_id.Receive()) != S_OK) {
+      if (property_store->GetValue(PKEY_AppUserModel_ID, pv_app_id.Receive()) !=
+          S_OK) {
         return false;
       }
       switch (pv_app_id.get().vt) {
diff --git a/base/win/shortcut.h b/base/win/shortcut.h
index 1ab0188..d5bcff7 100644
--- a/base/win/shortcut.h
+++ b/base/win/shortcut.h
@@ -5,8 +5,8 @@
 #ifndef BASE_WIN_SHORTCUT_H_
 #define BASE_WIN_SHORTCUT_H_
 
-#include <windows.h>
 #include <stdint.h>
+#include <windows.h>
 
 #include "base/files/file_path.h"
 #include "base/logging.h"
@@ -130,10 +130,9 @@
 // |operation|: a choice from the ShortcutOperation enum.
 // If |operation| is SHORTCUT_REPLACE_EXISTING or SHORTCUT_UPDATE_EXISTING and
 // |shortcut_path| does not exist, this method is a no-op and returns false.
-bool CreateOrUpdateShortcutLink(
-    const FilePath& shortcut_path,
-    const ShortcutProperties& properties,
-    ShortcutOperation operation);
+bool CreateOrUpdateShortcutLink(const FilePath& shortcut_path,
+                                const ShortcutProperties& properties,
+                                ShortcutOperation operation);
 
 // Resolves Windows shortcut (.LNK file).
 // This methods tries to resolve selected properties of a shortcut .LNK file.
@@ -146,8 +145,8 @@
 // properties are successfully read. Otherwise some reads have failed and
 // intermediate values written to |properties| should be ignored.
 bool ResolveShortcutProperties(const FilePath& shortcut_path,
-                                           uint32_t options,
-                                           ShortcutProperties* properties);
+                               uint32_t options,
+                               ShortcutProperties* properties);
 
 // Resolves Windows shortcut (.LNK file).
 // This is a wrapper to ResolveShortcutProperties() to handle the common use
@@ -157,8 +156,8 @@
 // successfully. Callers can safely use the same variable for both
 // |shortcut_path| and |target_path|.
 bool ResolveShortcut(const FilePath& shortcut_path,
-                                 FilePath* target_path,
-                                 string16* args);
+                     FilePath* target_path,
+                     string16* args);
 
 // Pin to taskbar is only supported on Windows 7 and Windows 8. Returns true on
 // those platforms.
diff --git a/base/win/startup_information.cc b/base/win/startup_information.cc
index 9986674..fbfb093 100644
--- a/base/win/startup_information.cc
+++ b/base/win/startup_information.cc
@@ -8,7 +8,7 @@
 
 namespace {
 
-typedef BOOL (WINAPI *InitializeProcThreadAttributeListFunction)(
+typedef BOOL(WINAPI* InitializeProcThreadAttributeListFunction)(
     LPPROC_THREAD_ATTRIBUTE_LIST attribute_list,
     DWORD attribute_count,
     DWORD flags,
@@ -16,7 +16,7 @@
 static InitializeProcThreadAttributeListFunction
     initialize_proc_thread_attribute_list;
 
-typedef BOOL (WINAPI *UpdateProcThreadAttributeFunction)(
+typedef BOOL(WINAPI* UpdateProcThreadAttributeFunction)(
     LPPROC_THREAD_ATTRIBUTE_LIST attribute_list,
     DWORD flags,
     DWORD_PTR attribute,
@@ -26,7 +26,7 @@
     PSIZE_T return_size);
 static UpdateProcThreadAttributeFunction update_proc_thread_attribute_list;
 
-typedef VOID (WINAPI *DeleteProcThreadAttributeListFunction)(
+typedef VOID(WINAPI* DeleteProcThreadAttributeListFunction)(
     LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList);
 static DeleteProcThreadAttributeListFunction delete_proc_thread_attribute_list;
 
@@ -59,7 +59,7 @@
 StartupInformation::~StartupInformation() {
   if (startup_info_.lpAttributeList) {
     delete_proc_thread_attribute_list(startup_info_.lpAttributeList);
-    delete [] reinterpret_cast<BYTE*>(startup_info_.lpAttributeList);
+    delete[] reinterpret_cast<BYTE*>(startup_info_.lpAttributeList);
   }
 }
 
@@ -77,8 +77,8 @@
   startup_info_.lpAttributeList =
       reinterpret_cast<LPPROC_THREAD_ATTRIBUTE_LIST>(new BYTE[size]);
   if (!initialize_proc_thread_attribute_list(startup_info_.lpAttributeList,
-                                           attribute_count, 0, &size)) {
-    delete [] reinterpret_cast<BYTE*>(startup_info_.lpAttributeList);
+                                             attribute_count, 0, &size)) {
+    delete[] reinterpret_cast<BYTE*>(startup_info_.lpAttributeList);
     startup_info_.lpAttributeList = NULL;
     return false;
   }
@@ -86,16 +86,14 @@
   return true;
 }
 
-bool StartupInformation::UpdateProcThreadAttribute(
-    DWORD_PTR attribute,
-    void* value,
-    size_t size) {
+bool StartupInformation::UpdateProcThreadAttribute(DWORD_PTR attribute,
+                                                   void* value,
+                                                   size_t size) {
   if (!startup_info_.lpAttributeList)
     return false;
-  return !!update_proc_thread_attribute_list(startup_info_.lpAttributeList, 0,
-                                       attribute, value, size, NULL, NULL);
+  return !!update_proc_thread_attribute_list(
+      startup_info_.lpAttributeList, 0, attribute, value, size, NULL, NULL);
 }
 
 }  // namespace win
 }  // namespace base
-
diff --git a/base/win/startup_information.h b/base/win/startup_information.h
index f82ff75..d95f39b 100644
--- a/base/win/startup_information.h
+++ b/base/win/startup_information.h
@@ -5,8 +5,8 @@
 #ifndef BASE_WIN_STARTUP_INFORMATION_H_
 #define BASE_WIN_STARTUP_INFORMATION_H_
 
-#include <windows.h>
 #include <stddef.h>
+#include <windows.h>
 
 #include "base/macros.h"
 
@@ -26,9 +26,7 @@
   // Sets one entry in the initialized attribute list.
   // |value| needs to live at least as long as the StartupInformation object
   // this is called on.
-  bool UpdateProcThreadAttribute(DWORD_PTR attribute,
-                                 void* value,
-                                 size_t size);
+  bool UpdateProcThreadAttribute(DWORD_PTR attribute, void* value, size_t size);
 
   LPSTARTUPINFOW startup_info() { return &startup_info_.StartupInfo; }
   LPSTARTUPINFOW startup_info() const {
diff --git a/base/win/wait_chain.cc b/base/win/wait_chain.cc
deleted file mode 100644
index a18a1ea..0000000
--- a/base/win/wait_chain.cc
+++ /dev/null
@@ -1,150 +0,0 @@
-// Copyright 2016 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.
-
-#include "base/win/wait_chain.h"
-
-#include <memory>
-
-#include "base/logging.h"
-#include "base/strings/stringprintf.h"
-
-namespace base {
-namespace win {
-
-namespace {
-
-// Helper deleter to hold a HWCT into a unique_ptr.
-struct WaitChainSessionDeleter {
-  using pointer = HWCT;
-  void operator()(HWCT session_handle) const {
-    ::CloseThreadWaitChainSession(session_handle);
-  }
-};
-
-using ScopedWaitChainSessionHandle =
-    std::unique_ptr<HWCT, WaitChainSessionDeleter>;
-
-const wchar_t* WctObjectTypeToString(WCT_OBJECT_TYPE type) {
-  switch (type) {
-    case WctCriticalSectionType:
-      return L"CriticalSection";
-    case WctSendMessageType:
-      return L"SendMessage";
-    case WctMutexType:
-      return L"Mutex";
-    case WctAlpcType:
-      return L"Alpc";
-    case WctComType:
-      return L"Com";
-    case WctThreadWaitType:
-      return L"ThreadWait";
-    case WctProcessWaitType:
-      return L"ProcessWait";
-    case WctThreadType:
-      return L"Thread";
-    case WctComActivationType:
-      return L"ComActivation";
-    case WctUnknownType:
-      return L"Unknown";
-    case WctSocketIoType:
-      return L"SocketIo";
-    case WctSmbIoType:
-      return L"SmbIo";
-    case WctMaxType:
-      break;
-  }
-  NOTREACHED();
-  return L"";
-}
-
-const wchar_t* WctObjectStatusToString(WCT_OBJECT_STATUS status) {
-  switch (status) {
-    case WctStatusNoAccess:
-      return L"NoAccess";
-    case WctStatusRunning:
-      return L"Running";
-    case WctStatusBlocked:
-      return L"Blocked";
-    case WctStatusPidOnly:
-      return L"PidOnly";
-    case WctStatusPidOnlyRpcss:
-      return L"PidOnlyRpcss";
-    case WctStatusOwned:
-      return L"Owned";
-    case WctStatusNotOwned:
-      return L"NotOwned";
-    case WctStatusAbandoned:
-      return L"Abandoned";
-    case WctStatusUnknown:
-      return L"Unknown";
-    case WctStatusError:
-      return L"Error";
-    case WctStatusMax:
-      break;
-  }
-  NOTREACHED();
-  return L"";
-}
-
-}  // namespace
-
-bool GetThreadWaitChain(DWORD thread_id,
-                        WaitChainNodeVector* wait_chain,
-                        bool* is_deadlock,
-                        base::string16* failure_reason,
-                        DWORD* last_error) {
-  DCHECK(wait_chain);
-  DCHECK(is_deadlock);
-
-  constexpr wchar_t kWaitChainSessionFailureReason[] =
-      L"OpenThreadWaitChainSession() failed.";
-  constexpr wchar_t kGetWaitChainFailureReason[] =
-      L"GetThreadWaitChain() failed.";
-
-  // Open a synchronous session.
-  ScopedWaitChainSessionHandle session_handle(
-      ::OpenThreadWaitChainSession(0, nullptr));
-  if (!session_handle) {
-    if (last_error)
-      *last_error = ::GetLastError();
-    if (failure_reason)
-      *failure_reason = kWaitChainSessionFailureReason;
-    DPLOG(ERROR) << kWaitChainSessionFailureReason;
-    return false;
-  }
-
-  DWORD nb_nodes = WCT_MAX_NODE_COUNT;
-  wait_chain->resize(nb_nodes);
-  BOOL is_cycle;
-  if (!::GetThreadWaitChain(session_handle.get(), NULL, 0, thread_id, &nb_nodes,
-                            wait_chain->data(), &is_cycle)) {
-    if (last_error)
-      *last_error = ::GetLastError();
-    if (failure_reason)
-      *failure_reason = kGetWaitChainFailureReason;
-    DPLOG(ERROR) << kGetWaitChainFailureReason;
-    return false;
-  }
-
-  *is_deadlock = is_cycle ? true : false;
-  wait_chain->resize(nb_nodes);
-
-  return true;
-}
-
-base::string16 WaitChainNodeToString(const WAITCHAIN_NODE_INFO& node) {
-  if (node.ObjectType == WctThreadType) {
-    return base::StringPrintf(L"Thread %d in process %d with status %ls",
-                              node.ThreadObject.ThreadId,
-                              node.ThreadObject.ProcessId,
-                              WctObjectStatusToString(node.ObjectStatus));
-  } else {
-    return base::StringPrintf(L"Lock of type %ls with status %ls",
-                              WctObjectTypeToString(node.ObjectType),
-                              WctObjectStatusToString(node.ObjectStatus));
-  }
-}
-
-}  // namespace win
-}  // namespace base
diff --git a/base/win/wait_chain.h b/base/win/wait_chain.h
deleted file mode 100644
index 0b5947b..0000000
--- a/base/win/wait_chain.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2016 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.
-
-#ifndef BASE_WIN_WAIT_CHAIN_H_
-#define BASE_WIN_WAIT_CHAIN_H_
-
-#include <windows.h>
-#include <wct.h>
-
-#include <vector>
-
-#include "base/strings/string16.h"
-
-namespace base {
-namespace win {
-
-using WaitChainNodeVector = std::vector<WAITCHAIN_NODE_INFO>;
-
-// Gets the wait chain for |thread_id|. Also specifies if the |wait_chain|
-// contains a deadlock. Returns true on success.
-//
-// From MSDN: A wait chain is an alternating sequence of threads and
-// synchronization objects; each thread waits for the object that follows it,
-// which is owned by the subsequent thread in the chain.
-//
-// On error, |failure_reason| and/or |last_error| will contain the details of
-// the failure, given that they are not null.
-// TODO(pmonette): Remove |failure_reason| and |last_error| when UMA is
-// supported in the watcher process and pre-rendez-vous.
-bool GetThreadWaitChain(DWORD thread_id,
-                                    WaitChainNodeVector* wait_chain,
-                                    bool* is_deadlock,
-                                    base::string16* failure_reason,
-                                    DWORD* last_error);
-
-// Returns a string that represents the node for a wait chain.
-base::string16 WaitChainNodeToString(
-    const WAITCHAIN_NODE_INFO& node);
-
-}  // namespace win
-}  // namespace base
-
-#endif  // BASE_WIN_WAIT_CHAIN_H_
diff --git a/base/win/win_util.cc b/base/win/win_util.cc
index b3867b4..d9efb6e 100644
--- a/base/win/win_util.cc
+++ b/base/win/win_util.cc
@@ -125,11 +125,9 @@
 void GetNonClientMetrics(NONCLIENTMETRICS_XP* metrics) {
   DCHECK(metrics);
   metrics->cbSize = sizeof(*metrics);
-  const bool success = !!SystemParametersInfo(
-      SPI_GETNONCLIENTMETRICS,
-      metrics->cbSize,
-      reinterpret_cast<NONCLIENTMETRICS*>(metrics),
-      0);
+  const bool success =
+      !!SystemParametersInfo(SPI_GETNONCLIENTMETRICS, metrics->cbSize,
+                             reinterpret_cast<NONCLIENTMETRICS*>(metrics), 0);
   DCHECK(success);
 }
 
@@ -183,8 +181,7 @@
     return false;
   }
 
-  return SetPropVariantValueForPropertyStore(property_store,
-                                             property_key,
+  return SetPropVariantValueForPropertyStore(property_store, property_key,
                                              property_value);
 }
 
@@ -197,8 +194,7 @@
     return false;
   }
 
-  return SetPropVariantValueForPropertyStore(property_store,
-                                             property_key,
+  return SetPropVariantValueForPropertyStore(property_store, property_key,
                                              property_value);
 }
 
@@ -222,19 +218,19 @@
   // See http://msdn.microsoft.com/en-us/library/dd378459%28VS.85%29.aspx
   DCHECK(lstrlen(app_id) < 64 && wcschr(app_id, L' ') == NULL);
 
-  return SetStringValueForPropertyStore(property_store,
-                                        PKEY_AppUserModel_ID,
+  return SetStringValueForPropertyStore(property_store, PKEY_AppUserModel_ID,
                                         app_id);
 }
 
 static const char16 kAutoRunKeyPath[] =
     L"Software\\Microsoft\\Windows\\CurrentVersion\\Run";
 
-bool AddCommandToAutoRun(HKEY root_key, const string16& name,
+bool AddCommandToAutoRun(HKEY root_key,
+                         const string16& name,
                          const string16& command) {
   RegKey autorun_key(root_key, kAutoRunKeyPath, KEY_SET_VALUE);
   return (autorun_key.WriteValue(name.c_str(), command.c_str()) ==
-      ERROR_SUCCESS);
+          ERROR_SUCCESS);
 }
 
 bool RemoveCommandFromAutoRun(HKEY root_key, const string16& name) {
@@ -348,8 +344,8 @@
 
 void DisableFlicks(HWND hwnd) {
   ::SetProp(hwnd, MICROSOFT_TABLETPENSERVICE_PROPERTY,
-      reinterpret_cast<HANDLE>(TABLET_DISABLE_FLICKS |
-          TABLET_DISABLE_FLICKFALLBACKKEYS));
+            reinterpret_cast<HANDLE>(TABLET_DISABLE_FLICKS |
+                                     TABLET_DISABLE_FLICKFALLBACKKEYS));
 }
 
 bool IsProcessPerMonitorDpiAware() {
diff --git a/base/win/win_util.h b/base/win/win_util.h
index 1acd455..08738cb 100644
--- a/base/win/win_util.h
+++ b/base/win/win_util.h
@@ -62,32 +62,31 @@
 bool UserAccountControlIsEnabled();
 
 // Sets the boolean value for a given key in given IPropertyStore.
-bool SetBooleanValueForPropertyStore(
-    IPropertyStore* property_store,
-    const PROPERTYKEY& property_key,
-    bool property_bool_value);
+bool SetBooleanValueForPropertyStore(IPropertyStore* property_store,
+                                     const PROPERTYKEY& property_key,
+                                     bool property_bool_value);
 
 // Sets the string value for a given key in given IPropertyStore.
-bool SetStringValueForPropertyStore(
-    IPropertyStore* property_store,
-    const PROPERTYKEY& property_key,
-    const wchar_t* property_string_value);
+bool SetStringValueForPropertyStore(IPropertyStore* property_store,
+                                    const PROPERTYKEY& property_key,
+                                    const wchar_t* property_string_value);
 
 // Sets the CLSID value for a given key in a given IPropertyStore.
 bool SetClsidForPropertyStore(IPropertyStore* property_store,
-                                          const PROPERTYKEY& property_key,
-                                          const CLSID& property_clsid_value);
+                              const PROPERTYKEY& property_key,
+                              const CLSID& property_clsid_value);
 
 // Sets the application id in given IPropertyStore. The function is intended
 // for tagging application/chromium shortcut, browser window and jump list for
 // Win7.
 bool SetAppIdForPropertyStore(IPropertyStore* property_store,
-                                          const wchar_t* app_id);
+                              const wchar_t* app_id);
 
 // Adds the specified |command| using the specified |name| to the AutoRun key.
 // |root_key| could be HKCU or HKLM or the root of any user hive.
-bool AddCommandToAutoRun(HKEY root_key, const string16& name,
-                                     const string16& command);
+bool AddCommandToAutoRun(HKEY root_key,
+                         const string16& name,
+                         const string16& command);
 // Removes the command specified by |name| from the AutoRun key. |root_key|
 // could be HKCU or HKLM or the root of any user hive.
 bool RemoveCommandFromAutoRun(HKEY root_key, const string16& name);
@@ -95,8 +94,8 @@
 // Reads the command specified by |name| from the AutoRun key. |root_key|
 // could be HKCU or HKLM or the root of any user hive. Used for unit-tests.
 bool ReadCommandFromAutoRun(HKEY root_key,
-                                        const string16& name,
-                                        string16* command);
+                            const string16& name,
+                            string16* command);
 
 // Sets whether to crash the process during exit. This is inspected by DLLMain
 // and used to intercept unexpected terminations of the process (via calls to
@@ -114,8 +113,8 @@
 // This is necessary to set compatible struct sizes for different versions
 // of certain Windows APIs (e.g. SystemParametersInfo).
 #define SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(struct_name, member) \
-    offsetof(struct_name, member) + \
-    (sizeof static_cast<struct_name*>(NULL)->member)
+  offsetof(struct_name, member) +                                     \
+      (sizeof static_cast<struct_name*>(NULL)->member)
 
 // Used by tests to mock any wanted state. Call with |state| set to true to
 // simulate being in a domain and false otherwise.
@@ -132,8 +131,7 @@
 // HMODULEs are not add-ref'd, so they should not be closed and may be
 // invalidated at any time (should a module be unloaded). |process| requires
 // the PROCESS_QUERY_INFORMATION and PROCESS_VM_READ permissions.
-bool GetLoadedModulesSnapshot(HANDLE process,
-                                          std::vector<HMODULE>* snapshot);
+bool GetLoadedModulesSnapshot(HANDLE process, std::vector<HMODULE>* snapshot);
 
 // Adds or removes the MICROSOFT_TABLETPENSERVICE_PROPERTY property with the
 // TABLET_DISABLE_FLICKS & TABLET_DISABLE_FLICKFALLBACKKEYS flags in order to
diff --git a/base/win/windows_types.h b/base/win/windows_types.h
index 2a86195..d076c44 100644
--- a/base/win/windows_types.h
+++ b/base/win/windows_types.h
@@ -68,7 +68,6 @@
 typedef DWORD ACCESS_MASK;
 typedef ACCESS_MASK REGSAM;
 
-
 // Forward declare Windows compatible handles.
 
 #define CHROME_DECLARE_HANDLE(name) \
@@ -84,7 +83,6 @@
 typedef HINSTANCE HMODULE;
 #undef CHROME_DECLARE_HANDLE
 
-
 // Forward declare some Windows struct/typedef sets.
 
 typedef struct _OVERLAPPED OVERLAPPED;
@@ -118,10 +116,11 @@
   PVOID Ptr;
 };
 
-
 // Define some commonly used Windows constants. Note that the layout of these
 // macros - including internal spacing - must be 100% consistent with windows.h.
 
+// clang-format off
+
 #ifndef INVALID_HANDLE_VALUE
 // Work around there being two slightly different definitions in the SDK.
 #define INVALID_HANDLE_VALUE ((HANDLE)(LONG_PTR)-1)
@@ -196,6 +195,8 @@
 #define WINAPI __stdcall
 #define CALLBACK __stdcall
 
+// clang-format on
+
 // Needed for optimal lock performance.
 WINBASEAPI _Releases_exclusive_lock_(*SRWLock) VOID WINAPI
     ReleaseSRWLockExclusive(_Inout_ PSRWLOCK SRWLock);
diff --git a/base/win/windows_version.cc b/base/win/windows_version.cc
index 6b7be76..dd45286 100644
--- a/base/win/windows_version.cc
+++ b/base/win/windows_version.cc
@@ -23,7 +23,7 @@
 #endif
 
 namespace {
-typedef BOOL (WINAPI *GetProductInfoPtr)(DWORD, DWORD, DWORD, DWORD, PDWORD);
+typedef BOOL(WINAPI* GetProductInfoPtr)(DWORD, DWORD, DWORD, DWORD, PDWORD);
 }  // namespace
 
 namespace base {
@@ -104,8 +104,8 @@
   static OSInfo* info;
   if (!info) {
     OSInfo* new_info = new OSInfo();
-    if (InterlockedCompareExchangePointer(
-        reinterpret_cast<PVOID*>(&info), new_info, NULL)) {
+    if (InterlockedCompareExchangePointer(reinterpret_cast<PVOID*>(&info),
+                                          new_info, NULL)) {
       delete new_info;
     }
   }
@@ -117,7 +117,7 @@
       kernel32_version_(VERSION_PRE_XP),
       architecture_(OTHER_ARCHITECTURE),
       wow64_status_(GetWOW64StatusForProcess(GetCurrentProcess())) {
-  OSVERSIONINFOEX version_info = { sizeof version_info };
+  OSVERSIONINFOEX version_info = {sizeof version_info};
   ::GetVersionEx(reinterpret_cast<OSVERSIONINFO*>(&version_info));
   version_number_.major = version_info.dwMajorVersion;
   version_number_.minor = version_info.dwMinorVersion;
@@ -132,9 +132,15 @@
   SYSTEM_INFO system_info = {};
   ::GetNativeSystemInfo(&system_info);
   switch (system_info.wProcessorArchitecture) {
-    case PROCESSOR_ARCHITECTURE_INTEL: architecture_ = X86_ARCHITECTURE; break;
-    case PROCESSOR_ARCHITECTURE_AMD64: architecture_ = X64_ARCHITECTURE; break;
-    case PROCESSOR_ARCHITECTURE_IA64:  architecture_ = IA64_ARCHITECTURE; break;
+    case PROCESSOR_ARCHITECTURE_INTEL:
+      architecture_ = X86_ARCHITECTURE;
+      break;
+    case PROCESSOR_ARCHITECTURE_AMD64:
+      architecture_ = X64_ARCHITECTURE;
+      break;
+    case PROCESSOR_ARCHITECTURE_IA64:
+      architecture_ = IA64_ARCHITECTURE;
+      break;
   }
   processors_ = system_info.dwNumberOfProcessors;
   allocation_granularity_ = system_info.dwAllocationGranularity;
@@ -213,8 +219,7 @@
   }
 }
 
-OSInfo::~OSInfo() {
-}
+OSInfo::~OSInfo() {}
 
 std::string OSInfo::processor_model_name() {
   if (processor_model_name_.empty()) {
@@ -230,7 +235,7 @@
 
 // static
 OSInfo::WOW64Status OSInfo::GetWOW64StatusForProcess(HANDLE process_handle) {
-  typedef BOOL (WINAPI* IsWow64ProcessFunc)(HANDLE, PBOOL);
+  typedef BOOL(WINAPI * IsWow64ProcessFunc)(HANDLE, PBOOL);
   IsWow64ProcessFunc is_wow64_process = reinterpret_cast<IsWow64ProcessFunc>(
       GetProcAddress(GetModuleHandle(L"kernel32.dll"), "IsWow64Process"));
   if (!is_wow64_process)
diff --git a/base/win/winrt_storage_util.h b/base/win/winrt_storage_util.h
index 5578415..8cf57d4 100644
--- a/base/win/winrt_storage_util.h
+++ b/base/win/winrt_storage_util.h
@@ -9,7 +9,6 @@
 #include <windows.storage.streams.h>
 #include <wrl/client.h>
 
-
 namespace base {
 namespace win {
 
diff --git a/build/gen.py b/build/gen.py
index 318e728..ffd2bbe 100755
--- a/build/gen.py
+++ b/build/gen.py
@@ -548,21 +548,16 @@
         'base/time/time_win.cc',
         'base/win/core_winrt_util.cc',
         'base/win/enum_variant.cc',
-        'base/win/event_trace_controller.cc',
-        'base/win/event_trace_provider.cc',
         'base/win/iat_patch_function.cc',
         'base/win/iunknown_impl.cc',
         'base/win/pe_image.cc',
         'base/win/process_startup_helper.cc',
         'base/win/registry.cc',
         'base/win/resource_util.cc',
-        'base/win/scoped_bstr.cc',
         'base/win/scoped_handle.cc',
         'base/win/scoped_process_information.cc',
-        'base/win/scoped_variant.cc',
         'base/win/shortcut.cc',
         'base/win/startup_information.cc',
-        'base/win/wait_chain.cc',
         'base/win/win_util.cc',
         'base/win/windows_version.cc',
     ])
diff --git a/src/exe_path.cc b/src/exe_path.cc
index 88c88ea..b26e474 100644
--- a/src/exe_path.cc
+++ b/src/exe_path.cc
@@ -25,8 +25,7 @@
   DCHECK_GT(executable_length, 1u);
   std::string executable_path;
   int rv = _NSGetExecutablePath(
-      base::WriteInto(&executable_path, executable_length),
-                      &executable_length);
+      base::WriteInto(&executable_path, executable_length), &executable_length);
   DCHECK_EQ(rv, 0);
 
   // _NSGetExecutablePath may return paths containing ./ or ../ which makes
diff --git a/src/test/test.h b/src/test/test.h
index a417a76..8b89898 100644
--- a/src/test/test.h
+++ b/src/test/test.h
@@ -7,8 +7,8 @@
 
 #include <string.h>
 
-#include <string>
 #include <sstream>
+#include <string>
 
 // This is a minimal googletest-like testing framework. It's originally derived
 // from Ninja's src/test.h. You might prefer that one if you have different
@@ -54,9 +54,7 @@
 class Message {
  public:
   Message() {}
-  ~Message() {
-    printf("%s\n\n", ss_.str().c_str());
-  }
+  ~Message() { printf("%s\n\n", ss_.str().c_str()); }
 
   template <typename T>
   inline Message& operator<<(const T& val) {
@@ -69,18 +67,18 @@
 };
 
 class AssertHelper {
-  public:
-   AssertHelper(const char* file, int line, const TestResult& test_result)
-       : file_(file), line_(line), error_(test_result.error()) {}
+ public:
+  AssertHelper(const char* file, int line, const TestResult& test_result)
+      : file_(file), line_(line), error_(test_result.error()) {}
 
-   void operator=(const Message& message) const {
-     printf("\n*** FAILURE %s:%d: %s\n", file_, line_, error_);
-   }
+  void operator=(const Message& message) const {
+    printf("\n*** FAILURE %s:%d: %s\n", file_, line_, error_);
+  }
 
-  private:
-   const char* file_;
-   int line_;
-   const char* error_;
+ private:
+  const char* file_;
+  int line_;
+  const char* error_;
 };
 
 }  // namespace testing
diff --git a/tools/gn/BUILD.gn b/tools/gn/BUILD.gn
deleted file mode 100644
index ffffd5a..0000000
--- a/tools/gn/BUILD.gn
+++ /dev/null
@@ -1,373 +0,0 @@
-# Copyright (c) 2013 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.
-
-import("//build/config/jumbo.gni")
-import("//testing/test.gni")
-import("//testing/libfuzzer/fuzzer_test.gni")
-
-jumbo_static_library("gn_lib") {
-  configs += [ "//build/config:precompiled_headers" ]
-
-  sources = [
-    "action_target_generator.cc",
-    "action_target_generator.h",
-    "action_values.cc",
-    "action_values.h",
-    "analyzer.cc",
-    "analyzer.h",
-    "args.cc",
-    "args.h",
-    "binary_target_generator.cc",
-    "binary_target_generator.h",
-    "build_settings.cc",
-    "build_settings.h",
-    "builder.cc",
-    "builder.h",
-    "builder_record.cc",
-    "builder_record.h",
-    "bundle_data.cc",
-    "bundle_data.h",
-    "bundle_data_target_generator.cc",
-    "bundle_data_target_generator.h",
-    "bundle_file_rule.cc",
-    "bundle_file_rule.h",
-    "c_include_iterator.cc",
-    "c_include_iterator.h",
-    "command_analyze.cc",
-    "command_args.cc",
-    "command_check.cc",
-    "command_clean.cc",
-    "command_desc.cc",
-    "command_format.cc",
-    "command_format.h",
-    "command_gen.cc",
-    "command_help.cc",
-    "command_ls.cc",
-    "command_path.cc",
-    "command_refs.cc",
-    "commands.cc",
-    "commands.h",
-    "config.cc",
-    "config.h",
-    "config_values.cc",
-    "config_values.h",
-    "config_values_extractors.cc",
-    "config_values_extractors.h",
-    "config_values_generator.cc",
-    "config_values_generator.h",
-    "copy_target_generator.cc",
-    "copy_target_generator.h",
-    "create_bundle_target_generator.cc",
-    "create_bundle_target_generator.h",
-    "deps_iterator.cc",
-    "deps_iterator.h",
-    "desc_builder.cc",
-    "desc_builder.h",
-    "eclipse_writer.cc",
-    "eclipse_writer.h",
-    "err.cc",
-    "err.h",
-    "escape.cc",
-    "escape.h",
-    "exec_process.cc",
-    "exec_process.h",
-    "filesystem_utils.cc",
-    "filesystem_utils.h",
-    "function_exec_script.cc",
-    "function_foreach.cc",
-    "function_forward_variables_from.cc",
-    "function_get_label_info.cc",
-    "function_get_path_info.cc",
-    "function_get_target_outputs.cc",
-    "function_process_file_template.cc",
-    "function_read_file.cc",
-    "function_rebase_path.cc",
-    "function_set_default_toolchain.cc",
-    "function_set_defaults.cc",
-    "function_template.cc",
-    "function_toolchain.cc",
-    "function_write_file.cc",
-    "functions.cc",
-    "functions.h",
-    "functions_target.cc",
-    "group_target_generator.cc",
-    "group_target_generator.h",
-    "header_checker.cc",
-    "header_checker.h",
-    "import_manager.cc",
-    "import_manager.h",
-    "inherited_libraries.cc",
-    "inherited_libraries.h",
-    "input_conversion.cc",
-    "input_conversion.h",
-    "input_file.cc",
-    "input_file.h",
-    "input_file_manager.cc",
-    "input_file_manager.h",
-    "item.cc",
-    "item.h",
-    "json_project_writer.cc",
-    "json_project_writer.h",
-    "label.cc",
-    "label.h",
-    "label_pattern.cc",
-    "label_pattern.h",
-    "label_ptr.h",
-    "lib_file.cc",
-    "lib_file.h",
-    "loader.cc",
-    "loader.h",
-    "location.cc",
-    "location.h",
-    "ninja_action_target_writer.cc",
-    "ninja_action_target_writer.h",
-    "ninja_binary_target_writer.cc",
-    "ninja_binary_target_writer.h",
-    "ninja_build_writer.cc",
-    "ninja_build_writer.h",
-    "ninja_bundle_data_target_writer.cc",
-    "ninja_bundle_data_target_writer.h",
-    "ninja_copy_target_writer.cc",
-    "ninja_copy_target_writer.h",
-    "ninja_create_bundle_target_writer.cc",
-    "ninja_create_bundle_target_writer.h",
-    "ninja_group_target_writer.cc",
-    "ninja_group_target_writer.h",
-    "ninja_target_writer.cc",
-    "ninja_target_writer.h",
-    "ninja_toolchain_writer.cc",
-    "ninja_toolchain_writer.h",
-    "ninja_utils.cc",
-    "ninja_utils.h",
-    "ninja_writer.cc",
-    "ninja_writer.h",
-    "operators.cc",
-    "operators.h",
-    "output_file.cc",
-    "output_file.h",
-    "parse_node_value_adapter.cc",
-    "parse_node_value_adapter.h",
-    "parse_tree.cc",
-    "parse_tree.h",
-    "parser.cc",
-    "parser.h",
-    "path_output.cc",
-    "path_output.h",
-    "pattern.cc",
-    "pattern.h",
-    "pool.cc",
-    "pool.h",
-    "qt_creator_writer.cc",
-    "qt_creator_writer.h",
-    "runtime_deps.cc",
-    "runtime_deps.h",
-    "scheduler.cc",
-    "scheduler.h",
-    "scope.cc",
-    "scope.h",
-    "scope_per_file_provider.cc",
-    "scope_per_file_provider.h",
-    "settings.cc",
-    "settings.h",
-    "setup.cc",
-    "setup.h",
-    "source_dir.cc",
-    "source_dir.h",
-    "source_file.cc",
-    "source_file.h",
-    "source_file_type.cc",
-    "source_file_type.h",
-    "standard_out.cc",
-    "standard_out.h",
-    "string_utils.cc",
-    "string_utils.h",
-    "substitution_list.cc",
-    "substitution_list.h",
-    "substitution_pattern.cc",
-    "substitution_pattern.h",
-    "substitution_type.cc",
-    "substitution_type.h",
-    "substitution_writer.cc",
-    "substitution_writer.h",
-    "switches.cc",
-    "switches.h",
-    "target.cc",
-    "target.h",
-    "target_generator.cc",
-    "target_generator.h",
-    "template.cc",
-    "template.h",
-    "token.cc",
-    "token.h",
-    "tokenizer.cc",
-    "tokenizer.h",
-    "tool.cc",
-    "tool.h",
-    "toolchain.cc",
-    "toolchain.h",
-    "trace.cc",
-    "trace.h",
-    "unique_vector.h",
-    "value.cc",
-    "value.h",
-    "value_extractors.cc",
-    "value_extractors.h",
-    "variables.cc",
-    "variables.h",
-    "visibility.cc",
-    "visibility.h",
-    "visual_studio_utils.cc",
-    "visual_studio_utils.h",
-    "visual_studio_writer.cc",
-    "visual_studio_writer.h",
-    "xcode_object.cc",
-    "xcode_object.h",
-    "xcode_writer.cc",
-    "xcode_writer.h",
-    "xml_element_writer.cc",
-    "xml_element_writer.h",
-  ]
-
-  deps = [
-    "//base",
-    "//base/third_party/dynamic_annotations",
-  ]
-}
-
-action("last_commit_position") {
-  script = "last_commit_position.py"
-
-  # This dependency forces a re-run when the code is synced.
-  inputs = [
-    "//build/util/LASTCHANGE",
-  ]
-
-  outfile = "$target_gen_dir/last_commit_position.h"
-  outputs = [
-    outfile,
-  ]
-
-  args = [
-    rebase_path("//", root_build_dir),
-    rebase_path(outfile, root_build_dir),
-    "TOOLS_GN_LAST_COMMIT_POSITION_H_",
-  ]
-}
-
-# Note for Windows debugging: GN is super-multithreaded and uses a lot of STL.
-# Iterator debugging on Windows does locking for every access, which ends up
-# slowing down debug runtime from 0:36 to 9:40. If you want to run debug builds
-# of GN over the large Chrome build, you will want to set the arg:
-#   enable_iterator_debugging = false
-executable("gn") {
-  defines = [ "GN_BUILD" ]
-  sources = [
-    "gn_main.cc",
-  ]
-
-  deps = [
-    ":gn_lib",
-    ":last_commit_position",
-    "//base",
-    "//build/win:default_exe_manifest",
-  ]
-}
-
-test("gn_unittests") {
-  deps = [
-    ":gn_unittests_sources",
-  ]
-
-  data = [
-    "format_test_data/",
-  ]
-}
-
-jumbo_source_set("gn_unittests_sources") {
-  testonly = true
-
-  sources = [
-    "action_target_generator_unittest.cc",
-    "analyzer_unittest.cc",
-    "args_unittest.cc",
-    "builder_unittest.cc",
-    "c_include_iterator_unittest.cc",
-    "command_format_unittest.cc",
-    "config_unittest.cc",
-    "config_values_extractors_unittest.cc",
-    "escape_unittest.cc",
-    "exec_process_unittest.cc",
-    "filesystem_utils_unittest.cc",
-    "function_foreach_unittest.cc",
-    "function_forward_variables_from_unittest.cc",
-    "function_get_label_info_unittest.cc",
-    "function_get_path_info_unittest.cc",
-    "function_get_target_outputs_unittest.cc",
-    "function_process_file_template_unittest.cc",
-    "function_rebase_path_unittest.cc",
-    "function_template_unittest.cc",
-    "function_toolchain_unittest.cc",
-    "function_write_file_unittest.cc",
-    "functions_target_unittest.cc",
-    "functions_unittest.cc",
-    "header_checker_unittest.cc",
-    "inherited_libraries_unittest.cc",
-    "input_conversion_unittest.cc",
-    "label_pattern_unittest.cc",
-    "label_unittest.cc",
-    "loader_unittest.cc",
-    "ninja_action_target_writer_unittest.cc",
-    "ninja_binary_target_writer_unittest.cc",
-    "ninja_build_writer_unittest.cc",
-    "ninja_bundle_data_target_writer_unittest.cc",
-    "ninja_copy_target_writer_unittest.cc",
-    "ninja_create_bundle_target_writer_unittest.cc",
-    "ninja_group_target_writer_unittest.cc",
-    "ninja_target_writer_unittest.cc",
-    "ninja_toolchain_writer_unittest.cc",
-    "operators_unittest.cc",
-    "parse_tree_unittest.cc",
-    "parser_unittest.cc",
-    "path_output_unittest.cc",
-    "pattern_unittest.cc",
-    "runtime_deps_unittest.cc",
-    "scope_per_file_provider_unittest.cc",
-    "scope_unittest.cc",
-    "source_dir_unittest.cc",
-    "source_file_unittest.cc",
-    "string_utils_unittest.cc",
-    "substitution_pattern_unittest.cc",
-    "substitution_writer_unittest.cc",
-    "target_unittest.cc",
-    "template_unittest.cc",
-    "test_with_scheduler.cc",
-    "test_with_scheduler.h",
-    "test_with_scope.cc",
-    "test_with_scope.h",
-    "tokenizer_unittest.cc",
-    "unique_vector_unittest.cc",
-    "value_unittest.cc",
-    "visibility_unittest.cc",
-    "visual_studio_utils_unittest.cc",
-    "visual_studio_writer_unittest.cc",
-    "xcode_object_unittest.cc",
-    "xml_element_writer_unittest.cc",
-  ]
-
-  public_deps = [
-    ":gn_lib",
-    "//base/test:run_all_unittests",
-    "//base/test:test_support",
-    "//testing/gtest",
-  ]
-}
-
-fuzzer_test("gn_parser_fuzzer") {
-  sources = [
-    "parser_fuzzer.cc",
-  ]
-  deps = [
-    ":gn_lib",
-  ]
-}
diff --git a/tools/gn/action_target_generator.cc b/tools/gn/action_target_generator.cc
index ca3986e..c0ba6c8 100644
--- a/tools/gn/action_target_generator.cc
+++ b/tools/gn/action_target_generator.cc
@@ -21,9 +21,7 @@
     const FunctionCallNode* function_call,
     Target::OutputType type,
     Err* err)
-    : TargetGenerator(target, scope, function_call, err),
-      output_type_(type) {
-}
+    : TargetGenerator(target, scope, function_call, err), output_type_(type) {}
 
 ActionTargetGenerator::~ActionTargetGenerator() = default;
 
@@ -34,9 +32,10 @@
     return;
   if (output_type_ == Target::ACTION_FOREACH && target_->sources().empty()) {
     // Foreach rules must always have some sources to have an effect.
-    *err_ = Err(function_call_, "action_foreach target has no sources.",
-        "If you don't specify any sources, there is nothing to run your\n"
-        "script over.");
+    *err_ =
+        Err(function_call_, "action_foreach target has no sources.",
+            "If you don't specify any sources, there is nothing to run your\n"
+            "script over.");
     return;
   }
 
@@ -77,14 +76,16 @@
   bool has_rsp_file_name = base::ContainsValue(required_args_substitutions,
                                                SUBSTITUTION_RSP_FILE_NAME);
   if (target_->action_values().uses_rsp_file() && !has_rsp_file_name) {
-    *err_ = Err(function_call_, "Missing {{response_file_name}} in args.",
+    *err_ = Err(
+        function_call_, "Missing {{response_file_name}} in args.",
         "This target defines response_file_contents but doesn't use\n"
         "{{response_file_name}} in the args, which means the response file\n"
         "will be unused.");
     return;
   }
   if (!target_->action_values().uses_rsp_file() && has_rsp_file_name) {
-    *err_ = Err(function_call_, "Missing response_file_contents definition.",
+    *err_ = Err(
+        function_call_, "Missing response_file_contents definition.",
         "This target uses {{response_file_name}} in the args, but does not\n"
         "define response_file_contents which means the response file\n"
         "will be empty.");
@@ -103,10 +104,8 @@
   if (!value->VerifyTypeIs(Value::STRING, err_))
     return false;
 
-  SourceFile script_file =
-      scope_->GetSourceDir().ResolveRelativeFile(
-          *value, err_,
-          scope_->settings()->build_settings()->root_path_utf8());
+  SourceFile script_file = scope_->GetSourceDir().ResolveRelativeFile(
+      *value, err_, scope_->settings()->build_settings()->root_path_utf8());
   if (err_->has_error())
     return false;
   target_->action_values().set_script(script_file);
@@ -121,9 +120,8 @@
   if (!target_->action_values().args().Parse(*value, err_))
     return false;
   if (!EnsureValidSubstitutions(
-           target_->action_values().args().required_types(),
-           &IsValidScriptArgsSubstitution,
-           value->origin(), err_))
+          target_->action_values().args().required_types(),
+          &IsValidScriptArgsSubstitution, value->origin(), err_))
     return false;
 
   return true;
@@ -137,8 +135,8 @@
   if (!target_->action_values().rsp_file_contents().Parse(*value, err_))
     return false;
   if (!EnsureValidSubstitutions(
-           target_->action_values().rsp_file_contents().required_types(),
-           &IsValidSourceSubstitution, value->origin(), err_))
+          target_->action_values().rsp_file_contents().required_types(),
+          &IsValidSourceSubstitution, value->origin(), err_))
     return false;
 
   return true;
@@ -179,15 +177,17 @@
 bool ActionTargetGenerator::CheckOutputs() {
   const SubstitutionList& outputs = target_->action_values().outputs();
   if (outputs.list().empty()) {
-    *err_ = Err(function_call_, "Action has no outputs.",
-        "If you have no outputs, the build system can not tell when your\n"
-        "script needs to be run.");
+    *err_ =
+        Err(function_call_, "Action has no outputs.",
+            "If you have no outputs, the build system can not tell when your\n"
+            "script needs to be run.");
     return false;
   }
 
   if (output_type_ == Target::ACTION) {
     if (!outputs.required_types().empty()) {
-      *err_ = Err(function_call_, "Action has patterns in the output.",
+      *err_ = Err(
+          function_call_, "Action has patterns in the output.",
           "An action target should have the outputs completely specified. If\n"
           "you want to provide a mapping from source to output, use an\n"
           "\"action_foreach\" target.");
@@ -196,8 +196,8 @@
   } else if (output_type_ == Target::ACTION_FOREACH) {
     // A foreach target should always have a pattern in the outputs.
     if (outputs.required_types().empty()) {
-      *err_ = Err(function_call_,
-          "action_foreach should have a pattern in the output.",
+      *err_ = Err(
+          function_call_, "action_foreach should have a pattern in the output.",
           "An action_foreach target should have a source expansion pattern in\n"
           "it to map source file to unique output file name. Otherwise, the\n"
           "build system can't determine when your script needs to be run.");
diff --git a/tools/gn/action_values.cc b/tools/gn/action_values.cc
index 3290da4..f73d869 100644
--- a/tools/gn/action_values.cc
+++ b/tools/gn/action_values.cc
@@ -19,10 +19,10 @@
     // The bundle_data target has no output, the real output will be generated
     // by the create_bundle target.
   } else if (target->output_type() == Target::COPY_FILES ||
-      target->output_type() == Target::ACTION_FOREACH) {
+             target->output_type() == Target::ACTION_FOREACH) {
     // Copy and foreach applies the outputs to the sources.
-    SubstitutionWriter::ApplyListToSources(
-        target, target->settings(), outputs_, target->sources(), result);
+    SubstitutionWriter::ApplyListToSources(target, target->settings(), outputs_,
+                                           target->sources(), result);
   } else {
     // Actions (and anything else that happens to specify an output) just use
     // the output list with no substitution.
diff --git a/tools/gn/analyzer.cc b/tools/gn/analyzer.cc
index c5158c5..312c22a 100644
--- a/tools/gn/analyzer.cc
+++ b/tools/gn/analyzer.cc
@@ -109,7 +109,8 @@
 }
 
 Label AbsoluteOrSourceAbsoluteStringToLabel(const Label& default_toolchain,
-                                            const std::string& s, Err* err) {
+                                            const std::string& s,
+                                            Err* err) {
   if (!IsPathSourceAbsolute(s) && !IsPathAbsolute(s)) {
     *err = Err(Location(),
                "\"" + s + "\" is not a source-absolute or absolute path.");
@@ -184,7 +185,8 @@
 }
 
 std::string OutputsToJSON(const Outputs& outputs,
-                          const Label& default_toolchain, Err *err) {
+                          const Label& default_toolchain,
+                          Err* err) {
   std::string output;
   auto value = std::make_unique<base::DictionaryValue>();
 
diff --git a/tools/gn/args.cc b/tools/gn/args.cc
index f861dd1..0d6cb9f 100644
--- a/tools/gn/args.cc
+++ b/tools/gn/args.cc
@@ -86,16 +86,10 @@
 }  // namespace
 
 Args::ValueWithOverride::ValueWithOverride()
-    : default_value(),
-      has_override(false),
-      override_value() {
-}
+    : default_value(), has_override(false), override_value() {}
 
 Args::ValueWithOverride::ValueWithOverride(const Value& def_val)
-    : default_value(def_val),
-      has_override(false),
-      override_value() {
-}
+    : default_value(def_val), has_override(false), override_value() {}
 
 Args::ValueWithOverride::~ValueWithOverride() = default;
 
@@ -106,8 +100,7 @@
       all_overrides_(other.all_overrides_),
       declared_arguments_per_toolchain_(
           other.declared_arguments_per_toolchain_),
-      toolchain_overrides_(other.toolchain_overrides_) {
-}
+      toolchain_overrides_(other.toolchain_overrides_) {}
 
 Args::~Args() = default;
 
@@ -182,8 +175,8 @@
     if (previously_declared != declared_arguments.end()) {
       if (previously_declared->second.origin() != arg.second.origin()) {
         // Declaration location mismatch.
-        *err = Err(arg.second.origin(),
-            "Duplicate build argument declaration.",
+        *err = Err(
+            arg.second.origin(), "Duplicate build argument declaration.",
             "Here you're declaring an argument that was already declared "
             "elsewhere.\nYou can only declare each argument once in the entire "
             "build so there is one\ncanonical place for documentation and the "
@@ -250,7 +243,8 @@
   const Value& value = unused_overrides.begin()->second;
 
   std::string err_help(
-      "The variable \"" + name + "\" was set as a build argument\n"
+      "The variable \"" + name +
+      "\" was set as a build argument\n"
       "but never appeared in a declare_args() block in any buildfile.\n\n"
       "To view all possible args, run \"gn args --list <out_dir>\"");
 
@@ -303,7 +297,7 @@
 #elif defined(OS_LINUX)
   os = "linux";
 #else
-  #error Unknown OS type.
+#error Unknown OS type.
 #endif
   // NOTE: Adding a new port? Please follow
   // https://chromium.googlesource.com/chromium/src/+/master/docs/new_port_policy.md
@@ -409,8 +403,7 @@
   return declared_arguments_per_toolchain_[scope->settings()];
 }
 
-Scope::KeyValueMap& Args::OverridesForToolchainLocked(
-    Scope* scope) const {
+Scope::KeyValueMap& Args::OverridesForToolchainLocked(Scope* scope) const {
   lock_.AssertAcquired();
   return toolchain_overrides_[scope->settings()];
 }
diff --git a/tools/gn/args.h b/tools/gn/args.h
index 4d768c7..5e32733 100644
--- a/tools/gn/args.h
+++ b/tools/gn/args.h
@@ -34,7 +34,7 @@
 
     Value default_value;  // Default value given in declare_args.
 
-    bool has_override;  // True indicates override_value is valid.
+    bool has_override;     // True indicates override_value is valid.
     Value override_value;  // From .gn or the current build's "gn args".
   };
   using ValueWithOverrideMap = std::map<base::StringPiece, ValueWithOverride>;
diff --git a/tools/gn/binary_target_generator.cc b/tools/gn/binary_target_generator.cc
index 4ff9366..60af242 100644
--- a/tools/gn/binary_target_generator.cc
+++ b/tools/gn/binary_target_generator.cc
@@ -20,9 +20,7 @@
     const FunctionCallNode* function_call,
     Target::OutputType type,
     Err* err)
-    : TargetGenerator(target, scope, function_call, err),
-      output_type_(type) {
-}
+    : TargetGenerator(target, scope, function_call, err), output_type_(type) {}
 
 BinaryTargetGenerator::~BinaryTargetGenerator() = default;
 
@@ -127,8 +125,8 @@
   if (err_->has_error())
     return false;
 
-  if (!EnsureStringIsInOutputDir(build_settings->build_dir(),
-                                 dir.value(), value->origin(), err_))
+  if (!EnsureStringIsInOutputDir(build_settings->build_dir(), dir.value(),
+                                 value->origin(), err_))
     return false;
   target_->set_output_dir(dir);
   return true;
@@ -145,8 +143,8 @@
 }
 
 bool BinaryTargetGenerator::FillAllowCircularIncludesFrom() {
-  const Value* value = scope_->GetValue(
-      variables::kAllowCircularIncludesFrom, true);
+  const Value* value =
+      scope_->GetValue(variables::kAllowCircularIncludesFrom, true);
   if (!value)
     return true;
 
@@ -167,10 +165,11 @@
     }
     if (!found_dep) {
       *err_ = Err(*value, "Label not in deps.",
-          "The label \"" + cur.GetUserVisibleName(false) +
-          "\"\nwas not in the deps of this target. "
-          "allow_circular_includes_from only allows\ntargets present in the "
-          "deps.");
+                  "The label \"" + cur.GetUserVisibleName(false) +
+                      "\"\nwas not in the deps of this target. "
+                      "allow_circular_includes_from only allows\ntargets "
+                      "present in the "
+                      "deps.");
       return false;
     }
   }
diff --git a/tools/gn/build_settings.cc b/tools/gn/build_settings.cc
index 79b8365..84f2a3c 100644
--- a/tools/gn/build_settings.cc
+++ b/tools/gn/build_settings.cc
@@ -59,8 +59,7 @@
   return file.Resolve(secondary_source_path_).NormalizePathSeparatorsTo('/');
 }
 
-base::FilePath BuildSettings::GetFullPathSecondary(
-    const SourceDir& dir) const {
+base::FilePath BuildSettings::GetFullPathSecondary(const SourceDir& dir) const {
   return dir.Resolve(secondary_source_path_).NormalizePathSeparatorsTo('/');
 }
 
diff --git a/tools/gn/builder.cc b/tools/gn/builder.cc
index ec45e6c..1d04db0 100644
--- a/tools/gn/builder.cc
+++ b/tools/gn/builder.cc
@@ -54,8 +54,7 @@
 
 }  // namespace
 
-Builder::Builder(Loader* loader) : loader_(loader) {
-}
+Builder::Builder(Loader* loader) : loader_(loader) {}
 
 Builder::~Builder() = default;
 
@@ -76,10 +75,10 @@
   // Check that it's not been already defined.
   if (record->item()) {
     err = Err(item->defined_from(), "Duplicate definition.",
-        "The item\n  " + item->label().GetUserVisibleName(false) +
-        "\nwas already defined.");
-    err.AppendSubErr(Err(record->item()->defined_from(),
-                         "Previous definition:"));
+              "The item\n  " + item->label().GetUserVisibleName(false) +
+                  "\nwas already defined.");
+    err.AppendSubErr(
+        Err(record->item()->defined_from(), "Previous definition:"));
     g_scheduler->FailWithError(err);
     return;
   }
@@ -195,8 +194,8 @@
       // Check dependencies.
       for (auto* dest : src->unresolved_deps()) {
         if (!dest->item()) {
-          depstring += src->label().GetUserVisibleName(true) +
-              "\n  needs " + dest->label().GetUserVisibleName(true) + "\n";
+          depstring += src->label().GetUserVisibleName(true) + "\n  needs " +
+                       dest->label().GetUserVisibleName(true) + "\n";
         }
       }
     }
@@ -213,11 +212,12 @@
     depstring = CheckForCircularDependencies(bad_records);
     if (depstring.empty()) {
       // Something's very wrong, just dump out the bad nodes.
-      depstring = "I have no idea what went wrong, but these are unresolved, "
+      depstring =
+          "I have no idea what went wrong, but these are unresolved, "
           "possibly due to an\ninternal error:";
       for (auto* bad_record : bad_records) {
-        depstring += "\n\"" +
-            bad_record->label().GetUserVisibleName(false) + "\"";
+        depstring +=
+            "\n\"" + bad_record->label().GetUserVisibleName(false) + "\"";
       }
       *err = Err(Location(), "", depstring);
     } else {
@@ -316,16 +316,16 @@
   // Check types.
   if (record->type() != type) {
     std::string msg =
-        "The type of " + label.GetUserVisibleName(false) +
-        "\nhere is a " + BuilderRecord::GetNameForType(type) +
-        " but was previously seen as a " +
-        BuilderRecord::GetNameForType(record->type()) + ".\n\n"
+        "The type of " + label.GetUserVisibleName(false) + "\nhere is a " +
+        BuilderRecord::GetNameForType(type) + " but was previously seen as a " +
+        BuilderRecord::GetNameForType(record->type()) +
+        ".\n\n"
         "The most common cause is that the label of a config was put in the\n"
         "in the deps section of a target (or vice-versa).";
     *err = Err(request_from, "Item type does not match.", msg);
     if (record->originally_referenced_from()) {
-      err->AppendSubErr(Err(record->originally_referenced_from(),
-                            std::string()));
+      err->AppendSubErr(
+          Err(record->originally_referenced_from(), std::string()));
     }
     return nullptr;
   }
@@ -340,24 +340,27 @@
   BuilderRecord* record = GetRecord(label);
   if (!record) {
     *err = Err(origin, "Item not found",
-        "\"" + label.GetUserVisibleName(false) + "\" doesn't\n"
-        "refer to an existent thing.");
+               "\"" + label.GetUserVisibleName(false) +
+                   "\" doesn't\n"
+                   "refer to an existent thing.");
     return nullptr;
   }
 
   const Item* item = record->item();
   if (!item) {
-    *err = Err(origin, "Item not resolved.",
+    *err = Err(
+        origin, "Item not resolved.",
         "\"" + label.GetUserVisibleName(false) + "\" hasn't been resolved.\n");
     return nullptr;
   }
 
   if (!BuilderRecord::IsItemOfType(item, type)) {
-    *err = Err(origin,
-        std::string("This is not a ") + BuilderRecord::GetNameForType(type),
-        "\"" + label.GetUserVisibleName(false) + "\" refers to a " +
-        item->GetItemTypeName() + " instead of a " +
-        BuilderRecord::GetNameForType(type) + ".");
+    *err =
+        Err(origin,
+            std::string("This is not a ") + BuilderRecord::GetNameForType(type),
+            "\"" + label.GetUserVisibleName(false) + "\" refers to a " +
+                item->GetItemTypeName() + " instead of a " +
+                BuilderRecord::GetNameForType(type) + ".");
     return nullptr;
   }
   return record;
@@ -431,8 +434,7 @@
   return true;
 }
 
-void Builder::RecursiveSetShouldGenerate(BuilderRecord* record,
-                                         bool force) {
+void Builder::RecursiveSetShouldGenerate(BuilderRecord* record, bool force) {
   if (!record->should_generate()) {
     record->set_should_generate(true);
 
@@ -453,8 +455,7 @@
 
 void Builder::ScheduleItemLoadIfNecessary(BuilderRecord* record) {
   const ParseNode* origin = record->originally_referenced_from();
-  loader_->Load(record->label(),
-                origin ? origin->GetRange() : LocationRange());
+  loader_->Load(record->label(), origin ? origin->GetRange() : LocationRange());
 }
 
 bool Builder::ResolveItem(BuilderRecord* record, Err* err) {
@@ -536,10 +537,10 @@
       target->settings()->toolchain_label(), target->defined_from(),
       BuilderRecord::ITEM_TOOLCHAIN, err);
   if (!record) {
-    *err = Err(target->defined_from(),
-        "Toolchain for target not defined.",
+    *err = Err(
+        target->defined_from(), "Toolchain for target not defined.",
         "I was hoping to find a toolchain " +
-        target->settings()->toolchain_label().GetUserVisibleName(false));
+            target->settings()->toolchain_label().GetUserVisibleName(false));
     return false;
   }
 
diff --git a/tools/gn/builder.h b/tools/gn/builder.h
index 58ccbad..973ee6a 100644
--- a/tools/gn/builder.h
+++ b/tools/gn/builder.h
@@ -98,9 +98,7 @@
   bool AddActionValuesDep(BuilderRecord* record,
                           const ActionValues& action_values,
                           Err* err);
-  bool AddToolchainDep(BuilderRecord* record,
-                       const Target* target,
-                       Err* err);
+  bool AddToolchainDep(BuilderRecord* record, const Target* target, Err* err);
 
   // Given a target, sets the "should generate" bit and pushes it through the
   // dependency tree. Any time the bit it set, we ensure that the given item is
diff --git a/tools/gn/builder_record.cc b/tools/gn/builder_record.cc
index 665baae..36fd465 100644
--- a/tools/gn/builder_record.cc
+++ b/tools/gn/builder_record.cc
@@ -11,8 +11,7 @@
       label_(label),
       originally_referenced_from_(nullptr),
       should_generate_(false),
-      resolved_(false) {
-}
+      resolved_(false) {}
 
 BuilderRecord::~BuilderRecord() = default;
 
diff --git a/tools/gn/builder_record.h b/tools/gn/builder_record.h
index 7643b47..dc96f7f 100644
--- a/tools/gn/builder_record.h
+++ b/tools/gn/builder_record.h
@@ -74,9 +74,7 @@
   bool resolved() const { return resolved_; }
   void set_resolved(bool r) { resolved_ = r; }
 
-  bool can_resolve() const {
-    return item_ && unresolved_deps_.empty();
-  }
+  bool can_resolve() const { return item_ && unresolved_deps_.empty(); }
 
   // All records this one is depending on.
   BuilderRecordSet& all_deps() { return all_deps_; }
diff --git a/tools/gn/builder_unittest.cc b/tools/gn/builder_unittest.cc
index 3c564f8..9ced909 100644
--- a/tools/gn/builder_unittest.cc
+++ b/tools/gn/builder_unittest.cc
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "test/test.h"
 #include "tools/gn/builder.h"
+#include "test/test.h"
 #include "tools/gn/config.h"
 #include "tools/gn/loader.h"
 #include "tools/gn/target.h"
@@ -28,9 +28,7 @@
     return nullptr;
   }
 
-  bool HasLoadedNone() const {
-    return files_.empty();
-  }
+  bool HasLoadedNone() const { return files_.empty(); }
 
   // Returns true if one/two loads have been requested and they match the given
   // file(s). This will clear the records so it will be empty for the next call.
@@ -49,9 +47,8 @@
       return false;
     }
 
-    bool match = (
-        (files_[0] == a && files_[1] == b) ||
-        (files_[0] == b && files_[1] == a));
+    bool match = ((files_[0] == a && files_[1] == b) ||
+                  (files_[0] == b && files_[1] == a));
     files_.clear();
     return match;
   }
@@ -135,8 +132,7 @@
   EXPECT_EQ(1u, a_record->unresolved_deps().size());
   EXPECT_NE(a_record->all_deps().end(),
             a_record->all_deps().find(toolchain_record));
-  EXPECT_NE(a_record->all_deps().end(),
-            a_record->all_deps().find(b_record));
+  EXPECT_NE(a_record->all_deps().end(), a_record->all_deps().find(b_record));
   EXPECT_NE(a_record->unresolved_deps().end(),
             a_record->unresolved_deps().find(b_record));
 
@@ -195,10 +191,10 @@
 
   // Construct a dependency chain: A -> B. A is in the default toolchain, B
   // is not.
-  Label a_label(SourceDir("//foo/"), "a",
-                settings_.toolchain_label().dir(), "a");
-  Label b_label(SourceDir("//foo/"), "b",
-                toolchain_label2.dir(), toolchain_label2.name());
+  Label a_label(SourceDir("//foo/"), "a", settings_.toolchain_label().dir(),
+                "a");
+  Label b_label(SourceDir("//foo/"), "b", toolchain_label2.dir(),
+                toolchain_label2.name());
 
   // First define B.
   Target* b = new Target(&settings2, b_label);
diff --git a/tools/gn/bundle_data.cc b/tools/gn/bundle_data.cc
index 5027691..9f2cf2b 100644
--- a/tools/gn/bundle_data.cc
+++ b/tools/gn/bundle_data.cc
@@ -120,9 +120,8 @@
     outputs->push_back(OutputFile(settings->build_settings(), source_file));
 }
 
-void BundleData::GetOutputsAsSourceFiles(
-    const Settings* settings,
-    SourceFiles* outputs_as_source) const {
+void BundleData::GetOutputsAsSourceFiles(const Settings* settings,
+                                         SourceFiles* outputs_as_source) const {
   for (const BundleFileRule& file_rule : file_rules_) {
     for (const SourceFile& source : file_rule.sources()) {
       outputs_as_source->push_back(
diff --git a/tools/gn/bundle_data.h b/tools/gn/bundle_data.h
index 5264b9e..dc63bbd 100644
--- a/tools/gn/bundle_data.h
+++ b/tools/gn/bundle_data.h
@@ -44,13 +44,11 @@
   void GetSourceFiles(SourceFiles* sources) const;
 
   // Returns the list of outputs.
-  void GetOutputFiles(const Settings* settings,
-                      OutputFiles* outputs) const;
+  void GetOutputFiles(const Settings* settings, OutputFiles* outputs) const;
 
   // Returns the list of outputs as SourceFile.
-  void GetOutputsAsSourceFiles(
-      const Settings* settings,
-      SourceFiles* outputs_as_source) const;
+  void GetOutputsAsSourceFiles(const Settings* settings,
+                               SourceFiles* outputs_as_source) const;
 
   // Returns the path to the compiled asset catalog. Only valid if
   // assets_catalog_sources() is not empty.
diff --git a/tools/gn/bundle_data_target_generator.cc b/tools/gn/bundle_data_target_generator.cc
index 32a421a..23f26fd 100644
--- a/tools/gn/bundle_data_target_generator.cc
+++ b/tools/gn/bundle_data_target_generator.cc
@@ -15,7 +15,8 @@
     Target* target,
     Scope* scope,
     const FunctionCallNode* function_call,
-    Err* err) : TargetGenerator(target, scope, function_call, err) {}
+    Err* err)
+    : TargetGenerator(target, scope, function_call, err) {}
 
 BundleDataTargetGenerator::~BundleDataTargetGenerator() = default;
 
@@ -28,13 +29,14 @@
     return;
 
   if (target_->sources().empty()) {
-    *err_ = Err(function_call_, "Empty sources for bundle_data target."
-        "You have to specify at least one file in the \"sources\".");
+    *err_ = Err(function_call_,
+                "Empty sources for bundle_data target."
+                "You have to specify at least one file in the \"sources\".");
     return;
   }
   if (target_->action_values().outputs().list().size() != 1) {
-    *err_ = Err(function_call_,
-        "Target bundle_data must have exactly one ouput.",
+    *err_ = Err(
+        function_call_, "Target bundle_data must have exactly one ouput.",
         "You must specify exactly one value in the \"output\" array for the"
         "destination\ninto the generated bundle (see \"gn help bundle_data\"). "
         "If there are multiple\nsources to copy, use source expansion (see "
@@ -56,9 +58,9 @@
   for (SubstitutionType type : outputs.required_types()) {
     if (!IsValidBundleDataSubstitution(type)) {
       *err_ = Err(value->origin(), "Invalid substitution type.",
-          "The substitution " + std::string(kSubstitutionNames[type]) +
-          " isn't valid for something\n"
-          "operating on a bundle_data file such as this.");
+                  "The substitution " + std::string(kSubstitutionNames[type]) +
+                      " isn't valid for something\n"
+                      "operating on a bundle_data file such as this.");
       return false;
     }
   }
@@ -86,9 +88,8 @@
   if (SubstitutionIsInBundleDir(pattern.ranges()[0].type))
     return true;
 
-  *err_ = Err(original_value,
-      "File is not inside bundle directory.",
-      "The given file should be in the output directory. Normally you\n"
-      "would specify {{bundle_resources_dir}} or such substitution.");
+  *err_ = Err(original_value, "File is not inside bundle directory.",
+              "The given file should be in the output directory. Normally you\n"
+              "would specify {{bundle_resources_dir}} or such substitution.");
   return false;
 }
diff --git a/tools/gn/bundle_data_target_generator.h b/tools/gn/bundle_data_target_generator.h
index 49bcc45..e1788ef 100644
--- a/tools/gn/bundle_data_target_generator.h
+++ b/tools/gn/bundle_data_target_generator.h
@@ -23,9 +23,8 @@
  private:
   bool FillOutputs();
 
-  bool EnsureSubstitutionIsInBundleDir(
-      const SubstitutionPattern& pattern,
-      const Value& original_value);
+  bool EnsureSubstitutionIsInBundleDir(const SubstitutionPattern& pattern,
+                                       const Value& original_value);
 
   DISALLOW_COPY_AND_ASSIGN(BundleDataTargetGenerator);
 };
diff --git a/tools/gn/c_include_iterator.cc b/tools/gn/c_include_iterator.cc
index 29ead0b..9f4f070 100644
--- a/tools/gn/c_include_iterator.cc
+++ b/tools/gn/c_include_iterator.cc
@@ -50,7 +50,7 @@
     return false;  // Don't count preprocessor.
   if (base::ContainsOnlyChars(line, base::kWhitespaceASCII))
     return false;  // Don't count whitespace lines.
-  return true;  // Count everything else.
+  return true;     // Count everything else.
 }
 
 // Given a line, checks to see if it looks like an include or import and
@@ -119,8 +119,7 @@
       file_(input->contents()),
       offset_(0),
       line_number_(0),
-      lines_since_last_include_(0) {
-}
+      lines_since_last_include_(0) {}
 
 CIncludeIterator::~CIncludeIterator() = default;
 
@@ -137,12 +136,9 @@
       // Only count user includes for now.
       *out = include_contents;
       *location = LocationRange(
-          Location(input_file_,
-                   cur_line_number,
-                   begin_char,
+          Location(input_file_, cur_line_number, begin_char,
                    -1 /* TODO(scottmg): Is this important? */),
-          Location(input_file_,
-                   cur_line_number,
+          Location(input_file_, cur_line_number,
                    begin_char + static_cast<int>(include_contents.size()),
                    -1 /* TODO(scottmg): Is this important? */));
 
diff --git a/tools/gn/c_include_iterator_unittest.cc b/tools/gn/c_include_iterator_unittest.cc
index 58dda68..c4d2bc7 100644
--- a/tools/gn/c_include_iterator_unittest.cc
+++ b/tools/gn/c_include_iterator_unittest.cc
@@ -12,7 +12,9 @@
 namespace {
 
 bool RangeIs(const LocationRange& range,
-             int line, int begin_char, int end_char) {
+             int line,
+             int begin_char,
+             int end_char) {
   return range.begin().line_number() == line &&
          range.end().line_number() == line &&
          range.begin().column_number() == begin_char &&
diff --git a/tools/gn/command_args.cc b/tools/gn/command_args.cc
index e7721ad..4a547c7 100644
--- a/tools/gn/command_args.cc
+++ b/tools/gn/command_args.cc
@@ -27,6 +27,7 @@
 
 #if defined(OS_WIN)
 #include <windows.h>
+
 #include <shellapi.h>
 #endif
 
@@ -81,7 +82,7 @@
                         std::string* location_str,
                         int* line_no,
                         std::string* comment,
-                        bool pad_comment=true) {
+                        bool pad_comment = true) {
   Location location = value.origin()->GetRange().begin();
   const InputFile* file = location.file();
   if (!file)
@@ -144,8 +145,8 @@
       int line_no;
       std::string location, comment;
       GetContextForValue(val.override_value, &location, &line_no, &comment);
-      OutputString("      From " + location + ":" + base::IntToString(line_no)
-                   + "\n");
+      OutputString("      From " + location + ":" + base::IntToString(line_no) +
+                   "\n");
     }
     OutputString("    Overridden from the default = ");
     PrintDefaultValueInfo(name, val.default_value);
@@ -218,8 +219,10 @@
     auto found = args.find(list_value);
     if (found == args.end()) {
       Err(Location(), "Unknown build argument.",
-          "You asked for \"" + list_value + "\" which I didn't find in any "
-          "build file\nassociated with this build.").PrintToStdout();
+          "You asked for \"" + list_value +
+              "\" which I didn't find in any "
+              "build file\nassociated with this build.")
+          .PrintToStdout();
       return 1;
     }
 
@@ -290,8 +293,8 @@
   info.lpClass = L".txt";
   if (!::ShellExecuteEx(&info)) {
     Err(Location(), "Couldn't run editor.",
-        "Just edit \"" + FilePathToUTF8(file_to_edit) +
-        "\" manually instead.").PrintToStdout();
+        "Just edit \"" + FilePathToUTF8(file_to_edit) + "\" manually instead.")
+        .PrintToStdout();
     return false;
   }
 
@@ -331,8 +334,7 @@
   cmd.append(escaped_name);
   cmd.push_back('"');
 
-  OutputString("Waiting for editor on \"" + file_to_edit.value() +
-               "\"...\n");
+  OutputString("Waiting for editor on \"" + file_to_edit.value() + "\"...\n");
   return system(cmd.c_str()) == 0;
 }
 
@@ -381,8 +383,8 @@
 #if defined(OS_WIN)
       // Use Windows lineendings for this file since it will often open in
       // Notepad which can't handle Unix ones.
-      base::ReplaceSubstringsAfterOffset(
-          &argfile_default_contents, 0, "\n", "\r\n");
+      base::ReplaceSubstringsAfterOffset(&argfile_default_contents, 0, "\n",
+                                         "\r\n");
 #endif
       base::CreateDirectory(arg_file.DirName());
       base::WriteFile(arg_file, argfile_default_contents.c_str(),
@@ -492,7 +494,8 @@
   if (args.size() != 1) {
     Err(Location(), "Exactly one build dir needed.",
         "Usage: \"gn args <out_dir>\"\n"
-        "Or see \"gn help args\" for more variants.").PrintToStdout();
+        "Or see \"gn help args\" for more variants.")
+        .PrintToStdout();
     return 1;
   }
 
diff --git a/tools/gn/command_check.cc b/tools/gn/command_check.cc
index 4efcd45..99fbff5 100644
--- a/tools/gn/command_check.cc
+++ b/tools/gn/command_check.cc
@@ -53,8 +53,7 @@
 )";
 
 const char kCheck[] = "check";
-const char kCheck_HelpShort[] =
-    "check: Check header dependencies.";
+const char kCheck_HelpShort[] = "check: Check header dependencies.";
 const char kCheck_Help[] =
     R"(gn check <out_dir> [<label_pattern>] [--force]
 
@@ -166,7 +165,8 @@
 int RunCheck(const std::vector<std::string>& args) {
   if (args.size() != 1 && args.size() != 2) {
     Err(Location(), "You're holding it wrong.",
-        "Usage: \"gn check <out_dir> [<target_label>]\"").PrintToStdout();
+        "Usage: \"gn check <out_dir> [<target_label>]\"")
+        .PrintToStdout();
     return 1;
   }
 
@@ -189,17 +189,17 @@
     UniqueVector<const Config*> config_matches;
     UniqueVector<const Toolchain*> toolchain_matches;
     UniqueVector<SourceFile> file_matches;
-    if (!ResolveFromCommandLineInput(setup, inputs, false,
-                                     &target_matches, &config_matches,
-                                     &toolchain_matches, &file_matches))
+    if (!ResolveFromCommandLineInput(setup, inputs, false, &target_matches,
+                                     &config_matches, &toolchain_matches,
+                                     &file_matches))
       return 1;
 
     if (target_matches.size() == 0) {
       OutputString("No matching targets.\n");
       return 1;
     }
-    targets_to_check.insert(targets_to_check.begin(),
-                            target_matches.begin(), target_matches.end());
+    targets_to_check.insert(targets_to_check.begin(), target_matches.begin(),
+                            target_matches.end());
   } else {
     // No argument means to check everything allowed by the filter in
     // the build config file.
diff --git a/tools/gn/command_clean.cc b/tools/gn/command_clean.cc
index 8165aaa..9583032 100644
--- a/tools/gn/command_clean.cc
+++ b/tools/gn/command_clean.cc
@@ -48,8 +48,7 @@
 namespace commands {
 
 const char kClean[] = "clean";
-const char kClean_HelpShort[] =
-    "clean: Cleans the output directory.";
+const char kClean_HelpShort[] = "clean: Cleans the output directory.";
 const char kClean_Help[] =
     "gn clean <out_dir>\n"
     "\n"
@@ -58,8 +57,8 @@
 
 int RunClean(const std::vector<std::string>& args) {
   if (args.size() != 1) {
-    Err(Location(), "You're holding it wrong.",
-        "Usage: \"gn clean <out_dir>\"").PrintToStdout();
+    Err(Location(), "You're holding it wrong.", "Usage: \"gn clean <out_dir>\"")
+        .PrintToStdout();
     return 1;
   }
 
diff --git a/tools/gn/command_desc.cc b/tools/gn/command_desc.cc
index 9bd68e4..f8b53ce 100644
--- a/tools/gn/command_desc.cc
+++ b/tools/gn/command_desc.cc
@@ -343,9 +343,9 @@
 Shared flags
 )"
 
-ALL_TOOLCHAINS_SWITCH_HELP
+    ALL_TOOLCHAINS_SWITCH_HELP
 
-R"(
+    R"(
   --format=json
       Format the output as JSON instead of text.
 
@@ -382,10 +382,9 @@
 )"
 
     TARGET_PRINTING_MODE_COMMAND_LINE_HELP
-"\n"
-    TARGET_TESTONLY_FILTER_COMMAND_LINE_HELP
+    "\n" TARGET_TESTONLY_FILTER_COMMAND_LINE_HELP
 
-R"(
+    R"(
   --tree
       Print a dependency tree. By default, duplicates will be elided with "..."
       but when --all and -tree are used together, no eliding will be performed.
@@ -397,9 +396,9 @@
       --type, --testonly.
 )"
 
-TARGET_TYPE_FILTER_COMMAND_LINE_HELP
+    TARGET_TYPE_FILTER_COMMAND_LINE_HELP
 
-R"(Note
+    R"(Note
 
   This command will show the full name of directories and source files, but
   when directories and source paths are written to the build file, they will be
@@ -457,8 +456,9 @@
   bool json = cmdline->GetSwitchValueASCII("format") == "json";
 
   if (target_matches.empty() && config_matches.empty()) {
-    OutputString("The input " + args[1] +
-                 " matches no targets, configs or files.\n", DECORATION_YELLOW);
+    OutputString(
+        "The input " + args[1] + " matches no targets, configs or files.\n",
+        DECORATION_YELLOW);
     return 1;
   }
 
diff --git a/tools/gn/command_format.cc b/tools/gn/command_format.cc
index c44f637..2d6cea4 100644
--- a/tools/gn/command_format.cc
+++ b/tools/gn/command_format.cc
@@ -29,8 +29,7 @@
 const char kSwitchStdin[] = "stdin";
 
 const char kFormat[] = "format";
-const char kFormat_HelpShort[] =
-    "format: Format .gn file.";
+const char kFormat_HelpShort[] = "format: Format .gn file.";
 const char kFormat_Help[] =
     R"(gn format [--dump-tree] (--stdin | <build_file>)
 
@@ -93,8 +92,10 @@
 };
 
 int CountLines(const std::string& str) {
-  return static_cast<int>(base::SplitStringPiece(
-      str, "\n", base::KEEP_WHITESPACE, base::SPLIT_WANT_ALL).size());
+  return static_cast<int>(base::SplitStringPiece(str, "\n",
+                                                 base::KEEP_WHITESPACE,
+                                                 base::SPLIT_WANT_ALL)
+                              .size());
 }
 
 class Printer {
@@ -431,8 +432,8 @@
 }
 
 bool Printer::ExceedsMaximumWidth(const std::string& output) {
-  for (const auto& line : base::SplitString(
-           output, "\n", base::KEEP_WHITESPACE, base::SPLIT_WANT_ALL)) {
+  for (const auto& line : base::SplitString(output, "\n", base::KEEP_WHITESPACE,
+                                            base::SPLIT_WANT_ALL)) {
     if (line.size() > kMaximumWidth)
       return true;
   }
@@ -541,15 +542,13 @@
                                  binop->op().value() == "||"));
     Printer sub_left;
     InitializeSub(&sub_left);
-    sub_left.Expr(binop->left(),
-                  prec_left,
+    sub_left.Expr(binop->left(), prec_left,
                   std::string(" ") + binop->op().value().as_string());
     bool left_is_multiline = CountLines(sub_left.String()) > 1;
     // Avoid walking the whole left redundantly times (see timing of Format.046)
     // so pull the output and comments from subprinter.
     Print(sub_left.String().substr(start_column));
-    std::copy(sub_left.comments_.begin(),
-              sub_left.comments_.end(),
+    std::copy(sub_left.comments_.begin(), sub_left.comments_.end(),
               std::back_inserter(comments_));
 
     // Single line.
@@ -604,8 +603,7 @@
         ExceedsMaximumWidth(sub2.String()) &&
         (!tried_rhs_multiline || ExceedsMaximumWidth(sub3.String()));
 
-    if (penalty_current_line < penalty_next_line ||
-        exceeds_maximum_all_ways) {
+    if (penalty_current_line < penalty_next_line || exceeds_maximum_all_ways) {
       Print(" ");
       Expr(binop->right(), prec_right, std::string());
     } else if (tried_rhs_multiline &&
@@ -625,16 +623,14 @@
     stack_.pop_back();
     penalty += (CurrentLine() - start_line) * GetPenaltyForLineBreak();
   } else if (const BlockNode* block = root->AsBlock()) {
-    Sequence(
-        kSequenceStyleBracedBlock, block->statements(), block->End(), false);
+    Sequence(kSequenceStyleBracedBlock, block->statements(), block->End(),
+             false);
   } else if (const ConditionNode* condition = root->AsConditionNode()) {
     Print("if (");
     // TODO(scottmg): The { needs to be included in the suffix here.
     Expr(condition->condition(), kPrecedenceLowest, ") ");
-    Sequence(kSequenceStyleBracedBlock,
-             condition->if_true()->statements(),
-             condition->if_true()->End(),
-             false);
+    Sequence(kSequenceStyleBracedBlock, condition->if_true()->statements(),
+             condition->if_true()->End(), false);
     if (condition->if_false()) {
       Print(" else ");
       // If it's a block it's a bare 'else', otherwise it's an 'else if'. See
@@ -645,8 +641,7 @@
       } else {
         Sequence(kSequenceStyleBracedBlock,
                  condition->if_false()->AsBlock()->statements(),
-                 condition->if_false()->AsBlock()->End(),
-                 false);
+                 condition->if_false()->AsBlock()->End(), false);
       }
     }
   } else if (const FunctionCallNode* func_call = root->AsFunctionCall()) {
@@ -657,8 +652,8 @@
   } else if (const ListNode* list = root->AsList()) {
     bool force_multiline =
         list->prefer_multiline() && !list->contents().empty();
-    Sequence(
-        kSequenceStyleList, list->contents(), list->End(), force_multiline);
+    Sequence(kSequenceStyleList, list->contents(), list->End(),
+             force_multiline);
   } else if (const LiteralNode* literal = root->AsLiteral()) {
     Print(literal->value().value());
   } else if (const UnaryOpNode* unaryop = root->AsUnaryOp()) {
@@ -678,8 +673,7 @@
   // Defer any end of line comment until we reach the newline.
   if (root->comments() && !root->comments()->suffix().empty()) {
     std::copy(root->comments()->suffix().begin(),
-              root->comments()->suffix().end(),
-              std::back_inserter(comments_));
+              root->comments()->suffix().end(), std::back_inserter(comments_));
   }
 
   Print(at_end);
@@ -712,8 +706,7 @@
     Print(" ");
   } else {
     stack_.push_back(IndentState(margin() + kIndentSize,
-                                 style == kSequenceStyleList,
-                                 false));
+                                 style == kSequenceStyleList, false));
     size_t i = 0;
     for (const auto& x : list) {
       Newline();
@@ -755,8 +748,7 @@
     // Defer any end of line comment until we reach the newline.
     if (end->comments() && !end->comments()->suffix().empty()) {
       std::copy(end->comments()->suffix().begin(),
-        end->comments()->suffix().end(),
-        std::back_inserter(comments_));
+                end->comments()->suffix().end(), std::back_inserter(comments_));
     }
   }
 
@@ -879,8 +871,7 @@
   } else {
     if (penalty_multiline_start_next_line < penalty_multiline_start_same_line) {
       stack_.push_back(IndentState(margin() + kIndentSize * 2,
-                                   continuation_requires_indent,
-                                   false));
+                                   continuation_requires_indent, false));
       Newline();
     } else {
       stack_.push_back(
@@ -928,10 +919,8 @@
 
   if (have_block) {
     Print(" ");
-    Sequence(kSequenceStyleBracedBlock,
-             func_call->block()->statements(),
-             func_call->block()->End(),
-             false);
+    Sequence(kSequenceStyleBracedBlock, func_call->block()->statements(),
+             func_call->block()->End(), false);
   }
   return penalty + (CurrentLine() - start_line) * GetPenaltyForLineBreak();
 }
@@ -1078,8 +1067,8 @@
       SourceDirForCurrentDirectory(setup.build_settings().root_path());
 
   Err err;
-  SourceFile file = source_dir.ResolveRelativeFile(Value(nullptr, args[0]),
-                                                   &err);
+  SourceFile file =
+      source_dir.ResolveRelativeFile(Value(nullptr, args[0]), &err);
   if (err.has_error()) {
     err.PrintToStdout();
     return 1;
@@ -1094,18 +1083,19 @@
       if (!base::ReadFileToString(to_write, &original_contents)) {
         Err(Location(), std::string("Couldn't read \"") +
                             to_write.AsUTF8Unsafe() +
-                            std::string("\" for comparison.")).PrintToStdout();
+                            std::string("\" for comparison."))
+            .PrintToStdout();
         return 1;
       }
       if (dry_run)
         return original_contents == output_string ? 0 : 2;
       if (original_contents != output_string) {
-        if (base::WriteFile(to_write,
-                            output_string.data(),
+        if (base::WriteFile(to_write, output_string.data(),
                             static_cast<int>(output_string.size())) == -1) {
           Err(Location(),
               std::string("Failed to write formatted output back to \"") +
-                  to_write.AsUTF8Unsafe() + std::string("\".")).PrintToStdout();
+                  to_write.AsUTF8Unsafe() + std::string("\"."))
+              .PrintToStdout();
           return 1;
         }
         printf("Wrote formatted to '%s'.\n", to_write.AsUTF8Unsafe().c_str());
diff --git a/tools/gn/command_format.h b/tools/gn/command_format.h
index 97c3e4c..413937e 100644
--- a/tools/gn/command_format.h
+++ b/tools/gn/command_format.h
@@ -24,4 +24,3 @@
 }  // namespace commands
 
 #endif  // TOOLS_GN_COMAND_FORMAT_H_
-
diff --git a/tools/gn/command_gen.cc b/tools/gn/command_gen.cc
index be59240..0b291f2 100644
--- a/tools/gn/command_gen.cc
+++ b/tools/gn/command_gen.cc
@@ -61,8 +61,8 @@
 
   {
     base::AutoLock lock(write_info->lock);
-    write_info->rules[target->toolchain()].emplace_back(
-        target, std::move(rule));
+    write_info->rules[target->toolchain()].emplace_back(target,
+                                                        std::move(rule));
   }
 }
 
@@ -136,7 +136,8 @@
   }
 
   Err(Location(), "Input to " + target_str + " not generated by a dependency.",
-      err).PrintToStdout();
+      err)
+      .PrintToStdout();
 }
 
 bool CheckForInvalidGeneratedInputs(Setup* setup) {
@@ -171,7 +172,8 @@
 
   if (errors_found > 1) {
     OutputString(base::StringPrintf("\n%d generated input errors found.\n",
-                                    errors_found), DECORATION_YELLOW);
+                                    errors_found),
+                 DECORATION_YELLOW);
   }
   return false;
 }
@@ -394,7 +396,8 @@
   if (args.size() != 1) {
     Err(Location(), "Need exactly one build directory to generate.",
         "I expected something more like \"gn gen out/foo\"\n"
-        "You can also see \"gn help gen\".").PrintToStdout();
+        "You can also see \"gn help gen\".")
+        .PrintToStdout();
     return 1;
   }
 
@@ -429,10 +432,8 @@
 
   Err err;
   // Write the root ninja files.
-  if (!NinjaWriter::RunAndWriteFiles(&setup->build_settings(),
-                                     setup->builder(),
-                                     write_info.rules,
-                                     &err)) {
+  if (!NinjaWriter::RunAndWriteFiles(&setup->build_settings(), setup->builder(),
+                                     write_info.rules, &err)) {
     err.PrintToStdout();
     return 1;
   }
diff --git a/tools/gn/command_help.cc b/tools/gn/command_help.cc
index a6777cf..9b9d428 100644
--- a/tools/gn/command_help.cc
+++ b/tools/gn/command_help.cc
@@ -104,8 +104,9 @@
 
   if (is_markdown) {
     OutputString("# GN Reference\n\n");
-    OutputString("*This page is automatically generated from* "
-                 "`gn help --markdown all`.\n\n");
+    OutputString(
+        "*This page is automatically generated from* "
+        "`gn help --markdown all`.\n\n");
 
     // Generate our own table of contents so that we have more control
     // over what's in and out.
@@ -118,7 +119,7 @@
 
   if (is_markdown)
     OutputString("## <a name=\"commands\"></a>Commands\n\n");
-  for (const auto& c: commands::GetCommands())
+  for (const auto& c : commands::GetCommands())
     PrintLongHelp(c.second.help);
 
   if (is_markdown)
@@ -140,7 +141,7 @@
         "## <a name=\"predefined_variables\"></a>"
         "Built-in predefined variables\n\n");
   }
-  for (const auto& v: variables::GetBuiltinVariables())
+  for (const auto& v : variables::GetBuiltinVariables())
     PrintLongHelp(v.second.help);
 
   if (is_markdown) {
@@ -148,7 +149,7 @@
         "## <a name=\"target_variables\"></a>"
         "Variables you set in targets\n\n");
   }
-  for (const auto& v: variables::GetTargetVariables())
+  for (const auto& v : variables::GetTargetVariables())
     PrintLongHelp(v.second.help);
 
   if (is_markdown)
@@ -186,8 +187,7 @@
 }  // namespace
 
 const char kHelp[] = "help";
-const char kHelp_HelpShort[] =
-    "help: Does what you think.";
+const char kHelp_HelpShort[] = "help: Does what you think.";
 const char kHelp_Help[] =
     R"(gn help <anything>
 
@@ -274,7 +274,7 @@
     return 0;
 
   // Random other topics.
-  std::map<std::string, void(*)()> random_topics;
+  std::map<std::string, void (*)()> random_topics;
   random_topics["all"] = PrintAllHelp;
   random_topics["execution"] = []() { PrintLongHelp(kExecution_Help); };
   random_topics["buildargs"] = []() { PrintLongHelp(kBuildArgs_Help); };
diff --git a/tools/gn/command_ls.cc b/tools/gn/command_ls.cc
index 58b9c87..65ec1a9 100644
--- a/tools/gn/command_ls.cc
+++ b/tools/gn/command_ls.cc
@@ -16,8 +16,7 @@
 namespace commands {
 
 const char kLs[] = "ls";
-const char kLs_HelpShort[] =
-    "ls: List matching targets.";
+const char kLs_HelpShort[] = "ls: List matching targets.";
 const char kLs_Help[] =
     R"(gn ls <out_dir> [<label_pattern>] [--all-toolchains] [--as=...]
       [--type=...] [--testonly=...]
@@ -32,15 +31,10 @@
 
 Options
 
-)"
-    TARGET_PRINTING_MODE_COMMAND_LINE_HELP
-"\n"
-    ALL_TOOLCHAINS_SWITCH_HELP
-"\n"
-    TARGET_TESTONLY_FILTER_COMMAND_LINE_HELP
-"\n"
-    TARGET_TYPE_FILTER_COMMAND_LINE_HELP
-R"(
+)" TARGET_PRINTING_MODE_COMMAND_LINE_HELP "\n" ALL_TOOLCHAINS_SWITCH_HELP
+    "\n" TARGET_TESTONLY_FILTER_COMMAND_LINE_HELP
+    "\n" TARGET_TYPE_FILTER_COMMAND_LINE_HELP
+    R"(
 Examples
 
   gn ls out/Debug
@@ -69,7 +63,8 @@
 int RunLs(const std::vector<std::string>& args) {
   if (args.size() == 0) {
     Err(Location(), "You're holding it wrong.",
-        "Usage: \"gn ls <build dir> [<label_pattern>]*\"").PrintToStdout();
+        "Usage: \"gn ls <build dir> [<label_pattern>]*\"")
+        .PrintToStdout();
     return 1;
   }
 
@@ -93,8 +88,8 @@
                                      &target_matches, &config_matches,
                                      &toolchain_matches, &file_matches))
       return 1;
-    matches.insert(matches.begin(),
-                   target_matches.begin(), target_matches.end());
+    matches.insert(matches.begin(), target_matches.begin(),
+                   target_matches.end());
   } else if (all_toolchains) {
     // List all resolved targets.
     matches = setup->builder().GetAllResolvedTargets();
diff --git a/tools/gn/command_path.cc b/tools/gn/command_path.cc
index 52086f8..333a78e 100644
--- a/tools/gn/command_path.cc
+++ b/tools/gn/command_path.cc
@@ -16,12 +16,7 @@
 
 namespace {
 
-enum class DepType {
-  NONE,
-  PUBLIC,
-  PRIVATE,
-  DATA
-};
+enum class DepType { NONE, PUBLIC, PRIVATE, DATA };
 
 // The dependency paths are stored in a vector. Assuming the chain:
 //    A --[public]--> B --[private]--> C
@@ -39,10 +34,7 @@
 
 struct Options {
   Options()
-      : print_what(PrintWhat::ONE),
-        public_only(false),
-        with_data(false) {
-  }
+      : print_what(PrintWhat::ONE), public_only(false), with_data(false) {}
 
   PrintWhat print_what;
   bool public_only;
@@ -52,8 +44,7 @@
 typedef std::list<PathVector> WorkQueue;
 
 struct Stats {
-  Stats() : public_paths(0), other_paths(0) {
-  }
+  Stats() : public_paths(0), other_paths(0) {}
 
   int total_paths() const { return public_paths + other_paths; }
 
@@ -89,7 +80,7 @@
 }
 
 const char* StringForDepType(DepType type) {
-  switch(type) {
+  switch (type) {
     case DepType::PUBLIC:
       return "public";
     case DepType::PRIVATE:
@@ -120,13 +111,15 @@
       // Last one either gets the implicit last dep type or nothing.
       if (implicit_last_dep != DepType::NONE) {
         OutputString(std::string(" --> see ") +
-                     StringForDepType(implicit_last_dep) +
-                     " chain printed above...", DECORATION_DIM);
+                         StringForDepType(implicit_last_dep) +
+                         " chain printed above...",
+                     DECORATION_DIM);
       }
     } else {
       // Take type from the next entry.
-      OutputString(std::string(" --[") + StringForDepType(path[i + 1].second) +
-                   "]-->", DECORATION_DIM);
+      OutputString(
+          std::string(" --[") + StringForDepType(path[i + 1].second) + "]-->",
+          DECORATION_DIM);
     }
     OutputString("\n");
   }
@@ -173,8 +166,10 @@
   }
 }
 
-void BreadthFirstSearch(const Target* from, const Target* to,
-                        PrivateDeps private_deps, DataDeps data_deps,
+void BreadthFirstSearch(const Target* from,
+                        const Target* to,
+                        PrivateDeps private_deps,
+                        DataDeps data_deps,
                         PrintWhat print_what,
                         Stats* stats) {
   // Seed the initial stack with just the "from" target.
@@ -240,8 +235,7 @@
       // Add private deps.
       for (const auto& pair : current_target->private_deps()) {
         work_queue.push_back(current_path);
-        work_queue.back().push_back(
-            TargetDep(pair.ptr, DepType::PRIVATE));
+        work_queue.back().push_back(TargetDep(pair.ptr, DepType::PRIVATE));
       }
     }
 
@@ -255,18 +249,20 @@
   }
 }
 
-void DoSearch(const Target* from, const Target* to, const Options& options,
+void DoSearch(const Target* from,
+              const Target* to,
+              const Options& options,
               Stats* stats) {
   BreadthFirstSearch(from, to, PrivateDeps::EXCLUDE, DataDeps::EXCLUDE,
                      options.print_what, stats);
   if (!options.public_only) {
     // Check private deps.
-    BreadthFirstSearch(from, to, PrivateDeps::INCLUDE,
-                       DataDeps::EXCLUDE, options.print_what, stats);
+    BreadthFirstSearch(from, to, PrivateDeps::INCLUDE, DataDeps::EXCLUDE,
+                       options.print_what, stats);
     if (options.with_data) {
       // Check data deps.
-      BreadthFirstSearch(from, to, PrivateDeps::INCLUDE,
-                         DataDeps::INCLUDE, options.print_what, stats);
+      BreadthFirstSearch(from, to, PrivateDeps::INCLUDE, DataDeps::INCLUDE,
+                         options.print_what, stats);
     }
   }
 }
@@ -274,8 +270,7 @@
 }  // namespace
 
 const char kPath[] = "path";
-const char kPath_HelpShort[] =
-    "path: Find paths between two targets.";
+const char kPath_HelpShort[] = "path: Find paths between two targets.";
 const char kPath_Help[] =
     R"(gn path <out_dir> <target_one> <target_two>
 
@@ -339,7 +334,8 @@
 
   Options options;
   options.print_what = base::CommandLine::ForCurrentProcess()->HasSwitch("all")
-      ? PrintWhat::ALL : PrintWhat::ONE;
+                           ? PrintWhat::ALL
+                           : PrintWhat::ONE;
   options.public_only =
       base::CommandLine::ForCurrentProcess()->HasSwitch("public");
   options.with_data =
@@ -347,7 +343,8 @@
   if (options.public_only && options.with_data) {
     Err(Location(), "Can't use --public with --with-data for 'gn path'.",
         "Your zealous over-use of arguments has inevitably resulted in an "
-        "invalid\ncombination of flags.").PrintToStdout();
+        "invalid\ncombination of flags.")
+        .PrintToStdout();
     return 1;
   }
 
@@ -370,8 +367,9 @@
 
   if (stats.total_paths() == 0) {
     // No results.
-    OutputString(base::StringPrintf(
-        "No %spaths found between these two targets.\n", path_annotation),
+    OutputString(
+        base::StringPrintf("No %spaths found between these two targets.\n",
+                           path_annotation),
         DECORATION_YELLOW);
   } else if (stats.total_paths() == 1) {
     // Exactly one result.
@@ -391,8 +389,8 @@
                                       stats.total_paths(), path_annotation),
                    DECORATION_YELLOW);
       if (!options.public_only) {
-        OutputString(base::StringPrintf(" %d of them are public.",
-                                        stats.public_paths));
+        OutputString(
+            base::StringPrintf(" %d of them are public.", stats.public_paths));
       }
       OutputString("\n");
     } else {
diff --git a/tools/gn/command_refs.cc b/tools/gn/command_refs.cc
index ad1eb6e..92ecf10 100644
--- a/tools/gn/command_refs.cc
+++ b/tools/gn/command_refs.cc
@@ -42,9 +42,9 @@
 
 // Forward declaration for function below.
 size_t RecursivePrintTargetDeps(const DepMap& dep_map,
-                               const Target* target,
-                               TargetSet* seen_targets,
-                               int indent_level);
+                                const Target* target,
+                                TargetSet* seen_targets,
+                                int indent_level);
 
 // Prints the target and its dependencies in tree form. If the set is non-null,
 // new targets encountered will be added to the set, and if a ref is in the set
@@ -53,15 +53,15 @@
 //
 // Returns the number of items printed.
 size_t RecursivePrintTarget(const DepMap& dep_map,
-                          const Target* target,
-                          TargetSet* seen_targets,
-                          int indent_level) {
+                            const Target* target,
+                            TargetSet* seen_targets,
+                            int indent_level) {
   std::string indent(indent_level * 2, ' ');
   size_t count = 1;
 
   // Only print the toolchain for non-default-toolchain targets.
   OutputString(indent + target->label().GetUserVisibleName(
-      !target->settings()->is_default()));
+                            !target->settings()->is_default()));
 
   bool print_children = true;
   if (seen_targets) {
@@ -89,14 +89,14 @@
 // Prints refs of the given target (not the target itself). See
 // RecursivePrintTarget.
 size_t RecursivePrintTargetDeps(const DepMap& dep_map,
-                              const Target* target,
-                              TargetSet* seen_targets,
-                              int indent_level) {
+                                const Target* target,
+                                TargetSet* seen_targets,
+                                int indent_level) {
   DepMap::const_iterator dep_begin = dep_map.lower_bound(target);
   DepMap::const_iterator dep_end = dep_map.upper_bound(target);
   size_t count = 0;
-  for (DepMap::const_iterator cur_dep = dep_begin;
-       cur_dep != dep_end; cur_dep++) {
+  for (DepMap::const_iterator cur_dep = dep_begin; cur_dep != dep_end;
+       cur_dep++) {
     count += RecursivePrintTarget(dep_map, cur_dep->second, seen_targets,
                                   indent_level);
   }
@@ -124,8 +124,8 @@
                                TargetSet* results) {
   DepMap::const_iterator dep_begin = dep_map.lower_bound(target);
   DepMap::const_iterator dep_end = dep_map.upper_bound(target);
-  for (DepMap::const_iterator cur_dep = dep_begin;
-       cur_dep != dep_end; cur_dep++)
+  for (DepMap::const_iterator cur_dep = dep_begin; cur_dep != dep_end;
+       cur_dep++)
     RecursiveCollectRefs(dep_map, cur_dep->second, results);
 }
 
@@ -273,8 +273,8 @@
   for (const Target* target : implicit_target_matches) {
     DepMap::const_iterator dep_begin = dep_map.lower_bound(target);
     DepMap::const_iterator dep_end = dep_map.upper_bound(target);
-    for (DepMap::const_iterator cur_dep = dep_begin;
-         cur_dep != dep_end; cur_dep++)
+    for (DepMap::const_iterator cur_dep = dep_begin; cur_dep != dep_end;
+         cur_dep++)
       results.insert(cur_dep->second);
   }
 
@@ -290,8 +290,7 @@
 }  // namespace
 
 const char kRefs[] = "refs";
-const char kRefs_HelpShort[] =
-    "refs: Find stuff referencing a target or file.";
+const char kRefs_HelpShort[] = "refs: Find stuff referencing a target or file.";
 const char kRefs_Help[] =
     R"(gn refs <out_dir> (<label_pattern>|<label>|<file>|@<response_file>)*
         [--all] [--all-toolchains] [--as=...] [--testonly=...] [--type=...]
@@ -330,20 +329,18 @@
       When used with --tree, turns off eliding to show a complete tree.
 )"
 
-ALL_TOOLCHAINS_SWITCH_HELP
-"\n"
-TARGET_PRINTING_MODE_COMMAND_LINE_HELP
+    ALL_TOOLCHAINS_SWITCH_HELP "\n" TARGET_PRINTING_MODE_COMMAND_LINE_HELP
 
-R"(
+    R"(
   -q
      Quiet. If nothing matches, don't print any output. Without this option, if
      there are no matches there will be an informational message printed which
      might interfere with scripts processing the output.
 )"
 
-TARGET_TESTONLY_FILTER_COMMAND_LINE_HELP
+    TARGET_TESTONLY_FILTER_COMMAND_LINE_HELP
 
-R"(
+    R"(
   --tree
       Outputs a reverse dependency tree from the given target. Duplicates will
       be elided. Combine with --all to see a full dependency tree.
@@ -352,9 +349,9 @@
       --type, --testonly.
 )"
 
-TARGET_TYPE_FILTER_COMMAND_LINE_HELP
+    TARGET_TYPE_FILTER_COMMAND_LINE_HELP
 
-R"(
+    R"(
 
 Examples (target input)
 
@@ -420,8 +417,8 @@
     if (args[i][0] == '@') {
       // The argument is as a path to a response file.
       std::string contents;
-      bool ret = base::ReadFileToString(UTF8ToFilePath(args[i].substr(1)),
-                                        &contents);
+      bool ret =
+          base::ReadFileToString(UTF8ToFilePath(args[i].substr(1)), &contents);
       if (!ret) {
         Err(Location(), "Response file " + args[i].substr(1) + " not found.")
             .PrintToStdout();
@@ -471,8 +468,8 @@
   // converted to targets also, but there could be no targets referencing the
   // config, which is different than no config with that name.
   bool quiet = cmdline->HasSwitch("q");
-  if (!quiet && config_matches.empty() &&
-      explicit_target_matches.empty() && target_matches.empty()) {
+  if (!quiet && config_matches.empty() && explicit_target_matches.empty() &&
+      target_matches.empty()) {
     OutputString("The input matches no targets, configs, or files.\n",
                  DECORATION_YELLOW);
     return 1;
diff --git a/tools/gn/commands.cc b/tools/gn/commands.cc
index 38d672f..51a1c8c 100644
--- a/tools/gn/commands.cc
+++ b/tools/gn/commands.cc
@@ -29,18 +29,16 @@
 //
 // If all_toolchains is false, a pattern with an unspecified toolchain will
 // match the default toolchain only. If true, all toolchains will be matched.
-bool ResolveTargetsFromCommandLinePattern(
-    Setup* setup,
-    const std::string& label_pattern,
-    bool all_toolchains,
-    std::vector<const Target*>* matches) {
+bool ResolveTargetsFromCommandLinePattern(Setup* setup,
+                                          const std::string& label_pattern,
+                                          bool all_toolchains,
+                                          std::vector<const Target*>* matches) {
   Value pattern_value(nullptr, label_pattern);
 
   Err err;
   LabelPattern pattern = LabelPattern::GetPattern(
       SourceDirForCurrentDirectory(setup->build_settings().root_path()),
-      pattern_value,
-      &err);
+      pattern_value, &err);
   if (err.has_error()) {
     err.PrintToStdout();
     return false;
@@ -63,7 +61,6 @@
   return true;
 }
 
-
 // If there's an error, it will be printed and false will be returned.
 bool ResolveStringFromCommandLineInput(
     Setup* setup,
@@ -89,9 +86,9 @@
 
   // Try to figure out what this thing is.
   Err err;
-  Label label = Label::Resolve(current_dir,
-                               setup->loader()->default_toolchain_label(),
-                               Value(nullptr, input), &err);
+  Label label =
+      Label::Resolve(current_dir, setup->loader()->default_toolchain_label(),
+                     Value(nullptr, input), &err);
   if (err.has_error()) {
     // Not a valid label, assume this must be a file.
     err = Err();
@@ -160,7 +157,9 @@
 
   Err(Location(), "Invalid value for \"--as\".",
       "I was expecting \"buildfile\", \"label\", or \"output\" but you\n"
-      "said \"" + value + "\".").PrintToStdout();
+      "said \"" +
+          value + "\".")
+      .PrintToStdout();
   return false;
 }
 
@@ -219,7 +218,6 @@
   return false;
 }
 
-
 // Applies any testonly filtering specified on the command line to the given
 // target set. On failure, prints an error and returns false.
 bool ApplyTestonlyFilter(std::vector<const Target*>* targets) {
@@ -303,8 +301,7 @@
     unique_labels.insert(target->label());
 
   // Grab the label of the default toolchain from the first target.
-  Label default_tc_label =
-      targets[0]->settings()->default_toolchain_label();
+  Label default_tc_label = targets[0]->settings()->default_toolchain_label();
 
   for (const Label& label : unique_labels) {
     // Print toolchain only for ones not in the default toolchain.
@@ -329,11 +326,10 @@
     if (output_file.value().empty())
       output_file = target->dependency_output_file();
 
-    SourceFile output_as_source =
-        output_file.AsSourceFile(build_settings);
-    std::string result = RebasePath(output_as_source.value(),
-                                    build_settings->build_dir(),
-                                    build_settings->root_path_utf8());
+    SourceFile output_as_source = output_file.AsSourceFile(build_settings);
+    std::string result =
+        RebasePath(output_as_source.value(), build_settings->build_dir(),
+                   build_settings->root_path_utf8());
     out->AppendString(result);
   }
 }
@@ -366,30 +362,21 @@
 }
 #endif
 
-
 }  // namespace
 
 CommandInfo::CommandInfo()
-    : help_short(nullptr),
-      help(nullptr),
-      runner(nullptr) {
-}
+    : help_short(nullptr), help(nullptr), runner(nullptr) {}
 
 CommandInfo::CommandInfo(const char* in_help_short,
                          const char* in_help,
                          CommandRunner in_runner)
-    : help_short(in_help_short),
-      help(in_help),
-      runner(in_runner) {
-}
+    : help_short(in_help_short), help(in_help), runner(in_runner) {}
 
 const CommandInfoMap& GetCommands() {
   static CommandInfoMap info_map;
   if (info_map.empty()) {
-    #define INSERT_COMMAND(cmd) \
-        info_map[k##cmd] = CommandInfo(k##cmd##_HelpShort, \
-                                       k##cmd##_Help, \
-                                       &Run##cmd);
+#define INSERT_COMMAND(cmd) \
+  info_map[k##cmd] = CommandInfo(k##cmd##_HelpShort, k##cmd##_Help, &Run##cmd);
 
     INSERT_COMMAND(Analyze)
     INSERT_COMMAND(Args)
@@ -403,7 +390,7 @@
     INSERT_COMMAND(Path)
     INSERT_COMMAND(Refs)
 
-    #undef INSERT_COMMAND
+#undef INSERT_COMMAND
   }
   return info_map;
 }
@@ -415,9 +402,9 @@
   Label default_toolchain = setup->loader()->default_toolchain_label();
   Value arg_value(nullptr, FixGitBashLabelEdit(label_string));
   Err err;
-  Label label = Label::Resolve(SourceDirForCurrentDirectory(
-                                   setup->build_settings().root_path()),
-                               default_toolchain, arg_value, &err);
+  Label label = Label::Resolve(
+      SourceDirForCurrentDirectory(setup->build_settings().root_path()),
+      default_toolchain, arg_value, &err);
   if (err.has_error()) {
     err.PrintToStdout();
     return nullptr;
@@ -426,16 +413,20 @@
   const Item* item = setup->builder().GetItem(label);
   if (!item) {
     Err(Location(), "Label not found.",
-        label.GetUserVisibleName(false) + " not found.").PrintToStdout();
+        label.GetUserVisibleName(false) + " not found.")
+        .PrintToStdout();
     return nullptr;
   }
 
   const Target* target = item->AsTarget();
   if (!target) {
     Err(Location(), "Not a target.",
-        "The \"" + label.GetUserVisibleName(false) + "\" thing\n"
-        "is not a target. Somebody should probably implement this command for "
-        "other\nitem types.").PrintToStdout();
+        "The \"" + label.GetUserVisibleName(false) +
+            "\" thing\n"
+            "is not a target. Somebody should probably implement this command "
+            "for "
+            "other\nitem types.")
+        .PrintToStdout();
     return nullptr;
   }
 
@@ -459,10 +450,9 @@
   SourceDir cur_dir =
       SourceDirForCurrentDirectory(setup->build_settings().root_path());
   for (const auto& cur : input) {
-    if (!ResolveStringFromCommandLineInput(setup, cur_dir, cur,
-                                           all_toolchains, target_matches,
-                                           config_matches, toolchain_matches,
-                                           file_matches))
+    if (!ResolveStringFromCommandLineInput(setup, cur_dir, cur, all_toolchains,
+                                           target_matches, config_matches,
+                                           toolchain_matches, file_matches))
       return false;
   }
   return true;
diff --git a/tools/gn/commands.h b/tools/gn/commands.h
index 9593d4e..7d6017e 100644
--- a/tools/gn/commands.h
+++ b/tools/gn/commands.h
@@ -155,28 +155,28 @@
 // These are the documentation strings for the command-line flags used by
 // FilterAndPrintTargets. Commands that call that function should incorporate
 // these into their help.
-#define TARGET_PRINTING_MODE_COMMAND_LINE_HELP \
-    "  --as=(buildfile|label|output)\n"\
-    "      How to print targets.\n"\
-    "\n"\
-    "      buildfile\n"\
-    "          Prints the build files where the given target was declared as\n"\
-    "          file names.\n"\
-    "      label  (default)\n"\
-    "          Prints the label of the target.\n"\
-    "      output\n"\
-    "          Prints the first output file for the target relative to the\n"\
-    "          root build directory.\n"
-#define TARGET_TYPE_FILTER_COMMAND_LINE_HELP \
-    "  --type=(action|copy|executable|group|loadable_module|shared_library|\n"\
-    "          source_set|static_library)\n"\
-    "      Restrict outputs to targets matching the given type. If\n"\
-    "      unspecified, no filtering will be performed.\n"
-#define TARGET_TESTONLY_FILTER_COMMAND_LINE_HELP \
-    "  --testonly=(true|false)\n"\
-    "      Restrict outputs to targets with the testonly flag set\n"\
-    "      accordingly. When unspecified, the target's testonly flags are\n"\
-    "      ignored.\n"
+#define TARGET_PRINTING_MODE_COMMAND_LINE_HELP                                \
+  "  --as=(buildfile|label|output)\n"                                         \
+  "      How to print targets.\n"                                             \
+  "\n"                                                                        \
+  "      buildfile\n"                                                         \
+  "          Prints the build files where the given target was declared as\n" \
+  "          file names.\n"                                                   \
+  "      label  (default)\n"                                                  \
+  "          Prints the label of the target.\n"                               \
+  "      output\n"                                                            \
+  "          Prints the first output file for the target relative to the\n"   \
+  "          root build directory.\n"
+#define TARGET_TYPE_FILTER_COMMAND_LINE_HELP                                 \
+  "  --type=(action|copy|executable|group|loadable_module|shared_library|\n" \
+  "          source_set|static_library)\n"                                   \
+  "      Restrict outputs to targets matching the given type. If\n"          \
+  "      unspecified, no filtering will be performed.\n"
+#define TARGET_TESTONLY_FILTER_COMMAND_LINE_HELP                           \
+  "  --testonly=(true|false)\n"                                            \
+  "      Restrict outputs to targets with the testonly flag set\n"         \
+  "      accordingly. When unspecified, the target's testonly flags are\n" \
+  "      ignored.\n"
 
 // Applies any testonly and type filters specified on the command line,
 // and prints the targets as specified by the --as command line flag.
diff --git a/tools/gn/config_unittest.cc b/tools/gn/config_unittest.cc
index 733ab1b..574fe47 100644
--- a/tools/gn/config_unittest.cc
+++ b/tools/gn/config_unittest.cc
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "test/test.h"
 #include "tools/gn/config.h"
+#include "test/test.h"
 #include "tools/gn/test_with_scope.h"
 
 // Tests that the "resolved" values are the same as "own" values when there
diff --git a/tools/gn/config_values.cc b/tools/gn/config_values.cc
index b3e9f6f..5cdfa7a 100644
--- a/tools/gn/config_values.cc
+++ b/tools/gn/config_values.cc
@@ -6,12 +6,12 @@
 
 namespace {
 
-template<typename T>
+template <typename T>
 void VectorAppend(std::vector<T>* append_to,
                   const std::vector<T>& append_this) {
   if (append_this.empty())
     return;
-  append_to->insert(append_to->end(),append_this.begin(), append_this.end());
+  append_to->insert(append_to->end(), append_this.begin(), append_this.end());
 }
 
 }  // namespace
@@ -21,19 +21,19 @@
 ConfigValues::~ConfigValues() = default;
 
 void ConfigValues::AppendValues(const ConfigValues& append) {
-  VectorAppend(&asmflags_,     append.asmflags_);
-  VectorAppend(&arflags_,      append.arflags_);
-  VectorAppend(&cflags_,       append.cflags_);
-  VectorAppend(&cflags_c_,     append.cflags_c_);
-  VectorAppend(&cflags_cc_,    append.cflags_cc_);
-  VectorAppend(&cflags_objc_,  append.cflags_objc_);
+  VectorAppend(&asmflags_, append.asmflags_);
+  VectorAppend(&arflags_, append.arflags_);
+  VectorAppend(&cflags_, append.cflags_);
+  VectorAppend(&cflags_c_, append.cflags_c_);
+  VectorAppend(&cflags_cc_, append.cflags_cc_);
+  VectorAppend(&cflags_objc_, append.cflags_objc_);
   VectorAppend(&cflags_objcc_, append.cflags_objcc_);
-  VectorAppend(&defines_,      append.defines_);
+  VectorAppend(&defines_, append.defines_);
   VectorAppend(&include_dirs_, append.include_dirs_);
-  VectorAppend(&inputs_,       append.inputs_);
-  VectorAppend(&ldflags_,      append.ldflags_);
-  VectorAppend(&lib_dirs_,     append.lib_dirs_);
-  VectorAppend(&libs_,         append.libs_);
+  VectorAppend(&inputs_, append.inputs_);
+  VectorAppend(&ldflags_, append.ldflags_);
+  VectorAppend(&lib_dirs_, append.lib_dirs_);
+  VectorAppend(&libs_, append.libs_);
 
   // Only append precompiled header if there isn't one. It might be nice to
   // throw an error if there are conflicting precompiled headers, but that
diff --git a/tools/gn/config_values.h b/tools/gn/config_values.h
index 0099e81..f914453 100644
--- a/tools/gn/config_values.h
+++ b/tools/gn/config_values.h
@@ -23,12 +23,12 @@
   // Appends the values from the given config to this one.
   void AppendValues(const ConfigValues& append);
 
-#define STRING_VALUES_ACCESSOR(name) \
-    const std::vector<std::string>& name() const { return name##_; } \
-    std::vector<std::string>& name() { return name##_; }
-#define DIR_VALUES_ACCESSOR(name) \
-    const std::vector<SourceDir>& name() const { return name##_; } \
-    std::vector<SourceDir>& name() { return name##_; }
+#define STRING_VALUES_ACCESSOR(name)                               \
+  const std::vector<std::string>& name() const { return name##_; } \
+  std::vector<std::string>& name() { return name##_; }
+#define DIR_VALUES_ACCESSOR(name)                                \
+  const std::vector<SourceDir>& name() const { return name##_; } \
+  std::vector<SourceDir>& name() { return name##_; }
 
   // =================================================================
   // IMPORTANT: If you add a new one, be sure to update AppendValues()
@@ -42,13 +42,13 @@
   STRING_VALUES_ACCESSOR(cflags_objc)
   STRING_VALUES_ACCESSOR(cflags_objcc)
   STRING_VALUES_ACCESSOR(defines)
-  DIR_VALUES_ACCESSOR   (include_dirs)
+  DIR_VALUES_ACCESSOR(include_dirs)
   STRING_VALUES_ACCESSOR(ldflags)
-  DIR_VALUES_ACCESSOR   (lib_dirs)
-  // =================================================================
-  // IMPORTANT: If you add a new one, be sure to update AppendValues()
-  //            and command_desc.cc.
-  // =================================================================
+  DIR_VALUES_ACCESSOR(lib_dirs)
+// =================================================================
+// IMPORTANT: If you add a new one, be sure to update AppendValues()
+//            and command_desc.cc.
+// =================================================================
 
 #undef STRING_VALUES_ACCESSOR
 #undef DIR_VALUES_ACCESSOR
@@ -62,18 +62,10 @@
   bool has_precompiled_headers() const {
     return !precompiled_header_.empty() || !precompiled_source_.is_null();
   }
-  const std::string& precompiled_header() const {
-    return precompiled_header_;
-  }
-  void set_precompiled_header(const std::string& f) {
-    precompiled_header_ = f;
-  }
-  const SourceFile& precompiled_source() const {
-    return precompiled_source_;
-  }
-  void set_precompiled_source(const SourceFile& f) {
-    precompiled_source_ = f;
-  }
+  const std::string& precompiled_header() const { return precompiled_header_; }
+  void set_precompiled_header(const std::string& f) { precompiled_header_ = f; }
+  const SourceFile& precompiled_source() const { return precompiled_source_; }
+  void set_precompiled_source(const SourceFile& f) { precompiled_source_ = f; }
 
  private:
   std::vector<std::string> arflags_;
@@ -84,11 +76,11 @@
   std::vector<std::string> cflags_objc_;
   std::vector<std::string> cflags_objcc_;
   std::vector<std::string> defines_;
-  std::vector<SourceDir>   include_dirs_;
-  std::vector<SourceFile>  inputs_;
+  std::vector<SourceDir> include_dirs_;
+  std::vector<SourceFile> inputs_;
   std::vector<std::string> ldflags_;
-  std::vector<SourceDir>   lib_dirs_;
-  std::vector<LibFile>     libs_;
+  std::vector<SourceDir> lib_dirs_;
+  std::vector<LibFile> libs_;
   // If you add a new one, be sure to update AppendValues().
 
   std::string precompiled_header_;
diff --git a/tools/gn/config_values_extractors.cc b/tools/gn/config_values_extractors.cc
index 18617db..248d8c4 100644
--- a/tools/gn/config_values_extractors.cc
+++ b/tools/gn/config_values_extractors.cc
@@ -11,8 +11,7 @@
 class EscapedStringWriter {
  public:
   explicit EscapedStringWriter(const EscapeOptions& escape_options)
-      : escape_options_(escape_options) {
-  }
+      : escape_options_(escape_options) {}
 
   void operator()(const std::string& s, std::ostream& out) const {
     out << " ";
@@ -27,7 +26,7 @@
 
 void RecursiveTargetConfigStringsToStream(
     const Target* target,
-    const std::vector<std::string>& (ConfigValues::* getter)() const,
+    const std::vector<std::string>& (ConfigValues::*getter)() const,
     const EscapeOptions& escape_options,
     std::ostream& out) {
   RecursiveTargetConfigToStream(target, getter,
diff --git a/tools/gn/config_values_extractors.h b/tools/gn/config_values_extractors.h
index f87f52b..5bb4229 100644
--- a/tools/gn/config_values_extractors.h
+++ b/tools/gn/config_values_extractors.h
@@ -31,9 +31,7 @@
 class ConfigValuesIterator {
  public:
   explicit ConfigValuesIterator(const Target* target)
-      : target_(target),
-        cur_index_(-1) {
-  }
+      : target_(target), cur_index_(-1) {}
 
   bool done() const {
     return cur_index_ >= static_cast<int>(target_->configs().size());
@@ -53,9 +51,7 @@
     return target_->configs()[cur_index_].origin;
   }
 
-  void Next() {
-    cur_index_++;
-  }
+  void Next() { cur_index_++; }
 
   // Returns the config holding the current config values, or NULL for those
   // config values associated with the target itself.
@@ -73,12 +69,12 @@
   int cur_index_;
 };
 
-template<typename T, class Writer>
-inline void ConfigValuesToStream(
-    const ConfigValues& values,
-    const std::vector<T>& (ConfigValues::* getter)() const,
-    const Writer& writer,
-    std::ostream& out) {
+template <typename T, class Writer>
+inline void ConfigValuesToStream(const ConfigValues& values,
+                                 const std::vector<T>& (ConfigValues::*getter)()
+                                     const,
+                                 const Writer& writer,
+                                 std::ostream& out) {
   const std::vector<T>& v = (values.*getter)();
   for (size_t i = 0; i < v.size(); i++)
     writer(v[i], out);
@@ -87,10 +83,10 @@
 // Writes a given config value that applies to a given target. This collects
 // all values from the target itself and all configs that apply, and writes
 // then in order.
-template<typename T, class Writer>
+template <typename T, class Writer>
 inline void RecursiveTargetConfigToStream(
     const Target* target,
-    const std::vector<T>& (ConfigValues::* getter)() const,
+    const std::vector<T>& (ConfigValues::*getter)() const,
     const Writer& writer,
     std::ostream& out) {
   for (ConfigValuesIterator iter(target); !iter.done(); iter.Next())
@@ -100,7 +96,7 @@
 // Writes the values out as strings with no transformation.
 void RecursiveTargetConfigStringsToStream(
     const Target* target,
-    const std::vector<std::string>& (ConfigValues::* getter)() const,
+    const std::vector<std::string>& (ConfigValues::*getter)() const,
     const EscapeOptions& escape_options,
     std::ostream& out);
 
diff --git a/tools/gn/config_values_extractors_unittest.cc b/tools/gn/config_values_extractors_unittest.cc
index 8a9f13d..48e7e18 100644
--- a/tools/gn/config_values_extractors_unittest.cc
+++ b/tools/gn/config_values_extractors_unittest.cc
@@ -110,8 +110,7 @@
 
   // Additionally add some values directly on "target".
   target.config_values().cflags().push_back("--target");
-  target.config_values().include_dirs().push_back(
-      SourceDir("//target/"));
+  target.config_values().include_dirs().push_back(SourceDir("//target/"));
 
   // Mark targets resolved. This should push dependent configs.
   ASSERT_TRUE(dep2.OnResolved(&err));
diff --git a/tools/gn/config_values_generator.cc b/tools/gn/config_values_generator.cc
index 97888ac..ff4e4df 100644
--- a/tools/gn/config_values_generator.cc
+++ b/tools/gn/config_values_generator.cc
@@ -14,12 +14,11 @@
 
 namespace {
 
-void GetStringList(
-    Scope* scope,
-    const char* var_name,
-    ConfigValues* config_values,
-    std::vector<std::string>& (ConfigValues::* accessor)(),
-    Err* err) {
+void GetStringList(Scope* scope,
+                   const char* var_name,
+                   ConfigValues* config_values,
+                   std::vector<std::string>& (ConfigValues::*accessor)(),
+                   Err* err) {
   const Value* value = scope->GetValue(var_name, true);
   if (!value)
     return;  // No value, empty input and succeed.
@@ -27,44 +26,41 @@
   ExtractListOfStringValues(*value, &(config_values->*accessor)(), err);
 }
 
-void GetDirList(
-    Scope* scope,
-    const char* var_name,
-    ConfigValues* config_values,
-    const SourceDir input_dir,
-    std::vector<SourceDir>& (ConfigValues::* accessor)(),
-    Err* err) {
+void GetDirList(Scope* scope,
+                const char* var_name,
+                ConfigValues* config_values,
+                const SourceDir input_dir,
+                std::vector<SourceDir>& (ConfigValues::*accessor)(),
+                Err* err) {
   const Value* value = scope->GetValue(var_name, true);
   if (!value)
     return;  // No value, empty input and succeed.
 
   std::vector<SourceDir> result;
-  ExtractListOfRelativeDirs(scope->settings()->build_settings(),
-                            *value, input_dir, &result, err);
+  ExtractListOfRelativeDirs(scope->settings()->build_settings(), *value,
+                            input_dir, &result, err);
   (config_values->*accessor)().swap(result);
 }
 
 }  // namespace
 
-ConfigValuesGenerator::ConfigValuesGenerator(
-    ConfigValues* dest_values,
-    Scope* scope,
-    const SourceDir& input_dir,
-    Err* err)
+ConfigValuesGenerator::ConfigValuesGenerator(ConfigValues* dest_values,
+                                             Scope* scope,
+                                             const SourceDir& input_dir,
+                                             Err* err)
     : config_values_(dest_values),
       scope_(scope),
       input_dir_(input_dir),
-      err_(err) {
-}
+      err_(err) {}
 
 ConfigValuesGenerator::~ConfigValuesGenerator() = default;
 
 void ConfigValuesGenerator::Run() {
 #define FILL_STRING_CONFIG_VALUE(name) \
-    GetStringList(scope_, #name, config_values_, &ConfigValues::name, err_);
-#define FILL_DIR_CONFIG_VALUE(name) \
-    GetDirList(scope_, #name, config_values_, input_dir_, \
-               &ConfigValues::name, err_);
+  GetStringList(scope_, #name, config_values_, &ConfigValues::name, err_);
+#define FILL_DIR_CONFIG_VALUE(name)                                          \
+  GetDirList(scope_, #name, config_values_, input_dir_, &ConfigValues::name, \
+             err_);
 
   FILL_STRING_CONFIG_VALUE(arflags)
   FILL_STRING_CONFIG_VALUE(asmflags)
@@ -74,9 +70,9 @@
   FILL_STRING_CONFIG_VALUE(cflags_objc)
   FILL_STRING_CONFIG_VALUE(cflags_objcc)
   FILL_STRING_CONFIG_VALUE(defines)
-  FILL_DIR_CONFIG_VALUE(   include_dirs)
+  FILL_DIR_CONFIG_VALUE(include_dirs)
   FILL_STRING_CONFIG_VALUE(ldflags)
-  FILL_DIR_CONFIG_VALUE(   lib_dirs)
+  FILL_DIR_CONFIG_VALUE(lib_dirs)
 
 #undef FILL_STRING_CONFIG_VALUE
 #undef FILL_DIR_CONFIG_VALUE
@@ -106,8 +102,8 @@
     // Check for common errors. This is a string and not a file.
     const std::string& pch_string = precompiled_header_value->string_value();
     if (base::StartsWith(pch_string, "//", base::CompareCase::SENSITIVE)) {
-      *err_ = Err(*precompiled_header_value,
-          "This precompiled_header value is wrong.",
+      *err_ = Err(
+          *precompiled_header_value, "This precompiled_header value is wrong.",
           "You need to specify a string that the compiler will match against\n"
           "the #include lines rather than a GN-style file name.\n");
       return;
@@ -118,10 +114,9 @@
   const Value* precompiled_source_value =
       scope_->GetValue(variables::kPrecompiledSource, true);
   if (precompiled_source_value) {
-    config_values_->set_precompiled_source(
-        input_dir_.ResolveRelativeFile(
-            *precompiled_source_value, err_,
-            scope_->settings()->build_settings()->root_path_utf8()));
+    config_values_->set_precompiled_source(input_dir_.ResolveRelativeFile(
+        *precompiled_source_value, err_,
+        scope_->settings()->build_settings()->root_path_utf8()));
     if (err_->has_error())
       return;
   }
diff --git a/tools/gn/copy_target_generator.cc b/tools/gn/copy_target_generator.cc
index a86f820..4e40efb 100644
--- a/tools/gn/copy_target_generator.cc
+++ b/tools/gn/copy_target_generator.cc
@@ -14,8 +14,7 @@
                                          Scope* scope,
                                          const FunctionCallNode* function_call,
                                          Err* err)
-    : TargetGenerator(target, scope, function_call, err) {
-}
+    : TargetGenerator(target, scope, function_call, err) {}
 
 CopyTargetGenerator::~CopyTargetGenerator() = default;
 
@@ -28,12 +27,14 @@
     return;
 
   if (target_->sources().empty()) {
-    *err_ = Err(function_call_, "Empty sources for copy command.",
+    *err_ = Err(
+        function_call_, "Empty sources for copy command.",
         "You have to specify at least one file to copy in the \"sources\".");
     return;
   }
   if (target_->action_values().outputs().list().size() != 1) {
-    *err_ = Err(function_call_, "Copy command must have exactly one output.",
+    *err_ = Err(
+        function_call_, "Copy command must have exactly one output.",
         "You must specify exactly one value in the \"outputs\" array for the "
         "destination of the copy\n(see \"gn help copy\"). If there are "
         "multiple sources to copy, use source expansion\n(see \"gn help "
diff --git a/tools/gn/copy_target_generator.h b/tools/gn/copy_target_generator.h
index b05855f..89751f9 100644
--- a/tools/gn/copy_target_generator.h
+++ b/tools/gn/copy_target_generator.h
@@ -25,4 +25,3 @@
 };
 
 #endif  // TOOLS_GN_COPY_TARGET_GENERATOR_H_
-
diff --git a/tools/gn/create_bundle_target_generator.cc b/tools/gn/create_bundle_target_generator.cc
index d4b8f55..79edd78 100644
--- a/tools/gn/create_bundle_target_generator.cc
+++ b/tools/gn/create_bundle_target_generator.cc
@@ -91,10 +91,12 @@
     return false;
   if (str != bundle_root_dir.value() &&
       !IsStringInOutputDir(bundle_root_dir, str)) {
-    *err_ = Err(value->origin(), "Path is not in bundle root dir.",
+    *err_ = Err(
+        value->origin(), "Path is not in bundle root dir.",
         "The given file should be in the bundle root directory or below.\n"
         "Normally you would do \"$bundle_root_dir/foo\". I interpreted this\n"
-        "as \"" + str + "\".");
+        "as \"" +
+            str + "\".");
     return false;
   }
   bundle_dir->SwapValue(&str);
diff --git a/tools/gn/deps_iterator.cc b/tools/gn/deps_iterator.cc
index 92e892e..497ef04 100644
--- a/tools/gn/deps_iterator.cc
+++ b/tools/gn/deps_iterator.cc
@@ -48,8 +48,6 @@
 }
 
 DepsIteratorRange::DepsIteratorRange(const DepsIterator& b)
-    : begin_(b),
-      end_() {
-}
+    : begin_(b), end_() {}
 
 DepsIteratorRange::~DepsIteratorRange() = default;
diff --git a/tools/gn/deps_iterator.h b/tools/gn/deps_iterator.h
index c3f2c42..413e83b 100644
--- a/tools/gn/deps_iterator.h
+++ b/tools/gn/deps_iterator.h
@@ -37,9 +37,9 @@
   // Comparison for STL-based loops.
   bool operator!=(const DepsIterator& other) const {
     return current_index_ != other.current_index_ ||
-        vect_stack_[0] != other.vect_stack_[0] ||
-        vect_stack_[1] != other.vect_stack_[1] ||
-        vect_stack_[2] != other.vect_stack_[2];
+           vect_stack_[0] != other.vect_stack_[0] ||
+           vect_stack_[1] != other.vect_stack_[1] ||
+           vect_stack_[2] != other.vect_stack_[2];
   }
 
   // Dereference operator for STL-compatible iterators.
diff --git a/tools/gn/eclipse_writer.cc b/tools/gn/eclipse_writer.cc
index 720231b..328d5da 100644
--- a/tools/gn/eclipse_writer.cc
+++ b/tools/gn/eclipse_writer.cc
@@ -50,10 +50,9 @@
 EclipseWriter::~EclipseWriter() = default;
 
 // static
-bool EclipseWriter::RunAndWriteFile(
-    const BuildSettings* build_settings,
-    const Builder& builder,
-    Err* err) {
+bool EclipseWriter::RunAndWriteFile(const BuildSettings* build_settings,
+                                    const Builder& builder,
+                                    Err* err) {
   base::FilePath file = build_settings->GetFullPath(build_settings->build_dir())
                             .AppendASCII("eclipse-cdt-settings.xml");
   std::ofstream file_out;
diff --git a/tools/gn/err.cc b/tools/gn/err.cc
index bdd6f4c..fe4db20 100644
--- a/tools/gn/err.cc
+++ b/tools/gn/err.cc
@@ -25,7 +25,8 @@
   return data.substr(line_off, end - line_off).as_string();
 }
 
-void FillRangeOnLine(const LocationRange& range, int line_number,
+void FillRangeOnLine(const LocationRange& range,
+                     int line_number,
                      std::string* line) {
   // Only bother if the range's begin or end overlaps the line. If the entire
   // line is highlighted as a result of this range, it's not very helpful.
@@ -85,17 +86,12 @@
 
 }  // namespace
 
-Err::Err() : has_error_(false) {
-}
+Err::Err() : has_error_(false) {}
 
 Err::Err(const Location& location,
          const std::string& msg,
          const std::string& help)
-    : has_error_(true),
-      location_(location),
-      message_(msg),
-      help_text_(help) {
-}
+    : has_error_(true), location_(location), message_(msg), help_text_(help) {}
 
 Err::Err(const LocationRange& range,
          const std::string& msg,
@@ -107,9 +103,7 @@
   ranges_.push_back(range);
 }
 
-Err::Err(const Token& token,
-         const std::string& msg,
-         const std::string& help)
+Err::Err(const Token& token, const std::string& msg, const std::string& help)
     : has_error_(true),
       location_(token.location()),
       message_(msg),
@@ -120,9 +114,7 @@
 Err::Err(const ParseNode* node,
          const std::string& msg,
          const std::string& help_text)
-    : has_error_(true),
-      message_(msg),
-      help_text_(help_text) {
+    : has_error_(true), message_(msg), help_text_(help_text) {
   // Node will be null in certain tests.
   if (node) {
     LocationRange range = node->GetRange();
@@ -134,9 +126,7 @@
 Err::Err(const Value& value,
          const std::string msg,
          const std::string& help_text)
-    : has_error_(true),
-      message_(msg),
-      help_text_(help_text) {
+    : has_error_(true), message_(msg), help_text_(help_text) {
   if (value.origin()) {
     LocationRange range = value.origin()->GetRange();
     location_ = range.begin();
@@ -184,8 +174,8 @@
 
   // Quoted line.
   if (input_file) {
-    std::string line = GetNthLine(input_file->contents(),
-                                  location_.line_number());
+    std::string line =
+        GetNthLine(input_file->contents(), location_.line_number());
     if (!base::ContainsOnlyChars(line, base::kWhitespaceASCII)) {
       OutputString(line + "\n", DECORATION_DIM);
       OutputHighlighedPosition(location_, ranges_, line.size());
diff --git a/tools/gn/escape.cc b/tools/gn/escape.cc
index 1bcc1e7..808f9f7 100644
--- a/tools/gn/escape.cc
+++ b/tools/gn/escape.cc
@@ -13,21 +13,21 @@
 
 // A "1" in this lookup table means that char is valid in the Posix shell.
 const char kShellValid[0x80] = {
-// 00-1f: all are invalid
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-// ' ' !  "  #  $  %  &  '  (  )  *  +  ,  -  .  /
+    // 00-1f: all are invalid
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0,
+    // ' ' !  "  #  $  %  &  '  (  )  *  +  ,  -  .  /
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
-//  0  1  2  3  4  5  6  7  8  9  :  ;  <  =  >  ?
+    //  0  1  2  3  4  5  6  7  8  9  :  ;  <  =  >  ?
     1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0,
-//  @  A  B  C  D  E  F  G  H  I  J  K  L  M  N  O
+    //  @  A  B  C  D  E  F  G  H  I  J  K  L  M  N  O
     1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-//  P  Q  R  S  T  U  V  W  X  Y  Z  [  \  ]  ^  _
+    //  P  Q  R  S  T  U  V  W  X  Y  Z  [  \  ]  ^  _
     1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1,
-//  `  a  b  c  d  e  f  g  h  i  j  k  l  m  n  o
+    //  `  a  b  c  d  e  f  g  h  i  j  k  l  m  n  o
     0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-//  p  q  r  s  t  u  v  w  x  y  z  {  |  }  ~
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 };
+    //  p  q  r  s  t  u  v  w  x  y  z  {  |  }  ~
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0};
 
 // Append one character to the given string, escaping it for Ninja.
 //
diff --git a/tools/gn/escape.h b/tools/gn/escape.h
index 838de94..d59a8eb 100644
--- a/tools/gn/escape.h
+++ b/tools/gn/escape.h
@@ -41,8 +41,7 @@
   EscapeOptions()
       : mode(ESCAPE_NONE),
         platform(ESCAPE_PLATFORM_CURRENT),
-        inhibit_quoting(false) {
-  }
+        inhibit_quoting(false) {}
 
   EscapingMode mode;
 
diff --git a/tools/gn/escape_unittest.cc b/tools/gn/escape_unittest.cc
index a03f469..cf716db 100644
--- a/tools/gn/escape_unittest.cc
+++ b/tools/gn/escape_unittest.cc
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "test/test.h"
 #include "tools/gn/escape.h"
+#include "test/test.h"
 
 TEST(Escape, Ninja) {
   EscapeOptions opts;
diff --git a/tools/gn/exec_process.cc b/tools/gn/exec_process.cc
index 092178d..6afc8a1 100644
--- a/tools/gn/exec_process.cc
+++ b/tools/gn/exec_process.cc
@@ -82,19 +82,17 @@
   // Keep the normal stdin.
   start_info.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
   // FIXME(brettw) set stderr here when we actually read it below.
-  //start_info.hStdError = err_write;
+  // start_info.hStdError = err_write;
   start_info.hStdError = GetStdHandle(STD_ERROR_HANDLE);
   start_info.dwFlags |= STARTF_USESTDHANDLES;
 
   // Create the child process.
   PROCESS_INFORMATION temp_process_info = {};
-  if (!CreateProcess(nullptr,
-                     &cmdline_str[0],
-                     nullptr, nullptr,
+  if (!CreateProcess(nullptr, &cmdline_str[0], nullptr, nullptr,
                      TRUE,  // Handles are inherited.
                      NORMAL_PRIORITY_CLASS, nullptr,
-                     startup_dir.value().c_str(),
-                     &start_info, &temp_process_info)) {
+                     startup_dir.value().c_str(), &start_info,
+                     &temp_process_info)) {
     return false;
   }
   base::win::ScopedProcessInformation proc_info(temp_process_info);
@@ -177,78 +175,77 @@
     case -1:  // error
       return false;
     case 0:  // child
-      {
-        // DANGER: no calls to malloc are allowed from now on:
-        // http://crbug.com/36678
-        //
-        // STL iterators are also not allowed (including those implied
-        // by range-based for loops), since debug iterators use locks.
+    {
+      // DANGER: no calls to malloc are allowed from now on:
+      // http://crbug.com/36678
+      //
+      // STL iterators are also not allowed (including those implied
+      // by range-based for loops), since debug iterators use locks.
 
-        // Obscure fork() rule: in the child, if you don't end up doing exec*(),
-        // you call _exit() instead of exit(). This is because _exit() does not
-        // call any previously-registered (in the parent) exit handlers, which
-        // might do things like block waiting for threads that don't even exist
-        // in the child.
-        int dev_null = open("/dev/null", O_WRONLY);
-        if (dev_null < 0)
-          _exit(127);
-
-        fd_shuffle1.push_back(
-            base::InjectionArc(out_write.get(), STDOUT_FILENO, true));
-        fd_shuffle1.push_back(
-            base::InjectionArc(err_write.get(), STDERR_FILENO, true));
-        fd_shuffle1.push_back(
-            base::InjectionArc(dev_null, STDIN_FILENO, true));
-        // Adding another element here? Remeber to increase the argument to
-        // reserve(), above.
-
-        // DANGER: Do NOT convert to range-based for loop!
-        for (size_t i = 0; i < fd_shuffle1.size(); ++i)
-          fd_shuffle2.push_back(fd_shuffle1[i]);
-
-        if (!ShuffleFileDescriptors(&fd_shuffle1))
-          _exit(127);
-
-        base::SetCurrentDirectory(startup_dir);
-
-        // TODO(brettw) the base version GetAppOutput does a
-        // CloseSuperfluousFds call here. Do we need this?
-
-        // DANGER: Do NOT convert to range-based for loop!
-        for (size_t i = 0; i < argv.size(); i++)
-          argv_cstr[i] = const_cast<char*>(argv[i].c_str());
-        argv_cstr[argv.size()] = nullptr;
-        execvp(argv_cstr[0], argv_cstr.get());
+      // Obscure fork() rule: in the child, if you don't end up doing exec*(),
+      // you call _exit() instead of exit(). This is because _exit() does not
+      // call any previously-registered (in the parent) exit handlers, which
+      // might do things like block waiting for threads that don't even exist
+      // in the child.
+      int dev_null = open("/dev/null", O_WRONLY);
+      if (dev_null < 0)
         _exit(127);
-      }
+
+      fd_shuffle1.push_back(
+          base::InjectionArc(out_write.get(), STDOUT_FILENO, true));
+      fd_shuffle1.push_back(
+          base::InjectionArc(err_write.get(), STDERR_FILENO, true));
+      fd_shuffle1.push_back(base::InjectionArc(dev_null, STDIN_FILENO, true));
+      // Adding another element here? Remeber to increase the argument to
+      // reserve(), above.
+
+      // DANGER: Do NOT convert to range-based for loop!
+      for (size_t i = 0; i < fd_shuffle1.size(); ++i)
+        fd_shuffle2.push_back(fd_shuffle1[i]);
+
+      if (!ShuffleFileDescriptors(&fd_shuffle1))
+        _exit(127);
+
+      base::SetCurrentDirectory(startup_dir);
+
+      // TODO(brettw) the base version GetAppOutput does a
+      // CloseSuperfluousFds call here. Do we need this?
+
+      // DANGER: Do NOT convert to range-based for loop!
+      for (size_t i = 0; i < argv.size(); i++)
+        argv_cstr[i] = const_cast<char*>(argv[i].c_str());
+      argv_cstr[argv.size()] = nullptr;
+      execvp(argv_cstr[0], argv_cstr.get());
+      _exit(127);
+    }
     default:  // parent
-      {
-        // Close our writing end of pipe now. Otherwise later read would not
-        // be able to detect end of child's output (in theory we could still
-        // write to the pipe).
-        out_write.reset();
-        err_write.reset();
+    {
+      // Close our writing end of pipe now. Otherwise later read would not
+      // be able to detect end of child's output (in theory we could still
+      // write to the pipe).
+      out_write.reset();
+      err_write.reset();
 
-        bool out_open = true, err_open = true;
-        while (out_open || err_open) {
-          fd_set read_fds;
-          FD_ZERO(&read_fds);
-          FD_SET(out_read.get(), &read_fds);
-          FD_SET(err_read.get(), &read_fds);
-          int res =
-              HANDLE_EINTR(select(std::max(out_read.get(), err_read.get()) + 1,
-                                  &read_fds, nullptr, nullptr, nullptr));
-          if (res <= 0)
-            break;
-          if (FD_ISSET(out_read.get(), &read_fds))
-            out_open = ReadFromPipe(out_read.get(), std_out);
-          if (FD_ISSET(err_read.get(), &read_fds))
-            err_open = ReadFromPipe(err_read.get(), std_err);
-        }
-
-        base::Process process(pid);
-        return process.WaitForExit(exit_code);
+      bool out_open = true, err_open = true;
+      while (out_open || err_open) {
+        fd_set read_fds;
+        FD_ZERO(&read_fds);
+        FD_SET(out_read.get(), &read_fds);
+        FD_SET(err_read.get(), &read_fds);
+        int res =
+            HANDLE_EINTR(select(std::max(out_read.get(), err_read.get()) + 1,
+                                &read_fds, nullptr, nullptr, nullptr));
+        if (res <= 0)
+          break;
+        if (FD_ISSET(out_read.get(), &read_fds))
+          out_open = ReadFromPipe(out_read.get(), std_out);
+        if (FD_ISSET(err_read.get(), &read_fds))
+          err_open = ReadFromPipe(err_read.get(), std_err);
       }
+
+      base::Process process(pid);
+      return process.WaitForExit(exit_code);
+    }
   }
 
   return false;
@@ -256,4 +253,3 @@
 #endif
 
 }  // namespace internal
-
diff --git a/tools/gn/exec_process.h b/tools/gn/exec_process.h
index 4d010d5..43c2a1d 100644
--- a/tools/gn/exec_process.h
+++ b/tools/gn/exec_process.h
@@ -10,7 +10,7 @@
 namespace base {
 class CommandLine;
 class FilePath;
-}
+}  // namespace base
 
 namespace internal {
 
diff --git a/tools/gn/exec_process_unittest.cc b/tools/gn/exec_process_unittest.cc
index 0dfbfeb..a6e0f84 100644
--- a/tools/gn/exec_process_unittest.cc
+++ b/tools/gn/exec_process_unittest.cc
@@ -58,8 +58,7 @@
       ExecPython("import sys; sys.exit(253)", &std_out, &std_err, &exit_code));
   EXPECT_EQ(253, exit_code);
 
-  ASSERT_TRUE(
-      ExecPython("throw Exception()", &std_out, &std_err, &exit_code));
+  ASSERT_TRUE(ExecPython("throw Exception()", &std_out, &std_err, &exit_code));
   EXPECT_EQ(1, exit_code);
 }
 
@@ -72,8 +71,8 @@
   std::string std_out, std_err;
   int exit_code;
 
-  ASSERT_TRUE(ExecPython(
-      "import sys; print 'o' * 1000000", &std_out, &std_err, &exit_code));
+  ASSERT_TRUE(ExecPython("import sys; print 'o' * 1000000", &std_out, &std_err,
+                         &exit_code));
   EXPECT_EQ(0, exit_code);
   EXPECT_EQ(1000001u, std_out.size());
 }
@@ -85,9 +84,7 @@
 
   ASSERT_TRUE(ExecPython(
       "import sys; print 'o' * 10000; print >>sys.stderr, 'e' * 10000",
-      &std_out,
-      &std_err,
-      &exit_code));
+      &std_out, &std_err, &exit_code));
   EXPECT_EQ(0, exit_code);
   EXPECT_EQ(10001u, std_out.size());
   EXPECT_EQ(10001u, std_err.size());
@@ -96,9 +93,7 @@
   std_err.clear();
   ASSERT_TRUE(ExecPython(
       "import sys; print >>sys.stderr, 'e' * 10000; print 'o' * 10000",
-      &std_out,
-      &std_err,
-      &exit_code));
+      &std_out, &std_err, &exit_code));
   EXPECT_EQ(0, exit_code);
   EXPECT_EQ(10001u, std_out.size());
   EXPECT_EQ(10001u, std_err.size());
@@ -109,9 +104,7 @@
   int exit_code;
 
   ASSERT_TRUE(ExecPython("import sys; sys.stderr.close(); print 'o' * 10000",
-                         &std_out,
-                         &std_err,
-                         &exit_code));
+                         &std_out, &std_err, &exit_code));
   EXPECT_EQ(0, exit_code);
   EXPECT_EQ(10001u, std_out.size());
   EXPECT_EQ(std_err.size(), 0u);
@@ -120,9 +113,7 @@
   std_err.clear();
   ASSERT_TRUE(ExecPython(
       "import sys; sys.stdout.close(); print >>sys.stderr, 'e' * 10000",
-      &std_out,
-      &std_err,
-      &exit_code));
+      &std_out, &std_err, &exit_code));
   EXPECT_EQ(0, exit_code);
   EXPECT_EQ(0u, std_out.size());
   EXPECT_EQ(10001u, std_err.size());
diff --git a/tools/gn/filesystem_utils.cc b/tools/gn/filesystem_utils.cc
index 37582a9..923fa5a 100644
--- a/tools/gn/filesystem_utils.cc
+++ b/tools/gn/filesystem_utils.cc
@@ -159,8 +159,8 @@
   // Note: The documentation for CompareString says it runs fastest on
   // null-terminated strings with -1 passed for the length, so we do that here.
   // There should not be embedded nulls in filesystem strings.
-  return ::CompareString(LOCALE_USER_DEFAULT, LINGUISTIC_IGNORECASE,
-                         a.c_str(), -1, b.c_str(), -1) == CSTR_EQUAL;
+  return ::CompareString(LOCALE_USER_DEFAULT, LINGUISTIC_IGNORECASE, a.c_str(),
+                         -1, b.c_str(), -1) == CSTR_EQUAL;
 #else
   // Assume case-sensitive filesystems on non-Windows.
   return a == b;
@@ -311,11 +311,12 @@
   if (IsStringInOutputDir(output_dir, str))
     return true;  // Output directory is hardcoded.
 
-  *err = Err(origin, "File is not inside output directory.",
+  *err = Err(
+      origin, "File is not inside output directory.",
       "The given file should be in the output directory. Normally you would "
       "specify\n\"$target_out_dir/foo\" or "
-      "\"$target_gen_dir/foo\". I interpreted this as\n\""
-      + str + "\".");
+      "\"$target_gen_dir/foo\". I interpreted this as\n\"" +
+          str + "\".");
   return false;
 }
 
@@ -659,8 +660,8 @@
   std::string ret;
   DCHECK(source_root.empty() || !source_root.ends_with("/"));
 
-  bool input_is_source_path = (input.size() >= 2 &&
-                               input[0] == '/' && input[1] == '/');
+  bool input_is_source_path =
+      (input.size() >= 2 && input[0] == '/' && input[1] == '/');
 
   if (!source_root.empty() &&
       (!input_is_source_path || !dest_dir.is_source_absolute())) {
@@ -828,8 +829,7 @@
                            const base::FilePath& path) {
   std::vector<base::FilePath::StringType> source_comp =
       GetPathComponents(source_root);
-  std::vector<base::FilePath::StringType> path_comp =
-      GetPathComponents(path);
+  std::vector<base::FilePath::StringType> path_comp = GetPathComponents(path);
 
   // See if path is inside the source root by looking for each of source root's
   // components at the beginning of path.
@@ -909,7 +909,8 @@
   return WriteFile(file_path, data, err);
 }
 
-bool WriteFile(const base::FilePath& file_path, const std::string& data,
+bool WriteFile(const base::FilePath& file_path,
+               const std::string& data,
                Err* err) {
   // Create the directory if necessary.
   if (!base::CreateDirectory(file_path.DirName())) {
@@ -969,39 +970,34 @@
 }
 
 BuildDirContext::BuildDirContext(const Target* target)
-    : BuildDirContext(target->settings()) {
-}
+    : BuildDirContext(target->settings()) {}
 
 BuildDirContext::BuildDirContext(const Settings* settings)
     : BuildDirContext(settings->build_settings(),
                       settings->toolchain_label(),
-                      settings->is_default()) {
-}
+                      settings->is_default()) {}
 
 BuildDirContext::BuildDirContext(const Scope* execution_scope)
-    : BuildDirContext(execution_scope->settings()) {
-}
+    : BuildDirContext(execution_scope->settings()) {}
 
 BuildDirContext::BuildDirContext(const Scope* execution_scope,
                                  const Label& toolchain_label)
     : BuildDirContext(execution_scope->settings()->build_settings(),
                       toolchain_label,
                       execution_scope->settings()->default_toolchain_label() ==
-                          toolchain_label) {
-}
+                          toolchain_label) {}
 
 BuildDirContext::BuildDirContext(const BuildSettings* in_build_settings,
                                  const Label& in_toolchain_label,
                                  bool in_is_default_toolchain)
     : build_settings(in_build_settings),
       toolchain_label(in_toolchain_label),
-      is_default_toolchain(in_is_default_toolchain) {
-}
+      is_default_toolchain(in_is_default_toolchain) {}
 
 SourceDir GetBuildDirAsSourceDir(const BuildDirContext& context,
                                  BuildDirType type) {
-  return GetBuildDirAsOutputFile(context, type).AsSourceDir(
-      context.build_settings);
+  return GetBuildDirAsOutputFile(context, type)
+      .AsSourceDir(context.build_settings);
 }
 
 OutputFile GetBuildDirAsOutputFile(const BuildDirContext& context,
@@ -1044,20 +1040,20 @@
 
 SourceDir GetBuildDirForTargetAsSourceDir(const Target* target,
                                           BuildDirType type) {
-  return GetSubBuildDirAsSourceDir(
-      BuildDirContext(target), target->label().dir(), type);
+  return GetSubBuildDirAsSourceDir(BuildDirContext(target),
+                                   target->label().dir(), type);
 }
 
 OutputFile GetBuildDirForTargetAsOutputFile(const Target* target,
                                             BuildDirType type) {
-  return GetSubBuildDirAsOutputFile(
-      BuildDirContext(target), target->label().dir(), type);
+  return GetSubBuildDirAsOutputFile(BuildDirContext(target),
+                                    target->label().dir(), type);
 }
 
 SourceDir GetScopeCurrentBuildDirAsSourceDir(const Scope* scope,
                                              BuildDirType type) {
   if (type == BuildDirType::TOOLCHAIN_ROOT)
     return GetBuildDirAsSourceDir(BuildDirContext(scope), type);
-  return GetSubBuildDirAsSourceDir(
-      BuildDirContext(scope), scope->GetSourceDir(), type);
+  return GetSubBuildDirAsSourceDir(BuildDirContext(scope),
+                                   scope->GetSourceDir(), type);
 }
diff --git a/tools/gn/filesystem_utils.h b/tools/gn/filesystem_utils.h
index 1313279..220c4f8 100644
--- a/tools/gn/filesystem_utils.h
+++ b/tools/gn/filesystem_utils.h
@@ -215,7 +215,8 @@
 
 // Writes given stream contents to the given file. Returns true if data was
 // successfully written, false otherwise. |err| is set on error if not nullptr.
-bool WriteFile(const base::FilePath& file_path, const std::string& data,
+bool WriteFile(const base::FilePath& file_path,
+               const std::string& data,
                Err* err);
 
 // -----------------------------------------------------------------------------
diff --git a/tools/gn/filesystem_utils_unittest.cc b/tools/gn/filesystem_utils_unittest.cc
index a2504ba..38ddd6f 100644
--- a/tools/gn/filesystem_utils_unittest.cc
+++ b/tools/gn/filesystem_utils_unittest.cc
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "tools/gn/filesystem_utils.h"
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
@@ -10,7 +11,6 @@
 #include "base/threading/platform_thread.h"
 #include "build_config.h"
 #include "test/test.h"
-#include "tools/gn/filesystem_utils.h"
 #include "tools/gn/target.h"
 
 TEST(FilesystemUtils, FileExtensionOffset) {
@@ -143,33 +143,32 @@
   std::string dest;
 
 #if defined(OS_WIN)
-  EXPECT_TRUE(MakeAbsolutePathRelativeIfPossible("C:\\base", "C:\\base\\foo",
-                                                 &dest));
+  EXPECT_TRUE(
+      MakeAbsolutePathRelativeIfPossible("C:\\base", "C:\\base\\foo", &dest));
   EXPECT_EQ("//foo", dest);
-  EXPECT_TRUE(MakeAbsolutePathRelativeIfPossible("C:\\base", "/C:/base/foo",
-                                                 &dest));
+  EXPECT_TRUE(
+      MakeAbsolutePathRelativeIfPossible("C:\\base", "/C:/base/foo", &dest));
   EXPECT_EQ("//foo", dest);
-  EXPECT_TRUE(MakeAbsolutePathRelativeIfPossible("c:\\base", "C:\\base\\foo\\",
-                                                 &dest));
+  EXPECT_TRUE(
+      MakeAbsolutePathRelativeIfPossible("c:\\base", "C:\\base\\foo\\", &dest));
   EXPECT_EQ("//foo\\", dest);
 
   EXPECT_FALSE(MakeAbsolutePathRelativeIfPossible("C:\\base", "C:\\ba", &dest));
   EXPECT_FALSE(MakeAbsolutePathRelativeIfPossible("C:\\base",
-                                                  "C:\\/notbase/foo",
-                                                  &dest));
+                                                  "C:\\/notbase/foo", &dest));
 #else
 
   EXPECT_TRUE(MakeAbsolutePathRelativeIfPossible("/base", "/base/foo/", &dest));
   EXPECT_EQ("//foo/", dest);
   EXPECT_TRUE(MakeAbsolutePathRelativeIfPossible("/base", "/base/foo", &dest));
   EXPECT_EQ("//foo", dest);
-  EXPECT_TRUE(MakeAbsolutePathRelativeIfPossible("/base/", "/base/foo/",
-                                                 &dest));
+  EXPECT_TRUE(
+      MakeAbsolutePathRelativeIfPossible("/base/", "/base/foo/", &dest));
   EXPECT_EQ("//foo/", dest);
 
   EXPECT_FALSE(MakeAbsolutePathRelativeIfPossible("/base", "/ba", &dest));
-  EXPECT_FALSE(MakeAbsolutePathRelativeIfPossible("/base", "/notbase/foo",
-                                                  &dest));
+  EXPECT_FALSE(
+      MakeAbsolutePathRelativeIfPossible("/base", "/notbase/foo", &dest));
 #endif
 }
 
@@ -423,45 +422,43 @@
 
   // Degenerate case.
   EXPECT_EQ(".", RebasePath("//", SourceDir("//"), source_root));
-  EXPECT_EQ(".", RebasePath("//foo/bar/", SourceDir("//foo/bar/"),
-                            source_root));
+  EXPECT_EQ(".",
+            RebasePath("//foo/bar/", SourceDir("//foo/bar/"), source_root));
 
   // Going up the tree.
   EXPECT_EQ("../foo", RebasePath("//foo", SourceDir("//bar/"), source_root));
   EXPECT_EQ("../foo/", RebasePath("//foo/", SourceDir("//bar/"), source_root));
-  EXPECT_EQ("../../foo", RebasePath("//foo", SourceDir("//bar/moo"),
-                                    source_root));
-  EXPECT_EQ("../../foo/", RebasePath("//foo/", SourceDir("//bar/moo"),
-                                     source_root));
+  EXPECT_EQ("../../foo",
+            RebasePath("//foo", SourceDir("//bar/moo"), source_root));
+  EXPECT_EQ("../../foo/",
+            RebasePath("//foo/", SourceDir("//bar/moo"), source_root));
 
   // Going down the tree.
   EXPECT_EQ("foo/bar", RebasePath("//foo/bar", SourceDir("//"), source_root));
-  EXPECT_EQ("foo/bar/", RebasePath("//foo/bar/", SourceDir("//"),
-                                   source_root));
+  EXPECT_EQ("foo/bar/", RebasePath("//foo/bar/", SourceDir("//"), source_root));
 
   // Going up and down the tree.
-  EXPECT_EQ("../../foo/bar", RebasePath("//foo/bar", SourceDir("//a/b/"),
-                                        source_root));
-  EXPECT_EQ("../../foo/bar/", RebasePath("//foo/bar/", SourceDir("//a/b/"),
-                                         source_root));
+  EXPECT_EQ("../../foo/bar",
+            RebasePath("//foo/bar", SourceDir("//a/b/"), source_root));
+  EXPECT_EQ("../../foo/bar/",
+            RebasePath("//foo/bar/", SourceDir("//a/b/"), source_root));
 
   // Sharing prefix.
   EXPECT_EQ("foo", RebasePath("//a/foo", SourceDir("//a/"), source_root));
   EXPECT_EQ("foo/", RebasePath("//a/foo/", SourceDir("//a/"), source_root));
   EXPECT_EQ("foo", RebasePath("//a/b/foo", SourceDir("//a/b/"), source_root));
-  EXPECT_EQ("foo/", RebasePath("//a/b/foo/", SourceDir("//a/b/"),
-                               source_root));
-  EXPECT_EQ("foo/bar", RebasePath("//a/b/foo/bar", SourceDir("//a/b/"),
-                                  source_root));
-  EXPECT_EQ("foo/bar/", RebasePath("//a/b/foo/bar/", SourceDir("//a/b/"),
-                                   source_root));
+  EXPECT_EQ("foo/", RebasePath("//a/b/foo/", SourceDir("//a/b/"), source_root));
+  EXPECT_EQ("foo/bar",
+            RebasePath("//a/b/foo/bar", SourceDir("//a/b/"), source_root));
+  EXPECT_EQ("foo/bar/",
+            RebasePath("//a/b/foo/bar/", SourceDir("//a/b/"), source_root));
 
   // One could argue about this case. Since the input doesn't have a slash it
   // would normally not be treated like a directory and we'd go up, which is
   // simpler. However, since it matches the output directory's name, we could
   // potentially infer that it's the same and return "." for this.
-  EXPECT_EQ("../bar", RebasePath("//foo/bar", SourceDir("//foo/bar/"),
-                                 source_root));
+  EXPECT_EQ("../bar",
+            RebasePath("//foo/bar", SourceDir("//foo/bar/"), source_root));
 
   // Check when only |input| is system-absolute
   EXPECT_EQ("foo", RebasePath("/source/root/foo", SourceDir("//"),
@@ -477,9 +474,8 @@
   EXPECT_EQ("../../../builddir/Out/Debug/",
             RebasePath("/builddir/Out/Debug/", SourceDir("//"),
                        base::StringPiece("/source/root/foo")));
-  EXPECT_EQ("../../path/to/foo",
-            RebasePath("/path/to/foo", SourceDir("//"),
-                       base::StringPiece("/source/root")));
+  EXPECT_EQ("../../path/to/foo", RebasePath("/path/to/foo", SourceDir("//"),
+                                            base::StringPiece("/source/root")));
   EXPECT_EQ("../../../path/to/foo",
             RebasePath("/path/to/foo", SourceDir("//a"),
                        base::StringPiece("/source/root")));
@@ -488,15 +484,12 @@
                        base::StringPiece("/source/root")));
 
   // Check when only |dest_dir| is system-absolute.
-  EXPECT_EQ(".",
-            RebasePath("//", SourceDir("/source/root"),
-                       base::StringPiece("/source/root")));
-  EXPECT_EQ("foo",
-            RebasePath("//foo", SourceDir("/source/root"),
-                       base::StringPiece("/source/root")));
-  EXPECT_EQ("../foo",
-            RebasePath("//foo", SourceDir("/source/root/bar"),
-                       base::StringPiece("/source/root")));
+  EXPECT_EQ(".", RebasePath("//", SourceDir("/source/root"),
+                            base::StringPiece("/source/root")));
+  EXPECT_EQ("foo", RebasePath("//foo", SourceDir("/source/root"),
+                              base::StringPiece("/source/root")));
+  EXPECT_EQ("../foo", RebasePath("//foo", SourceDir("/source/root/bar"),
+                                 base::StringPiece("/source/root")));
   EXPECT_EQ("../../../source/root/foo",
             RebasePath("//foo", SourceDir("/other/source/root"),
                        base::StringPiece("/source/root")));
@@ -507,14 +500,12 @@
   // Check when |input| and |dest_dir| are both system-absolute. Also,
   // in this case |source_root| is never used so set it to a dummy
   // value.
-  EXPECT_EQ("foo",
-            RebasePath("/source/root/foo", SourceDir("/source/root"),
-                       base::StringPiece("/x/y/z")));
-  EXPECT_EQ("foo/",
-            RebasePath("/source/root/foo/", SourceDir("/source/root"),
-                       base::StringPiece("/x/y/z")));
+  EXPECT_EQ("foo", RebasePath("/source/root/foo", SourceDir("/source/root"),
+                              base::StringPiece("/x/y/z")));
+  EXPECT_EQ("foo/", RebasePath("/source/root/foo/", SourceDir("/source/root"),
+                               base::StringPiece("/x/y/z")));
   EXPECT_EQ("../../builddir/Out/Debug",
-            RebasePath("/builddir/Out/Debug",SourceDir("/source/root"),
+            RebasePath("/builddir/Out/Debug", SourceDir("/source/root"),
                        base::StringPiece("/x/y/z")));
   EXPECT_EQ("../../../builddir/Out/Debug",
             RebasePath("/builddir/Out/Debug", SourceDir("/source/root/foo"),
@@ -563,32 +554,35 @@
 TEST(FilesystemUtils, SourceDirForPath) {
 #if defined(OS_WIN)
   base::FilePath root(L"C:\\source\\foo\\");
-  EXPECT_EQ("/C:/foo/bar/", SourceDirForPath(root,
-            base::FilePath(L"C:\\foo\\bar")).value());
-  EXPECT_EQ("/", SourceDirForPath(root,
-            base::FilePath(L"/")).value());
-  EXPECT_EQ("//", SourceDirForPath(root,
-            base::FilePath(L"C:\\source\\foo")).value());
-  EXPECT_EQ("//bar/", SourceDirForPath(root,
-            base::FilePath(L"C:\\source\\foo\\bar\\")). value());
-  EXPECT_EQ("//bar/baz/", SourceDirForPath(root,
-            base::FilePath(L"C:\\source\\foo\\bar\\baz")).value());
+  EXPECT_EQ("/C:/foo/bar/",
+            SourceDirForPath(root, base::FilePath(L"C:\\foo\\bar")).value());
+  EXPECT_EQ("/", SourceDirForPath(root, base::FilePath(L"/")).value());
+  EXPECT_EQ("//",
+            SourceDirForPath(root, base::FilePath(L"C:\\source\\foo")).value());
+  EXPECT_EQ("//bar/",
+            SourceDirForPath(root, base::FilePath(L"C:\\source\\foo\\bar\\"))
+                .value());
+  EXPECT_EQ("//bar/baz/",
+            SourceDirForPath(root, base::FilePath(L"C:\\source\\foo\\bar\\baz"))
+                .value());
 
   // Should be case-and-slash-insensitive.
-  EXPECT_EQ("//baR/", SourceDirForPath(root,
-            base::FilePath(L"c:/SOURCE\\Foo/baR/")).value());
+  EXPECT_EQ(
+      "//baR/",
+      SourceDirForPath(root, base::FilePath(L"c:/SOURCE\\Foo/baR/")).value());
 
   // Some "weird" Windows paths.
-  EXPECT_EQ("/foo/bar/", SourceDirForPath(root,
-            base::FilePath(L"/foo/bar/")).value());
-  EXPECT_EQ("/C:/foo/bar/", SourceDirForPath(root,
-            base::FilePath(L"C:foo/bar/")).value());
+  EXPECT_EQ("/foo/bar/",
+            SourceDirForPath(root, base::FilePath(L"/foo/bar/")).value());
+  EXPECT_EQ("/C:/foo/bar/",
+            SourceDirForPath(root, base::FilePath(L"C:foo/bar/")).value());
 
   // Also allow absolute GN-style Windows paths.
-  EXPECT_EQ("/C:/foo/bar/", SourceDirForPath(root,
-            base::FilePath(L"/C:/foo/bar")).value());
-  EXPECT_EQ("//bar/", SourceDirForPath(root,
-            base::FilePath(L"/C:/source/foo/bar")).value());
+  EXPECT_EQ("/C:/foo/bar/",
+            SourceDirForPath(root, base::FilePath(L"/C:/foo/bar")).value());
+  EXPECT_EQ(
+      "//bar/",
+      SourceDirForPath(root, base::FilePath(L"/C:/source/foo/bar")).value());
 
   // Empty source dir.
   base::FilePath empty;
@@ -597,20 +591,20 @@
       SourceDirForPath(empty, base::FilePath(L"C:\\source\\foo")).value());
 #else
   base::FilePath root("/source/foo/");
-  EXPECT_EQ("/foo/bar/", SourceDirForPath(root,
-            base::FilePath("/foo/bar/")).value());
-  EXPECT_EQ("/", SourceDirForPath(root,
-            base::FilePath("/")).value());
-  EXPECT_EQ("//", SourceDirForPath(root,
-            base::FilePath("/source/foo")).value());
-  EXPECT_EQ("//bar/", SourceDirForPath(root,
-            base::FilePath("/source/foo/bar/")).value());
-  EXPECT_EQ("//bar/baz/", SourceDirForPath(root,
-            base::FilePath("/source/foo/bar/baz/")).value());
+  EXPECT_EQ("/foo/bar/",
+            SourceDirForPath(root, base::FilePath("/foo/bar/")).value());
+  EXPECT_EQ("/", SourceDirForPath(root, base::FilePath("/")).value());
+  EXPECT_EQ("//",
+            SourceDirForPath(root, base::FilePath("/source/foo")).value());
+  EXPECT_EQ("//bar/",
+            SourceDirForPath(root, base::FilePath("/source/foo/bar/")).value());
+  EXPECT_EQ(
+      "//bar/baz/",
+      SourceDirForPath(root, base::FilePath("/source/foo/bar/baz/")).value());
 
   // Should be case-sensitive.
-  EXPECT_EQ("/SOURCE/foo/bar/", SourceDirForPath(root,
-            base::FilePath("/SOURCE/foo/bar/")).value());
+  EXPECT_EQ("/SOURCE/foo/bar/",
+            SourceDirForPath(root, base::FilePath("/SOURCE/foo/bar/")).value());
 
   // Empty source dir.
   base::FilePath empty;
@@ -685,26 +679,24 @@
   BuildDirContext default_context(&default_settings);
 
   // Default toolchain out dir as source dirs.
-  EXPECT_EQ("//out/Debug/",
-            GetBuildDirAsSourceDir(default_context,
-                                   BuildDirType::TOOLCHAIN_ROOT).value());
+  EXPECT_EQ("//out/Debug/", GetBuildDirAsSourceDir(default_context,
+                                                   BuildDirType::TOOLCHAIN_ROOT)
+                                .value());
   EXPECT_EQ("//out/Debug/obj/",
-            GetBuildDirAsSourceDir(default_context,
-                                   BuildDirType::OBJ).value());
+            GetBuildDirAsSourceDir(default_context, BuildDirType::OBJ).value());
   EXPECT_EQ("//out/Debug/gen/",
-            GetBuildDirAsSourceDir(default_context,
-                                   BuildDirType::GEN).value());
+            GetBuildDirAsSourceDir(default_context, BuildDirType::GEN).value());
 
   // Default toolchain our dir as output files.
-  EXPECT_EQ("",
-            GetBuildDirAsOutputFile(default_context,
-                                    BuildDirType::TOOLCHAIN_ROOT).value());
-  EXPECT_EQ("obj/",
-            GetBuildDirAsOutputFile(default_context,
-                                    BuildDirType::OBJ).value());
-  EXPECT_EQ("gen/",
-            GetBuildDirAsOutputFile(default_context,
-                                    BuildDirType::GEN).value());
+  EXPECT_EQ(
+      "", GetBuildDirAsOutputFile(default_context, BuildDirType::TOOLCHAIN_ROOT)
+              .value());
+  EXPECT_EQ(
+      "obj/",
+      GetBuildDirAsOutputFile(default_context, BuildDirType::OBJ).value());
+  EXPECT_EQ(
+      "gen/",
+      GetBuildDirAsOutputFile(default_context, BuildDirType::GEN).value());
 
   // Check a secondary toolchain.
   Settings other_settings(&build_settings, "two/");
@@ -715,25 +707,21 @@
 
   // Secondary toolchain out dir as source dirs.
   EXPECT_EQ("//out/Debug/two/",
-            GetBuildDirAsSourceDir(other_context,
-                                   BuildDirType::TOOLCHAIN_ROOT).value());
+            GetBuildDirAsSourceDir(other_context, BuildDirType::TOOLCHAIN_ROOT)
+                .value());
   EXPECT_EQ("//out/Debug/two/obj/",
-            GetBuildDirAsSourceDir(other_context,
-                                   BuildDirType::OBJ).value());
+            GetBuildDirAsSourceDir(other_context, BuildDirType::OBJ).value());
   EXPECT_EQ("//out/Debug/two/gen/",
-            GetBuildDirAsSourceDir(other_context,
-                                   BuildDirType::GEN).value());
+            GetBuildDirAsSourceDir(other_context, BuildDirType::GEN).value());
 
   // Secondary toolchain out dir as output files.
   EXPECT_EQ("two/",
-            GetBuildDirAsOutputFile(other_context,
-                                    BuildDirType::TOOLCHAIN_ROOT).value());
+            GetBuildDirAsOutputFile(other_context, BuildDirType::TOOLCHAIN_ROOT)
+                .value());
   EXPECT_EQ("two/obj/",
-            GetBuildDirAsOutputFile(other_context,
-                                    BuildDirType::OBJ).value());
+            GetBuildDirAsOutputFile(other_context, BuildDirType::OBJ).value());
   EXPECT_EQ("two/gen/",
-            GetBuildDirAsOutputFile(other_context,
-                                    BuildDirType::GEN).value());
+            GetBuildDirAsOutputFile(other_context, BuildDirType::GEN).value());
 }
 
 TEST(FilesystemUtils, GetSubBuildDir) {
@@ -749,21 +737,22 @@
 
   // Target in the root.
   EXPECT_EQ("//out/Debug/obj/",
-            GetSubBuildDirAsSourceDir(
-                default_context, SourceDir("//"), BuildDirType::OBJ).value());
-  EXPECT_EQ("gen/",
-            GetSubBuildDirAsOutputFile(
-                default_context, SourceDir("//"), BuildDirType::GEN).value());
+            GetSubBuildDirAsSourceDir(default_context, SourceDir("//"),
+                                      BuildDirType::OBJ)
+                .value());
+  EXPECT_EQ("gen/", GetSubBuildDirAsOutputFile(default_context, SourceDir("//"),
+                                               BuildDirType::GEN)
+                        .value());
 
   // Target in another directory.
   EXPECT_EQ("//out/Debug/obj/foo/bar/",
-            GetSubBuildDirAsSourceDir(
-                default_context, SourceDir("//foo/bar/"), BuildDirType::OBJ)
-            .value());
+            GetSubBuildDirAsSourceDir(default_context, SourceDir("//foo/bar/"),
+                                      BuildDirType::OBJ)
+                .value());
   EXPECT_EQ("gen/foo/bar/",
-            GetSubBuildDirAsOutputFile(
-                default_context, SourceDir("//foo/bar/"), BuildDirType::GEN)
-            .value());
+            GetSubBuildDirAsOutputFile(default_context, SourceDir("//foo/bar/"),
+                                       BuildDirType::GEN)
+                .value());
 
   // Secondary toolchain.
   Settings other_settings(&build_settings, "two/");
@@ -773,37 +762,40 @@
 
   // Target in the root.
   EXPECT_EQ("//out/Debug/two/obj/",
-            GetSubBuildDirAsSourceDir(
-                other_context, SourceDir("//"), BuildDirType::OBJ).value());
-  EXPECT_EQ("two/gen/",
-            GetSubBuildDirAsOutputFile(
-                other_context, SourceDir("//"), BuildDirType::GEN).value());
+            GetSubBuildDirAsSourceDir(other_context, SourceDir("//"),
+                                      BuildDirType::OBJ)
+                .value());
+  EXPECT_EQ("two/gen/", GetSubBuildDirAsOutputFile(
+                            other_context, SourceDir("//"), BuildDirType::GEN)
+                            .value());
 
   // Target in another directory.
   EXPECT_EQ("//out/Debug/two/obj/foo/bar/",
-            GetSubBuildDirAsSourceDir(
-                other_context, SourceDir("//foo/bar/"), BuildDirType::OBJ)
-            .value());
+            GetSubBuildDirAsSourceDir(other_context, SourceDir("//foo/bar/"),
+                                      BuildDirType::OBJ)
+                .value());
   EXPECT_EQ("two/gen/foo/bar/",
-            GetSubBuildDirAsOutputFile(
-                other_context, SourceDir("//foo/bar/"), BuildDirType::GEN)
-            .value());
+            GetSubBuildDirAsOutputFile(other_context, SourceDir("//foo/bar/"),
+                                       BuildDirType::GEN)
+                .value());
 
   // Absolute source path
   EXPECT_EQ("//out/Debug/obj/ABS_PATH/abs/",
-            GetSubBuildDirAsSourceDir(
-                default_context, SourceDir("/abs"), BuildDirType::OBJ).value());
+            GetSubBuildDirAsSourceDir(default_context, SourceDir("/abs"),
+                                      BuildDirType::OBJ)
+                .value());
   EXPECT_EQ("gen/ABS_PATH/abs/",
-            GetSubBuildDirAsOutputFile(
-                default_context, SourceDir("/abs"), BuildDirType::GEN).value());
+            GetSubBuildDirAsOutputFile(default_context, SourceDir("/abs"),
+                                       BuildDirType::GEN)
+                .value());
 #if defined(OS_WIN)
   EXPECT_EQ("//out/Debug/obj/ABS_PATH/C/abs/",
-            GetSubBuildDirAsSourceDir(
-                default_context, SourceDir("/C:/abs"), BuildDirType::OBJ)
+            GetSubBuildDirAsSourceDir(default_context, SourceDir("/C:/abs"),
+                                      BuildDirType::OBJ)
                 .value());
   EXPECT_EQ("gen/ABS_PATH/C/abs/",
-            GetSubBuildDirAsOutputFile(
-                default_context, SourceDir("/C:/abs"), BuildDirType::GEN)
+            GetSubBuildDirAsOutputFile(default_context, SourceDir("/C:/abs"),
+                                       BuildDirType::GEN)
                 .value());
 #endif
 }
@@ -832,17 +824,17 @@
 
   BuildDirContext context(&settings);
 
-  EXPECT_EQ("//",
-            GetBuildDirAsSourceDir(context, BuildDirType::TOOLCHAIN_ROOT)
-                .value());
+  EXPECT_EQ(
+      "//",
+      GetBuildDirAsSourceDir(context, BuildDirType::TOOLCHAIN_ROOT).value());
   EXPECT_EQ("//gen/",
             GetBuildDirAsSourceDir(context, BuildDirType::GEN).value());
   EXPECT_EQ("//obj/",
             GetBuildDirAsSourceDir(context, BuildDirType::OBJ).value());
 
-  EXPECT_EQ("",
-            GetBuildDirAsOutputFile(context, BuildDirType::TOOLCHAIN_ROOT)
-                .value());
+  EXPECT_EQ(
+      "",
+      GetBuildDirAsOutputFile(context, BuildDirType::TOOLCHAIN_ROOT).value());
   EXPECT_EQ("gen/",
             GetBuildDirAsOutputFile(context, BuildDirType::GEN).value());
   EXPECT_EQ("obj/",
diff --git a/tools/gn/function_exec_script.cc b/tools/gn/function_exec_script.cc
index d1fc6e9..23c58a1 100644
--- a/tools/gn/function_exec_script.cc
+++ b/tools/gn/function_exec_script.cc
@@ -41,7 +41,8 @@
     return true;  // Whitelisted, this is OK.
 
   // Disallowed case.
-  *err = Err(function, "Disallowed exec_script call.",
+  *err = Err(
+      function, "Disallowed exec_script call.",
       "The use of exec_script use is restricted in this build. exec_script\n"
       "is discouraged because it can slow down the GN run and is easily\n"
       "abused.\n"
@@ -243,7 +244,8 @@
   }
 
   if (exit_code != 0) {
-    std::string msg = "Current dir: " + FilePathToUTF8(startup_dir) +
+    std::string msg =
+        "Current dir: " + FilePathToUTF8(startup_dir) +
         "\nCommand: " + FilePathToUTF8(cmdline.GetCommandLineString()) +
         "\nReturned " + base::IntToString(exit_code);
     if (!output.empty())
@@ -253,8 +255,8 @@
     if (!stderr_output.empty())
       msg += "\nstderr:\n\n" + stderr_output;
 
-    *err = Err(function->function(), "Script returned non-zero exit code.",
-               msg);
+    *err =
+        Err(function->function(), "Script returned non-zero exit code.", msg);
     return Value();
   }
 
diff --git a/tools/gn/function_foreach.cc b/tools/gn/function_foreach.cc
index b0af694..24ffaab 100644
--- a/tools/gn/function_foreach.cc
+++ b/tools/gn/function_foreach.cc
@@ -10,8 +10,7 @@
 namespace functions {
 
 const char kForEach[] = "foreach";
-const char kForEach_HelpShort[] =
-    "foreach: Iterate over a list.";
+const char kForEach_HelpShort[] = "foreach: Iterate over a list.";
 const char kForEach_Help[] =
     R"(foreach: Iterate over a list.
 
diff --git a/tools/gn/function_forward_variables_from.cc b/tools/gn/function_forward_variables_from.cc
index 93531e4..0b3b9a4 100644
--- a/tools/gn/function_forward_variables_from.cc
+++ b/tools/gn/function_forward_variables_from.cc
@@ -25,8 +25,7 @@
   options.skip_private_vars = true;
   options.mark_dest_used = false;
   options.excluded_values = exclusion_set;
-  source->NonRecursiveMergeTo(dest, options, function,
-                              "source scope", err);
+  source->NonRecursiveMergeTo(dest, options, function, "source scope", err);
   source->MarkAllUsed();
 }
 
@@ -49,19 +48,22 @@
       base::StringPiece storage_key = source->GetStorageKey(cur.string_value());
       if (storage_key.empty()) {
         // Programmatic value, don't allow copying.
-        *err = Err(cur, "This value can't be forwarded.",
-            "The variable \"" + cur.string_value() + "\" is a built-in.");
+        *err =
+            Err(cur, "This value can't be forwarded.",
+                "The variable \"" + cur.string_value() + "\" is a built-in.");
         return;
       }
 
       // Don't allow clobbering existing values.
       const Value* existing_value = dest->GetValue(storage_key);
       if (existing_value) {
-        *err = Err(cur, "Clobbering existing value.",
+        *err = Err(
+            cur, "Clobbering existing value.",
             "The current scope already defines a value \"" +
-             cur.string_value() + "\".\nforward_variables_from() won't clobber "
-             "existing values. If you want to\nmerge lists, you'll need to "
-             "do this explicitly.");
+                cur.string_value() +
+                "\".\nforward_variables_from() won't clobber "
+                "existing values. If you want to\nmerge lists, you'll need to "
+                "do this explicitly.");
         err->AppendSubErr(Err(*existing_value, "value being clobbered."));
         return;
       }
@@ -170,7 +172,7 @@
   }
 
   Value* value = nullptr;  // Value to use, may point to result_value.
-  Value result_value;  // Storage for the "evaluate" case.
+  Value result_value;      // Storage for the "evaluate" case.
   const IdentifierNode* identifier = args_vector[0]->AsIdentifier();
   if (identifier) {
     // Optimize the common case where the input scope is an identifier. This
diff --git a/tools/gn/function_forward_variables_from_unittest.cc b/tools/gn/function_forward_variables_from_unittest.cc
index 5e873e6..e75104a 100644
--- a/tools/gn/function_forward_variables_from_unittest.cc
+++ b/tools/gn/function_forward_variables_from_unittest.cc
@@ -57,11 +57,11 @@
 
   // Forwards all variables from a literal scope into another scope definition.
   TestParseInput input(
-    "a = {\n"
-    "  forward_variables_from({x = 1 y = 2}, \"*\")\n"
-    "  z = 3\n"
-    "}\n"
-    "print(\"${a.x} ${a.y} ${a.z}\")\n");
+      "a = {\n"
+      "  forward_variables_from({x = 1 y = 2}, \"*\")\n"
+      "  z = 3\n"
+      "}\n"
+      "print(\"${a.x} ${a.y} ${a.z}\")\n");
 
   ASSERT_FALSE(input.has_error());
 
@@ -78,17 +78,17 @@
 
   // Defines a template and copy the two x and y, and z values out.
   TestParseInput input(
-    "template(\"a\") {\n"
-    "  forward_variables_from(invoker, [\"x\", \"y\", \"z\"], [\"z\"])\n"
-    "  assert(!defined(z))\n"  // "z" should still be undefined.
-    "  print(\"$target_name, $x, $y\")\n"
-    "}\n"
-    "a(\"target\") {\n"
-    "  x = 1\n"
-    "  y = 2\n"
-    "  z = 3\n"
-    "  print(\"$z\")\n"
-    "}\n");
+      "template(\"a\") {\n"
+      "  forward_variables_from(invoker, [\"x\", \"y\", \"z\"], [\"z\"])\n"
+      "  assert(!defined(z))\n"  // "z" should still be undefined.
+      "  print(\"$target_name, $x, $y\")\n"
+      "}\n"
+      "a(\"target\") {\n"
+      "  x = 1\n"
+      "  y = 2\n"
+      "  z = 3\n"
+      "  print(\"$z\")\n"
+      "}\n");
 
   ASSERT_FALSE(input.has_error());
 
@@ -105,12 +105,12 @@
 
   // Type check the source scope.
   TestParseInput invalid_source(
-    "template(\"a\") {\n"
-    "  forward_variables_from(42, [\"x\"])\n"
-    "  print(\"$target_name\")\n"  // Prevent unused var error.
-    "}\n"
-    "a(\"target\") {\n"
-    "}\n");
+      "template(\"a\") {\n"
+      "  forward_variables_from(42, [\"x\"])\n"
+      "  print(\"$target_name\")\n"  // Prevent unused var error.
+      "}\n"
+      "a(\"target\") {\n"
+      "}\n");
   ASSERT_FALSE(invalid_source.has_error());
   Err err;
   invalid_source.parsed()->Execute(setup.scope(), &err);
@@ -120,12 +120,12 @@
   // Type check the list. We need to use a new template name each time since
   // all of these invocations are executing in sequence in the same scope.
   TestParseInput invalid_list(
-    "template(\"b\") {\n"
-    "  forward_variables_from(invoker, 42)\n"
-    "  print(\"$target_name\")\n"
-    "}\n"
-    "b(\"target\") {\n"
-    "}\n");
+      "template(\"b\") {\n"
+      "  forward_variables_from(invoker, 42)\n"
+      "  print(\"$target_name\")\n"
+      "}\n"
+      "b(\"target\") {\n"
+      "}\n");
   ASSERT_FALSE(invalid_list.has_error());
   err = Err();
   invalid_list.parsed()->Execute(setup.scope(), &err);
@@ -134,12 +134,12 @@
 
   // Type check the exclusion list.
   TestParseInput invalid_exclusion_list(
-    "template(\"c\") {\n"
-    "  forward_variables_from(invoker, \"*\", 42)\n"
-    "  print(\"$target_name\")\n"
-    "}\n"
-    "c(\"target\") {\n"
-    "}\n");
+      "template(\"c\") {\n"
+      "  forward_variables_from(invoker, \"*\", 42)\n"
+      "  print(\"$target_name\")\n"
+      "}\n"
+      "c(\"target\") {\n"
+      "}\n");
   ASSERT_FALSE(invalid_exclusion_list.has_error());
   err = Err();
   invalid_exclusion_list.parsed()->Execute(setup.scope(), &err);
@@ -148,12 +148,12 @@
 
   // Programmatic values should error.
   TestParseInput prog(
-    "template(\"d\") {\n"
-    "  forward_variables_from(invoker, [\"root_out_dir\"])\n"
-    "  print(\"$target_name\")\n"
-    "}\n"
-    "d(\"target\") {\n"
-    "}\n");
+      "template(\"d\") {\n"
+      "  forward_variables_from(invoker, [\"root_out_dir\"])\n"
+      "  print(\"$target_name\")\n"
+      "}\n"
+      "d(\"target\") {\n"
+      "}\n");
   ASSERT_FALSE(prog.has_error());
   err = Err();
   prog.parsed()->Execute(setup.scope(), &err);
@@ -162,12 +162,12 @@
 
   // Not enough arguments.
   TestParseInput not_enough_arguments(
-    "template(\"e\") {\n"
-    "  forward_variables_from(invoker)\n"
-    "  print(\"$target_name\")\n"
-    "}\n"
-    "e(\"target\") {\n"
-    "}\n");
+      "template(\"e\") {\n"
+      "  forward_variables_from(invoker)\n"
+      "  print(\"$target_name\")\n"
+      "}\n"
+      "e(\"target\") {\n"
+      "}\n");
   ASSERT_FALSE(not_enough_arguments.has_error());
   err = Err();
   not_enough_arguments.parsed()->Execute(setup.scope(), &err);
@@ -176,12 +176,12 @@
 
   // Too many arguments.
   TestParseInput too_many_arguments(
-    "template(\"f\") {\n"
-    "  forward_variables_from(invoker, \"*\", [], [])\n"
-    "  print(\"$target_name\")\n"
-    "}\n"
-    "f(\"target\") {\n"
-    "}\n");
+      "template(\"f\") {\n"
+      "  forward_variables_from(invoker, \"*\", [], [])\n"
+      "  print(\"$target_name\")\n"
+      "}\n"
+      "f(\"target\") {\n"
+      "}\n");
   ASSERT_FALSE(too_many_arguments.has_error());
   err = Err();
   too_many_arguments.parsed()->Execute(setup.scope(), &err);
@@ -195,15 +195,15 @@
   // Defines a template and copy the two x and y values out. The "*" behavior
   // should clobber existing variables with the same name.
   TestParseInput input(
-    "template(\"a\") {\n"
-    "  x = 1000000\n"  // Should be clobbered.
-    "  forward_variables_from(invoker, \"*\")\n"
-    "  print(\"$target_name, $x, $y\")\n"
-    "}\n"
-    "a(\"target\") {\n"
-    "  x = 1\n"
-    "  y = 2\n"
-    "}\n");
+      "template(\"a\") {\n"
+      "  x = 1000000\n"  // Should be clobbered.
+      "  forward_variables_from(invoker, \"*\")\n"
+      "  print(\"$target_name, $x, $y\")\n"
+      "}\n"
+      "a(\"target\") {\n"
+      "  x = 1\n"
+      "  y = 2\n"
+      "}\n");
 
   ASSERT_FALSE(input.has_error());
 
@@ -221,17 +221,17 @@
   // Defines a template and copy all values except z value. The "*" behavior
   // should clobber existing variables with the same name.
   TestParseInput input(
-    "template(\"a\") {\n"
-    "  x = 1000000\n"  // Should be clobbered.
-    "  forward_variables_from(invoker, \"*\", [\"z\"])\n"
-    "  print(\"$target_name, $x, $y\")\n"
-    "}\n"
-    "a(\"target\") {\n"
-    "  x = 1\n"
-    "  y = 2\n"
-    "  z = 3\n"
-    "  print(\"$z\")\n"
-    "}\n");
+      "template(\"a\") {\n"
+      "  x = 1000000\n"  // Should be clobbered.
+      "  forward_variables_from(invoker, \"*\", [\"z\"])\n"
+      "  print(\"$target_name, $x, $y\")\n"
+      "}\n"
+      "a(\"target\") {\n"
+      "  x = 1\n"
+      "  y = 2\n"
+      "  z = 3\n"
+      "  print(\"$z\")\n"
+      "}\n");
 
   ASSERT_FALSE(input.has_error());
 
diff --git a/tools/gn/function_get_label_info.cc b/tools/gn/function_get_label_info.cc
index a67a371..0d0c77a 100644
--- a/tools/gn/function_get_label_info.cc
+++ b/tools/gn/function_get_label_info.cc
@@ -104,8 +104,7 @@
 
   } else if (what == "target_gen_dir") {
     result.string_value() = DirectoryWithNoLastSlash(GetSubBuildDirAsSourceDir(
-        BuildDirContext(scope, label.GetToolchainLabel()),
-        label.dir(),
+        BuildDirContext(scope, label.GetToolchainLabel()), label.dir(),
         BuildDirType::GEN));
 
   } else if (what == "root_gen_dir") {
@@ -114,8 +113,7 @@
 
   } else if (what == "target_out_dir") {
     result.string_value() = DirectoryWithNoLastSlash(GetSubBuildDirAsSourceDir(
-        BuildDirContext(scope, label.GetToolchainLabel()),
-        label.dir(),
+        BuildDirContext(scope, label.GetToolchainLabel()), label.dir(),
         BuildDirType::OBJ));
 
   } else if (what == "root_out_dir") {
diff --git a/tools/gn/function_get_label_info_unittest.cc b/tools/gn/function_get_label_info_unittest.cc
index 1a59923..3bebd14 100644
--- a/tools/gn/function_get_label_info_unittest.cc
+++ b/tools/gn/function_get_label_info_unittest.cc
@@ -23,8 +23,8 @@
     args.push_back(Value(nullptr, what));
 
     Err err;
-    Value result = functions::RunGetLabelInfo(setup_.scope(), &function,
-                                              args, &err);
+    Value result =
+        functions::RunGetLabelInfo(setup_.scope(), &function, args, &err);
     if (err.has_error()) {
       EXPECT_TRUE(result.type() == Value::NONE);
       return std::string();
diff --git a/tools/gn/function_get_path_info.cc b/tools/gn/function_get_path_info.cc
index e08eca1..905092c 100644
--- a/tools/gn/function_get_path_info.cc
+++ b/tools/gn/function_get_path_info.cc
@@ -37,13 +37,15 @@
 
   if (!input_string.empty() && input_string[input_string.size() - 1] == '/') {
     // Input is a directory.
-    return current_dir.ResolveRelativeDir(input, err,
-        settings->build_settings()->root_path_utf8());
+    return current_dir.ResolveRelativeDir(
+        input, err, settings->build_settings()->root_path_utf8());
   }
 
   // Input is a file.
-  return current_dir.ResolveRelativeFile(input, err,
-      settings->build_settings()->root_path_utf8()).GetDir();
+  return current_dir
+      .ResolveRelativeFile(input, err,
+                           settings->build_settings()->root_path_utf8())
+      .GetDir();
 }
 
 std::string GetOnePathInfo(const Settings* settings,
@@ -90,14 +92,12 @@
     case WHAT_GEN_DIR: {
       return DirectoryWithNoLastSlash(GetSubBuildDirAsSourceDir(
           BuildDirContext(settings),
-          DirForInput(settings, current_dir, input, err),
-          BuildDirType::GEN));
+          DirForInput(settings, current_dir, input, err), BuildDirType::GEN));
     }
     case WHAT_OUT_DIR: {
       return DirectoryWithNoLastSlash(GetSubBuildDirAsSourceDir(
           BuildDirContext(settings),
-          DirForInput(settings, current_dir, input, err),
-          BuildDirType::OBJ));
+          DirForInput(settings, current_dir, input, err), BuildDirType::OBJ));
     }
     case WHAT_ABSPATH: {
       bool as_dir =
@@ -235,7 +235,8 @@
     const std::vector<Value>& input_list = args[0].list_value();
     Value result(function, Value::LIST);
     for (const auto& cur : input_list) {
-      result.list_value().push_back(Value(function,
+      result.list_value().push_back(Value(
+          function,
           GetOnePathInfo(scope->settings(), current_dir, what, cur, err)));
       if (err->has_error())
         return Value();
diff --git a/tools/gn/function_get_path_info_unittest.cc b/tools/gn/function_get_path_info_unittest.cc
index 4a776f4..221a97e 100644
--- a/tools/gn/function_get_path_info_unittest.cc
+++ b/tools/gn/function_get_path_info_unittest.cc
@@ -24,8 +24,8 @@
     args.push_back(Value(nullptr, what));
 
     Err err;
-    Value result = functions::RunGetPathInfo(setup_.scope(), &function,
-                                             args, &err);
+    Value result =
+        functions::RunGetPathInfo(setup_.scope(), &function, args, &err);
     if (err.has_error()) {
       EXPECT_TRUE(result.type() == Value::NONE);
       return std::string();
diff --git a/tools/gn/function_get_target_outputs.cc b/tools/gn/function_get_target_outputs.cc
index e13e1e3..f5d4ef6 100644
--- a/tools/gn/function_get_target_outputs.cc
+++ b/tools/gn/function_get_target_outputs.cc
@@ -100,8 +100,8 @@
     const Target* as_target = item->AsTarget();
     if (!as_target) {
       *err = Err(function, "Label does not refer to a target.",
-          label.GetUserVisibleName(false) +
-          "\nrefers to a " + item->GetItemTypeName());
+                 label.GetUserVisibleName(false) + "\nrefers to a " +
+                     item->GetItemTypeName());
       return Value();
     }
     target = as_target;
@@ -110,9 +110,10 @@
 
   if (!target) {
     *err = Err(function, "Target not found in this context.",
-        label.GetUserVisibleName(false) +
-        "\nwas not found. get_target_outputs() can only be used for targets\n"
-        "previously defined in the current file.");
+               label.GetUserVisibleName(false) +
+                   "\nwas not found. get_target_outputs() can only be used for "
+                   "targets\n"
+                   "previously defined in the current file.");
     return Value();
   }
 
diff --git a/tools/gn/function_get_target_outputs_unittest.cc b/tools/gn/function_get_target_outputs_unittest.cc
index d7c80a9..3c60235 100644
--- a/tools/gn/function_get_target_outputs_unittest.cc
+++ b/tools/gn/function_get_target_outputs_unittest.cc
@@ -14,9 +14,7 @@
 
 class GetTargetOutputsTest : public testing::Test {
  public:
-  GetTargetOutputsTest() {
-    setup_.scope()->set_item_collector(&items_);
-  }
+  GetTargetOutputsTest() { setup_.scope()->set_item_collector(&items_); }
 
   Value GetTargetOutputs(const std::string& name, Err* err) {
     FunctionCallNode function;
@@ -79,9 +77,8 @@
   auto action =
       std::make_unique<Target>(setup_.settings(), GetLabel("//foo/", "bar"));
   action->set_output_type(Target::ACTION);
-  action->action_values().outputs() = SubstitutionList::MakeForTest(
-      "//output1.txt",
-      "//output2.txt");
+  action->action_values().outputs() =
+      SubstitutionList::MakeForTest("//output1.txt", "//output2.txt");
 
   items_.push_back(std::move(action));
 
@@ -96,9 +93,9 @@
       std::make_unique<Target>(setup_.settings(), GetLabel("//foo/", "bar"));
   action->set_output_type(Target::ACTION_FOREACH);
   action->sources().push_back(SourceFile("//file.txt"));
-  action->action_values().outputs() = SubstitutionList::MakeForTest(
-      "//out/Debug/{{source_file_part}}.one",
-      "//out/Debug/{{source_file_part}}.two");
+  action->action_values().outputs() =
+      SubstitutionList::MakeForTest("//out/Debug/{{source_file_part}}.one",
+                                    "//out/Debug/{{source_file_part}}.two");
 
   items_.push_back(std::move(action));
 
diff --git a/tools/gn/function_read_file.cc b/tools/gn/function_read_file.cc
index ed37ef0..1cc29f5 100644
--- a/tools/gn/function_read_file.cc
+++ b/tools/gn/function_read_file.cc
@@ -17,8 +17,7 @@
 namespace functions {
 
 const char kReadFile[] = "read_file";
-const char kReadFile_HelpShort[] =
-    "read_file: Read a file into a variable.";
+const char kReadFile_HelpShort[] = "read_file: Read a file into a variable.";
 const char kReadFile_Help[] =
     R"(read_file: Read a file into a variable.
 
@@ -54,8 +53,8 @@
 
   // Compute the file name.
   const SourceDir& cur_dir = scope->GetSourceDir();
-  SourceFile source_file = cur_dir.ResolveRelativeFile(args[0], err,
-      scope->settings()->build_settings()->root_path_utf8());
+  SourceFile source_file = cur_dir.ResolveRelativeFile(
+      args[0], err, scope->settings()->build_settings()->root_path_utf8());
   if (err->has_error())
     return Value();
   base::FilePath file_path =
diff --git a/tools/gn/function_rebase_path.cc b/tools/gn/function_rebase_path.cc
index 7626551..945d641 100644
--- a/tools/gn/function_rebase_path.cc
+++ b/tools/gn/function_rebase_path.cc
@@ -73,11 +73,13 @@
     base::FilePath system_path;
     if (looks_like_dir) {
       system_path = scope->settings()->build_settings()->GetFullPath(
-          from_dir.ResolveRelativeDir(value, err,
+          from_dir.ResolveRelativeDir(
+              value, err,
               scope->settings()->build_settings()->root_path_utf8()));
     } else {
       system_path = scope->settings()->build_settings()->GetFullPath(
-          from_dir.ResolveRelativeFile(value, err,
+          from_dir.ResolveRelativeFile(
+              value, err,
               scope->settings()->build_settings()->root_path_utf8()));
     }
     if (err->has_error())
@@ -92,15 +94,16 @@
   result = Value(function, Value::STRING);
   if (looks_like_dir) {
     result.string_value() = RebasePath(
-        from_dir.ResolveRelativeDir(value, err,
-            scope->settings()->build_settings()->root_path_utf8()).value(),
-        to_dir,
-        scope->settings()->build_settings()->root_path_utf8());
+        from_dir
+            .ResolveRelativeDir(
+                value, err,
+                scope->settings()->build_settings()->root_path_utf8())
+            .value(),
+        to_dir, scope->settings()->build_settings()->root_path_utf8());
     MakeSlashEndingMatchInput(string_value, &result.string_value());
   } else {
-    SourceFile resolved_file =
-        from_dir.ResolveRelativeFile(value, err,
-            scope->settings()->build_settings()->root_path_utf8());
+    SourceFile resolved_file = from_dir.ResolveRelativeFile(
+        value, err, scope->settings()->build_settings()->root_path_utf8());
     if (err->has_error())
       return Value();
     // Special case:
@@ -110,10 +113,9 @@
         to_dir.value().substr(0, to_dir.value().size() - 1)) {
       result.string_value() = ".";
     } else {
-      result.string_value() = RebasePath(
-          resolved_file.value(),
-          to_dir,
-          scope->settings()->build_settings()->root_path_utf8());
+      result.string_value() =
+          RebasePath(resolved_file.value(), to_dir,
+                     scope->settings()->build_settings()->root_path_utf8());
     }
   }
 
@@ -268,8 +270,8 @@
 
   // Path conversion.
   if (inputs.type() == Value::STRING) {
-    return ConvertOnePath(scope, function, inputs,
-                          from_dir, to_dir, convert_to_system_absolute, err);
+    return ConvertOnePath(scope, function, inputs, from_dir, to_dir,
+                          convert_to_system_absolute, err);
 
   } else if (inputs.type() == Value::LIST) {
     result = Value(function, Value::LIST);
@@ -277,8 +279,8 @@
 
     for (const auto& input : inputs.list_value()) {
       result.list_value().push_back(
-          ConvertOnePath(scope, function, input,
-                         from_dir, to_dir, convert_to_system_absolute, err));
+          ConvertOnePath(scope, function, input, from_dir, to_dir,
+                         convert_to_system_absolute, err));
       if (err->has_error()) {
         result = Value();
         return result;
@@ -287,8 +289,7 @@
     return result;
   }
 
-  *err = Err(function->function(),
-             "rebase_path requires a list or a string.");
+  *err = Err(function->function(), "rebase_path requires a list or a string.");
   return result;
 }
 
diff --git a/tools/gn/function_rebase_path_unittest.cc b/tools/gn/function_rebase_path_unittest.cc
index efbd97c..8d1d3bb 100644
--- a/tools/gn/function_rebase_path_unittest.cc
+++ b/tools/gn/function_rebase_path_unittest.cc
@@ -57,7 +57,7 @@
   EXPECT_EQ("foo/bar", RebaseOne(scope, "foo/bar", ".", "."));
   EXPECT_EQ("foo/bar", RebaseOne(scope, "foo\\bar", ".", "."));
 
-  // Test system path output.
+// Test system path output.
 #if defined(OS_WIN)
   setup.build_settings()->SetRootPath(base::FilePath(L"C:/path/to/src"));
   EXPECT_EQ("C:/path/to/src", RebaseOne(scope, ".", "", "//"));
@@ -134,8 +134,7 @@
             RebaseOne(scope, "foo/", "//", "/ssd/out/Debug"));
 
   // Test system absolute from-dir.
-  EXPECT_EQ("../../../hdd/src",
-            RebaseOne(scope, ".", "/ssd/out/Debug", "//"));
+  EXPECT_EQ("../../../hdd/src", RebaseOne(scope, ".", "/ssd/out/Debug", "//"));
   EXPECT_EQ("../../../hdd/src/",
             RebaseOne(scope, "./", "/ssd/out/Debug", "//"));
   EXPECT_EQ("../../../hdd/src/foo",
diff --git a/tools/gn/function_set_default_toolchain.cc b/tools/gn/function_set_default_toolchain.cc
index f04cba8..e8b1885 100644
--- a/tools/gn/function_set_default_toolchain.cc
+++ b/tools/gn/function_set_default_toolchain.cc
@@ -56,7 +56,8 @@
                              const std::vector<Value>& args,
                              Err* err) {
   if (!scope->IsProcessingBuildConfig()) {
-    *err = Err(function->function(), "Must be called from build config.",
+    *err = Err(
+        function->function(), "Must be called from build config.",
         "set_default_toolchain can only be called from the build configuration "
         "file.");
     return Value();
diff --git a/tools/gn/function_template.cc b/tools/gn/function_template.cc
index f5ea7b8..aa23dc6 100644
--- a/tools/gn/function_template.cc
+++ b/tools/gn/function_template.cc
@@ -12,8 +12,7 @@
 namespace functions {
 
 const char kTemplate[] = "template";
-const char kTemplate_HelpShort[] =
-    "template: Define a template rule.";
+const char kTemplate_HelpShort[] = "template: Define a template rule.";
 const char kTemplate_Help[] =
     R"(template: Define a template rule.
 
@@ -184,8 +183,8 @@
   // TODO(brettw) determine if the function is built-in and throw an error if
   // it is.
   if (args.size() != 1) {
-    *err = Err(function->function(),
-               "Need exactly one string arg to template.");
+    *err =
+        Err(function->function(), "Need exactly one string arg to template.");
     return Value();
   }
   if (!args[0].VerifyTypeIs(Value::STRING, err))
@@ -196,8 +195,8 @@
   if (existing_template) {
     *err = Err(function, "Duplicate template definition.",
                "A template with this name was already defined.");
-    err->AppendSubErr(Err(existing_template->GetDefinitionRange(),
-                          "Previous definition."));
+    err->AppendSubErr(
+        Err(existing_template->GetDefinitionRange(), "Previous definition."));
     return Value();
   }
 
diff --git a/tools/gn/function_toolchain.cc b/tools/gn/function_toolchain.cc
index 19eaea8..615dc7a 100644
--- a/tools/gn/function_toolchain.cc
+++ b/tools/gn/function_toolchain.cc
@@ -93,8 +93,9 @@
   for (const auto& cur_type : list) {
     if (!validate(cur_type)) {
       *err = Err(*origin, "Pattern not valid here.",
-          "You used the pattern " + std::string(kSubstitutionNames[cur_type]) +
-          " which is not valid\nfor this variable.");
+                 "You used the pattern " +
+                     std::string(kSubstitutionNames[cur_type]) +
+                     " which is not valid\nfor this variable.");
       return false;
     }
   }
@@ -207,19 +208,15 @@
 }
 
 bool IsCompilerTool(Toolchain::ToolType type) {
-  return type == Toolchain::TYPE_CC ||
-         type == Toolchain::TYPE_CXX ||
-         type == Toolchain::TYPE_OBJC ||
-         type == Toolchain::TYPE_OBJCXX ||
-         type == Toolchain::TYPE_RC ||
-         type == Toolchain::TYPE_ASM;
+  return type == Toolchain::TYPE_CC || type == Toolchain::TYPE_CXX ||
+         type == Toolchain::TYPE_OBJC || type == Toolchain::TYPE_OBJCXX ||
+         type == Toolchain::TYPE_RC || type == Toolchain::TYPE_ASM;
 }
 
 bool IsLinkerTool(Toolchain::ToolType type) {
   // "alink" is not counted as in the generic "linker" tool list.
   return type == Toolchain::TYPE_SOLINK ||
-         type == Toolchain::TYPE_SOLINK_MODULE ||
-         type == Toolchain::TYPE_LINK;
+         type == Toolchain::TYPE_SOLINK_MODULE || type == Toolchain::TYPE_LINK;
 }
 
 bool IsPatternInOutputList(const SubstitutionList& output_list,
@@ -233,7 +230,6 @@
   return false;
 }
 
-
 bool ValidateOutputs(const Tool* tool, Err* err) {
   if (tool->outputs().list().empty()) {
     *err = Err(tool->defined_from(),
@@ -258,8 +254,8 @@
   if (tool_type != Toolchain::TYPE_SOLINK &&
       tool_type != Toolchain::TYPE_SOLINK_MODULE) {
     *err = Err(tool->defined_from(),
-        "This tool specifies a " + std::string(variable_name) + ".",
-        "This is only valid for solink and solink_module tools.");
+               "This tool specifies a " + std::string(variable_name) + ".",
+               "This is only valid for solink and solink_module tools.");
     return false;
   }
 
@@ -280,7 +276,7 @@
 
   if (!IsLinkerTool(tool_type)) {
     *err = Err(tool->defined_from(), "This tool specifies runtime_outputs.",
-        "This is only valid for linker tools (alink doesn't count).");
+               "This is only valid for linker tools (alink doesn't count).");
     return false;
   }
 
@@ -288,7 +284,7 @@
     if (!IsPatternInOutputList(tool->outputs(), pattern)) {
       *err = Err(tool->defined_from(), "This tool's runtime_outputs is bad.",
                  "It must be a subset of the outputs. The bad one is:\n  " +
-                  pattern.AsString());
+                     pattern.AsString());
       return false;
     }
   }
@@ -300,8 +296,7 @@
 // toolchain -------------------------------------------------------------------
 
 const char kToolchain[] = "toolchain";
-const char kToolchain_HelpShort[] =
-    "toolchain: Defines a toolchain.";
+const char kToolchain_HelpShort[] = "toolchain: Defines a toolchain.";
 const char kToolchain_Help[] =
     R"*(toolchain: Defines a toolchain.
 
@@ -469,9 +464,9 @@
   // Read deps (if any).
   const Value* deps_value = block_scope.GetValue(variables::kDeps, true);
   if (deps_value) {
-    ExtractListOfLabels(
-        *deps_value, block_scope.GetSourceDir(),
-        ToolchainLabelForScope(&block_scope), &toolchain->deps(), err);
+    ExtractListOfLabels(*deps_value, block_scope.GetSourceDir(),
+                        ToolchainLabelForScope(&block_scope),
+                        &toolchain->deps(), err);
     if (err->has_error())
       return Value();
   }
@@ -504,8 +499,7 @@
 // tool ------------------------------------------------------------------------
 
 const char kTool[] = "tool";
-const char kTool_HelpShort[] =
-    "tool: Specify arguments to a toolchain tool.";
+const char kTool_HelpShort[] = "tool: Specify arguments to a toolchain tool.";
 const char kTool_Help[] =
     R"(tool: Specify arguments to a toolchain tool.
 
@@ -777,7 +771,7 @@
         the linker tool of "lib".
 
 )"  // String break to prevent overflowing the 16K max VC string length.
-R"(  Compiler tools have the notion of a single input and a single output, along
+    R"(  Compiler tools have the notion of a single input and a single output, along
   with a set of compiler-specific flags. The following expansions are
   available:
 
@@ -880,7 +874,7 @@
         Example: "libfoo.so libbar.so"
 
 )"  // String break to prevent overflowing the 16K max VC string length.
-R"(  The static library ("alink") tool allows {{arflags}} plus the common tool
+    R"(  The static library ("alink") tool allows {{arflags}} plus the common tool
   substitutions.
 
   The copy tool allows the common compiler/linker substitutions, plus
@@ -977,8 +971,8 @@
       scope->GetProperty(&kToolchainPropertyKey, nullptr));
   if (!toolchain) {
     *err = Err(function->function(), "tool() called outside of toolchain().",
-        "The tool() function can only be used inside a toolchain() "
-        "definition.");
+               "The tool() function can only be used inside a toolchain() "
+               "definition.");
     return Value();
   }
 
@@ -1083,8 +1077,9 @@
     return Value();
   if ((!tool->link_output().empty() && tool->depend_output().empty()) ||
       (tool->link_output().empty() && !tool->depend_output().empty())) {
-    *err = Err(function, "Both link_output and depend_output should either "
-        "be specified or they should both be empty.");
+    *err = Err(function,
+               "Both link_output and depend_output should either "
+               "be specified or they should both be empty.");
     return Value();
   }
 
diff --git a/tools/gn/function_write_file.cc b/tools/gn/function_write_file.cc
index 31bfc32..04d45a8 100644
--- a/tools/gn/function_write_file.cc
+++ b/tools/gn/function_write_file.cc
@@ -20,8 +20,7 @@
 namespace functions {
 
 const char kWriteFile[] = "write_file";
-const char kWriteFile_HelpShort[] =
-    "write_file: Write a file to disk.";
+const char kWriteFile_HelpShort[] = "write_file: Write a file to disk.";
 const char kWriteFile_Help[] =
     R"(write_file: Write a file to disk.
 
@@ -62,13 +61,13 @@
 
   // Compute the file name and make sure it's in the output dir.
   const SourceDir& cur_dir = scope->GetSourceDir();
-  SourceFile source_file = cur_dir.ResolveRelativeFile(args[0], err,
-      scope->settings()->build_settings()->root_path_utf8());
+  SourceFile source_file = cur_dir.ResolveRelativeFile(
+      args[0], err, scope->settings()->build_settings()->root_path_utf8());
   if (err->has_error())
     return Value();
   if (!EnsureStringIsInOutputDir(
-          scope->settings()->build_settings()->build_dir(),
-          source_file.value(), args[0].origin(), err))
+          scope->settings()->build_settings()->build_dir(), source_file.value(),
+          args[0].origin(), err))
     return Value();
   g_scheduler->AddWrittenFile(source_file);  // Track that we wrote this file.
 
diff --git a/tools/gn/function_write_file_unittest.cc b/tools/gn/function_write_file_unittest.cc
index ace5bd6..3fd2183 100644
--- a/tools/gn/function_write_file_unittest.cc
+++ b/tools/gn/function_write_file_unittest.cc
@@ -49,8 +49,8 @@
 
   // Should refuse to write files outside of the output dir.
   EXPECT_FALSE(CallWriteFile(setup.scope(), "//in_root.txt", some_string));
-  EXPECT_FALSE(CallWriteFile(setup.scope(), "//other_dir/foo.txt",
-                             some_string));
+  EXPECT_FALSE(
+      CallWriteFile(setup.scope(), "//other_dir/foo.txt", some_string));
 
   // Should be able to write to a new dir inside the out dir.
   EXPECT_TRUE(CallWriteFile(setup.scope(), "//out/foo.txt", some_string));
@@ -73,9 +73,8 @@
   // Start by setting the modified time to something old to avoid clock
   // resolution issues.
   base::Time old_time = base::Time::Now() - base::TimeDelta::FromDays(1);
-  base::File foo_file(foo_name,
-                      base::File::FLAG_OPEN |
-                      base::File::FLAG_READ | base::File::FLAG_WRITE);
+  base::File foo_file(foo_name, base::File::FLAG_OPEN | base::File::FLAG_READ |
+                                    base::File::FLAG_WRITE);
   ASSERT_TRUE(foo_file.IsValid());
   foo_file.SetTimes(old_time, old_time);
 
diff --git a/tools/gn/functions.cc b/tools/gn/functions.cc
index e7fb524..b5bb1e3 100644
--- a/tools/gn/functions.cc
+++ b/tools/gn/functions.cc
@@ -38,10 +38,11 @@
   if (!block)
     return true;
 
-  *err = Err(block, "Unexpected '{'.",
-      "This function call doesn't take a {} block following it, and you\n"
-      "can't have a {} block that's not connected to something like an if\n"
-      "statement or a target declaration.");
+  *err =
+      Err(block, "Unexpected '{'.",
+          "This function call doesn't take a {} block following it, and you\n"
+          "can't have a {} block that's not connected to something like an if\n"
+          "statement or a target declaration.");
   err->AppendRange(function->function().range());
   return false;
 }
@@ -49,11 +50,10 @@
 // This key is set as a scope property on the scope of a declare_args() block,
 // in order to prevent reading a variable defined earlier in the same call
 // (see `gn help declare_args` for more).
-const void *kInDeclareArgsKey = nullptr;
+const void* kInDeclareArgsKey = nullptr;
 
 }  // namespace
 
-
 bool EnsureNotReadingFromSameDeclareArgs(const ParseNode* node,
                                          const Scope* cur_scope,
                                          const Scope* val_scope,
@@ -70,11 +70,12 @@
   if (!val_args_scope || !cur_args_scope || (val_args_scope != cur_args_scope))
     return true;
 
-  *err = Err(node,
-      "Reading a variable defined in the same declare_args() call.\n"
-      "\n"
-      "If you need to set the value of one arg based on another, put\n"
-      "them in two separate declare_args() calls, one after the other.\n");
+  *err =
+      Err(node,
+          "Reading a variable defined in the same declare_args() call.\n"
+          "\n"
+          "If you need to set the value of one arg based on another, put\n"
+          "them in two separate declare_args() calls, one after the other.\n");
   return false;
 }
 
@@ -82,10 +83,11 @@
                                const Scope* scope,
                                Err* err) {
   if (scope->IsProcessingImport()) {
-    *err = Err(node, "Not valid from an import.",
-        "Imports are for defining defaults, variables, and rules. The\n"
-        "appropriate place for this kind of thing is really in a normal\n"
-        "BUILD file.");
+    *err =
+        Err(node, "Not valid from an import.",
+            "Imports are for defining defaults, variables, and rules. The\n"
+            "appropriate place for this kind of thing is really in a normal\n"
+            "BUILD file.");
     return false;
   }
   return true;
@@ -96,8 +98,8 @@
                                     Err* err) {
   if (scope->IsProcessingBuildConfig()) {
     *err = Err(node, "Not valid from the build config.",
-        "You can't do this kind of thing from the build config script, "
-        "silly!\nPut it in a regular BUILD file.");
+               "You can't do this kind of thing from the build config script, "
+               "silly!\nPut it in a regular BUILD file.");
     return false;
   }
   return true;
@@ -141,8 +143,8 @@
 
 void FillNeedsBlockError(const FunctionCallNode* function, Err* err) {
   *err = Err(function->function(), "This function call requires a block.",
-      "The block's \"{\" must be on the same line as the function "
-      "call's \")\".");
+             "The block's \"{\" must be on the same line as the function "
+             "call's \")\".");
 }
 
 bool EnsureSingleStringArg(const FunctionCallNode* function,
@@ -171,15 +173,13 @@
 // static
 const int NonNestableBlock::kKey = 0;
 
-NonNestableBlock::NonNestableBlock(
-    Scope* scope,
-    const FunctionCallNode* function,
-    const char* type_description)
+NonNestableBlock::NonNestableBlock(Scope* scope,
+                                   const FunctionCallNode* function,
+                                   const char* type_description)
     : scope_(scope),
       function_(function),
       type_description_(type_description),
-      key_added_(false) {
-}
+      key_added_(false) {}
 
 NonNestableBlock::~NonNestableBlock() {
   if (key_added_)
@@ -193,8 +193,8 @@
     const NonNestableBlock* existing =
         reinterpret_cast<const NonNestableBlock*>(scope_value);
     *err = Err(function_, "Can't nest these things.",
-        std::string("You are trying to nest a ") + type_description_ +
-        " inside a " + existing->type_description_ + ".");
+               std::string("You are trying to nest a ") + type_description_ +
+                   " inside a " + existing->type_description_ + ".");
     err->AppendSubErr(Err(existing->function_, "The enclosing block."));
     return false;
   }
@@ -241,10 +241,10 @@
       // Optional string message.
       if (args[1].type() != Value::STRING) {
         *err = Err(function->function(), "Assertion failed.",
-            "<<<ERROR MESSAGE IS NOT A STRING>>>");
+                   "<<<ERROR MESSAGE IS NOT A STRING>>>");
       } else {
         *err = Err(function->function(), "Assertion failed.",
-            args[1].string_value());
+                   args[1].string_value());
       }
     } else {
       *err = Err(function->function(), "Assertion failed.");
@@ -264,8 +264,8 @@
       if (origin_location.file() != function->function().location().file() ||
           origin_location.line_number() !=
               function->function().location().line_number()) {
-        err->AppendSubErr(Err(args[0].origin()->GetRange(), "",
-                              "This is where it was set."));
+        err->AppendSubErr(
+            Err(args[0].origin()->GetRange(), "", "This is where it was set."));
       }
     }
   }
@@ -275,8 +275,7 @@
 // config ----------------------------------------------------------------------
 
 const char kConfig[] = "config";
-const char kConfig_HelpShort[] =
-    "config: Defines a configuration object.";
+const char kConfig_HelpShort[] = "config: Defines a configuration object.";
 const char kConfig_Help[] =
     R"(config: Defines a configuration object.
 
@@ -302,7 +301,7 @@
 
     CONFIG_VALUES_VARS_HELP
 
-R"(  Nested configs: configs
+    R"(  Nested configs: configs
 
 Variables on a target used to apply configs
 
@@ -355,8 +354,8 @@
   const Value* configs_value = scope->GetValue(variables::kConfigs, true);
   if (configs_value) {
     ExtractListOfUniqueLabels(*configs_value, scope->GetSourceDir(),
-                              ToolchainLabelForScope(scope),
-                              &config->configs(), err);
+                              ToolchainLabelForScope(scope), &config->configs(),
+                              err);
   }
   if (err->has_error())
     return Value();
@@ -375,8 +374,7 @@
 // declare_args ----------------------------------------------------------------
 
 const char kDeclareArgs[] = "declare_args";
-const char kDeclareArgs_HelpShort[] =
-    "declare_args: Declare build arguments.";
+const char kDeclareArgs_HelpShort[] = "declare_args: Declare build arguments.";
 const char kDeclareArgs_Help[] =
     R"(declare_args: Declare build arguments.
 
@@ -456,8 +454,8 @@
   // the block_scope, and arguments passed into the build).
   Scope::KeyValueMap values;
   block_scope.GetCurrentScopeValues(&values);
-  scope->settings()->build_settings()->build_args().DeclareArgs(
-      values, scope, err);
+  scope->settings()->build_settings()->build_args().DeclareArgs(values, scope,
+                                                                err);
   return Value();
 }
 
@@ -540,15 +538,14 @@
 
   // Argument is invalid.
   *err = Err(function, "Bad thing passed to defined().",
-      "It should be of the form defined(foo) or defined(foo.bar).");
+             "It should be of the form defined(foo) or defined(foo.bar).");
   return Value();
 }
 
 // getenv ----------------------------------------------------------------------
 
 const char kGetEnv[] = "getenv";
-const char kGetEnv_HelpShort[] =
-    "getenv: Get an environment variable.";
+const char kGetEnv_HelpShort[] = "getenv: Get an environment variable.";
 const char kGetEnv_Help[] =
     R"(getenv: Get an environment variable.
 
@@ -630,13 +627,12 @@
     return Value();
 
   const SourceDir& input_dir = scope->GetSourceDir();
-  SourceFile import_file =
-      input_dir.ResolveRelativeFile(args[0], err,
-          scope->settings()->build_settings()->root_path_utf8());
+  SourceFile import_file = input_dir.ResolveRelativeFile(
+      args[0], err, scope->settings()->build_settings()->root_path_utf8());
   scope->AddBuildDependencyFile(import_file);
   if (!err->has_error()) {
-    scope->settings()->import_manager().DoImport(import_file, function,
-                                                 scope, err);
+    scope->settings()->import_manager().DoImport(import_file, function, scope,
+                                                 err);
   }
   return Value();
 }
@@ -842,8 +838,7 @@
 // pool ------------------------------------------------------------------------
 
 const char kPool[] = "pool";
-const char kPool_HelpShort[] =
-    "pool: Defines a pool object.";
+const char kPool_HelpShort[] = "pool: Defines a pool object.";
 const char kPool_Help[] =
     R"*(pool: Defines a pool object.
 
@@ -957,8 +952,7 @@
 // print -----------------------------------------------------------------------
 
 const char kPrint[] = "print";
-const char kPrint_HelpShort[] =
-    "print: Prints to the console.";
+const char kPrint_HelpShort[] = "print: Prints to the console.";
 const char kPrint_Help[] =
     R"(print: Prints to the console.
 
@@ -1094,8 +1088,7 @@
       no_block_runner(nullptr),
       help_short(nullptr),
       help(nullptr),
-      is_target(false) {
-}
+      is_target(false) {}
 
 FunctionInfo::FunctionInfo(SelfEvaluatingArgsFunction seaf,
                            const char* in_help_short,
@@ -1107,8 +1100,7 @@
       no_block_runner(nullptr),
       help_short(in_help_short),
       help(in_help),
-      is_target(in_is_target) {
-}
+      is_target(in_is_target) {}
 
 FunctionInfo::FunctionInfo(GenericBlockFunction gbf,
                            const char* in_help_short,
@@ -1120,8 +1112,7 @@
       no_block_runner(nullptr),
       help_short(in_help_short),
       help(in_help),
-      is_target(in_is_target) {
-}
+      is_target(in_is_target) {}
 
 FunctionInfo::FunctionInfo(ExecutedBlockFunction ebf,
                            const char* in_help_short,
@@ -1133,8 +1124,7 @@
       no_block_runner(nullptr),
       help_short(in_help_short),
       help(in_help),
-      is_target(in_is_target) {
-}
+      is_target(in_is_target) {}
 
 FunctionInfo::FunctionInfo(NoBlockFunction nbf,
                            const char* in_help_short,
@@ -1146,8 +1136,7 @@
       no_block_runner(nbf),
       help_short(in_help_short),
       help(in_help),
-      is_target(in_is_target) {
-}
+      is_target(in_is_target) {}
 
 // Setup the function map via a static initializer. We use this because it
 // avoids race conditions without having to do some global setup function or
@@ -1158,11 +1147,9 @@
   FunctionInfoMap map;
 
   FunctionInfoInitializer() {
-    #define INSERT_FUNCTION(command, is_target) \
-        map[k##command] = FunctionInfo(&Run##command, \
-                                       k##command##_HelpShort, \
-                                       k##command##_Help, \
-                                       is_target);
+#define INSERT_FUNCTION(command, is_target)                             \
+  map[k##command] = FunctionInfo(&Run##command, k##command##_HelpShort, \
+                                 k##command##_Help, is_target);
 
     INSERT_FUNCTION(Action, true)
     INSERT_FUNCTION(ActionForEach, true)
@@ -1204,7 +1191,7 @@
     INSERT_FUNCTION(Toolchain, false)
     INSERT_FUNCTION(WriteFile, false)
 
-    #undef INSERT_FUNCTION
+#undef INSERT_FUNCTION
   }
 };
 const FunctionInfoInitializer function_info;
@@ -1247,8 +1234,8 @@
       if (!VerifyNoBlockForFunctionCall(function, block, err))
         return Value();
     }
-    return found_function->second.self_evaluating_args_runner(
-        scope, function, args_list, err);
+    return found_function->second.self_evaluating_args_runner(scope, function,
+                                                              args_list, err);
   }
 
   // All other function types take a pre-executed set of args.
diff --git a/tools/gn/functions.h b/tools/gn/functions.h
index c09612c..4638276 100644
--- a/tools/gn/functions.h
+++ b/tools/gn/functions.h
@@ -42,10 +42,10 @@
 // This type of function takes a block, but does not need to control execution
 // of it. The dispatch function will pre-execute the block and pass the
 // resulting block_scope to the function.
-typedef Value(*ExecutedBlockFunction)(const FunctionCallNode* function,
-                                      const std::vector<Value>& args,
-                                      Scope* block_scope,
-                                      Err* err);
+typedef Value (*ExecutedBlockFunction)(const FunctionCallNode* function,
+                                       const std::vector<Value>& args,
+                                       Scope* block_scope,
+                                       Err* err);
 
 // This type of function does not take a block. It just has arguments.
 typedef Value (*NoBlockFunction)(Scope* scope,
diff --git a/tools/gn/functions_target.cc b/tools/gn/functions_target.cc
index 5fec1ff..ca402d5 100644
--- a/tools/gn/functions_target.cc
+++ b/tools/gn/functions_target.cc
@@ -14,9 +14,8 @@
 #include "tools/gn/variables.h"
 
 #define DEPENDENT_CONFIG_VARS \
-    "  Dependent configs: all_dependent_configs, public_configs\n"
-#define DEPS_VARS \
-    "  Deps: data_deps, deps, public_deps\n"
+  "  Dependent configs: all_dependent_configs, public_configs\n"
+#define DEPS_VARS "  Deps: data_deps, deps, public_deps\n"
 #define GENERAL_TARGET_VARS                                                  \
   "  General: check_includes, configs, data, friend, inputs, output_name,\n" \
   "           output_extension, public, sources, testonly, visibility\n"
@@ -39,16 +38,16 @@
       !EnsureNotProcessingBuildConfig(function, scope, err))
     return Value();
   Scope block_scope(scope);
-  if (!FillTargetBlockScope(scope, function, target_type, block,
-                            args, &block_scope, err))
+  if (!FillTargetBlockScope(scope, function, target_type, block, args,
+                            &block_scope, err))
     return Value();
 
   block->Execute(&block_scope, err);
   if (err->has_error())
     return Value();
 
-  TargetGenerator::GenerateTarget(&block_scope, function, args,
-                                  target_type, err);
+  TargetGenerator::GenerateTarget(&block_scope, function, args, target_type,
+                                  err);
   if (err->has_error())
     return Value();
 
@@ -119,24 +118,24 @@
   variable.
 )"
 
-  ACTION_DEPS
+    ACTION_DEPS
 
-R"(
+    R"(
 Outputs
 
   You should specify files created by your script by specifying them in the
   "outputs".
 )"
 
-  SCRIPT_EXECUTION_CONTEXT
+    SCRIPT_EXECUTION_CONTEXT
 
-R"(
+    R"(
 File name handling
 )"
 
-  SCRIPT_EXECUTION_OUTPUTS
+    SCRIPT_EXECUTION_OUTPUTS
 
-R"(
+    R"(
 Variables
 
   args, data, data_deps, depfile, deps, inputs, outputs*, pool,
@@ -165,8 +164,8 @@
                 const std::vector<Value>& args,
                 BlockNode* block,
                 Err* err) {
-  return ExecuteGenericTarget(functions::kAction, scope, function, args,
-                              block, err);
+  return ExecuteGenericTarget(functions::kAction, scope, function, args, block,
+                              err);
 }
 
 // action_foreach --------------------------------------------------------------
@@ -199,17 +198,14 @@
   You can dynamically write input dependencies (for incremental rebuilds if an
   input file changes) by writing a depfile when the script is run (see "gn help
   depfile"). This is more flexible than "inputs".
-)"
-  ACTION_DEPS
-R"(
+)" ACTION_DEPS
+    R"(
 Outputs
-)"
-  SCRIPT_EXECUTION_CONTEXT
-R"(
+)" SCRIPT_EXECUTION_CONTEXT
+    R"(
 File name handling
-)"
-  SCRIPT_EXECUTION_OUTPUTS
-R"(
+)" SCRIPT_EXECUTION_OUTPUTS
+    R"(
 Variables
 
   args, data, data_deps, depfile, deps, inputs, outputs*, pool,
@@ -481,8 +477,7 @@
 // copy ------------------------------------------------------------------------
 
 const char kCopy[] = "copy";
-const char kCopy_HelpShort[] =
-    "copy: Declare a target that copies files.";
+const char kCopy_HelpShort[] = "copy: Declare a target that copies files.";
 const char kCopy_Help[] =
     R"(copy: Declare a target that copies files.
 
@@ -540,11 +535,7 @@
 
 Variables
 
-)"
-    CONFIG_VALUES_VARS_HELP
-    DEPS_VARS
-    DEPENDENT_CONFIG_VARS
-    GENERAL_TARGET_VARS;
+)" CONFIG_VALUES_VARS_HELP DEPS_VARS DEPENDENT_CONFIG_VARS GENERAL_TARGET_VARS;
 
 Value RunExecutable(Scope* scope,
                     const FunctionCallNode* function,
@@ -558,8 +549,7 @@
 // group -----------------------------------------------------------------------
 
 const char kGroup[] = "group";
-const char kGroup_HelpShort[] =
-    "group: Declare a named group of targets.";
+const char kGroup_HelpShort[] = "group: Declare a named group of targets.";
 const char kGroup_Help[] =
     R"(group: Declare a named group of targets.
 
@@ -569,11 +559,9 @@
 
 Variables
 
-)"
-    DEPS_VARS
-    DEPENDENT_CONFIG_VARS
+)" DEPS_VARS DEPENDENT_CONFIG_VARS
 
-R"(
+    R"(
 Example
 
   group("all") {
@@ -589,8 +577,8 @@
                const std::vector<Value>& args,
                BlockNode* block,
                Err* err) {
-  return ExecuteGenericTarget(functions::kGroup, scope, function, args,
-                              block, err);
+  return ExecuteGenericTarget(functions::kGroup, scope, function, args, block,
+                              err);
 }
 
 // loadable_module -------------------------------------------------------------
@@ -611,17 +599,13 @@
 
 Variables
 
-)"
-    CONFIG_VALUES_VARS_HELP
-    DEPS_VARS
-    DEPENDENT_CONFIG_VARS
-    GENERAL_TARGET_VARS;
+)" CONFIG_VALUES_VARS_HELP DEPS_VARS DEPENDENT_CONFIG_VARS GENERAL_TARGET_VARS;
 
 Value RunLoadableModule(Scope* scope,
-                       const FunctionCallNode* function,
-                       const std::vector<Value>& args,
-                       BlockNode* block,
-                       Err* err) {
+                        const FunctionCallNode* function,
+                        const std::vector<Value>& args,
+                        BlockNode* block,
+                        Err* err) {
   return ExecuteGenericTarget(functions::kLoadableModule, scope, function, args,
                               block, err);
 }
@@ -642,11 +626,7 @@
 
 Variables
 
-)"
-    CONFIG_VALUES_VARS_HELP
-    DEPS_VARS
-    DEPENDENT_CONFIG_VARS
-    GENERAL_TARGET_VARS;
+)" CONFIG_VALUES_VARS_HELP DEPS_VARS DEPENDENT_CONFIG_VARS GENERAL_TARGET_VARS;
 
 Value RunSharedLibrary(Scope* scope,
                        const FunctionCallNode* function,
@@ -715,11 +695,7 @@
 Variables
 
   complete_static_lib
-)"
-    CONFIG_VALUES_VARS_HELP
-    DEPS_VARS
-    DEPENDENT_CONFIG_VARS
-    GENERAL_TARGET_VARS;
+)" CONFIG_VALUES_VARS_HELP DEPS_VARS DEPENDENT_CONFIG_VARS GENERAL_TARGET_VARS;
 
 Value RunStaticLibrary(Scope* scope,
                        const FunctionCallNode* function,
diff --git a/tools/gn/functions_unittest.cc b/tools/gn/functions_unittest.cc
index 4b49a95..2007a93 100644
--- a/tools/gn/functions_unittest.cc
+++ b/tools/gn/functions_unittest.cc
@@ -110,8 +110,7 @@
 
       // Rounding.
       "out6 = split_list([1, 2, 3, 4, 5, 6], 4)\n"
-      "print(\"rounding = $out6\")\n"
-      );
+      "print(\"rounding = $out6\")\n");
   ASSERT_FALSE(input.has_error());
 
   Err err;
diff --git a/tools/gn/gn_main.cc b/tools/gn/gn_main.cc
index d2dd4a8..19c12d3 100644
--- a/tools/gn/gn_main.cc
+++ b/tools/gn/gn_main.cc
@@ -61,7 +61,8 @@
     // No command, print error and exit.
     Err(Location(), "No command specified.",
         "Most commonly you want \"gn gen <out_dir>\" to make a build dir.\n"
-        "Or try \"gn help\" for more commands.").PrintToStdout();
+        "Or try \"gn help\" for more commands.")
+        .PrintToStdout();
     return 1;
   } else {
     command = args[0];
diff --git a/tools/gn/group_target_generator.cc b/tools/gn/group_target_generator.cc
index e546865..2219e5e 100644
--- a/tools/gn/group_target_generator.cc
+++ b/tools/gn/group_target_generator.cc
@@ -12,8 +12,7 @@
     Scope* scope,
     const FunctionCallNode* function_call,
     Err* err)
-    : TargetGenerator(target, scope, function_call, err) {
-}
+    : TargetGenerator(target, scope, function_call, err) {}
 
 GroupTargetGenerator::~GroupTargetGenerator() = default;
 
diff --git a/tools/gn/header_checker.cc b/tools/gn/header_checker.cc
index a38ef25..2729653 100644
--- a/tools/gn/header_checker.cc
+++ b/tools/gn/header_checker.cc
@@ -42,33 +42,29 @@
 LocationRange CreatePersistentRange(const InputFile& input_file,
                                     const LocationRange& range) {
   InputFile* clone_input_file;
-  std::vector<Token>* tokens;  // Don't care about this.
+  std::vector<Token>* tokens;              // Don't care about this.
   std::unique_ptr<ParseNode>* parse_root;  // Don't care about this.
 
   g_scheduler->input_file_manager()->AddDynamicInput(
       input_file.name(), &clone_input_file, &tokens, &parse_root);
   clone_input_file->SetContents(input_file.contents());
 
-  return LocationRange(Location(clone_input_file,
-                                range.begin().line_number(),
-                                range.begin().column_number(),
-                                -1 /* TODO(scottmg) */),
-                       Location(clone_input_file,
-                                range.end().line_number(),
-                                range.end().column_number(),
-                                -1 /* TODO(scottmg) */));
+  return LocationRange(
+      Location(clone_input_file, range.begin().line_number(),
+               range.begin().column_number(), -1 /* TODO(scottmg) */),
+      Location(clone_input_file, range.end().line_number(),
+               range.end().column_number(), -1 /* TODO(scottmg) */));
 }
 
 // Given a reverse dependency chain where the target chain[0]'s includes are
 // being used by chain[end] and not all deps are public, returns the string
 // describing the error.
-std::string GetDependencyChainPublicError(
-    const HeaderChecker::Chain& chain) {
-  std::string ret = "The target:\n  " +
+std::string GetDependencyChainPublicError(const HeaderChecker::Chain& chain) {
+  std::string ret =
+      "The target:\n  " +
       chain[chain.size() - 1].target->label().GetUserVisibleName(false) +
       "\nis including a file from the target:\n  " +
-      chain[0].target->label().GetUserVisibleName(false) +
-      "\n";
+      chain[0].target->label().GetUserVisibleName(false) + "\n";
 
   // Invalid chains should always be 0 (no chain) or more than two
   // (intermediate private dependencies). 1 and 2 are impossible because a
@@ -78,7 +74,8 @@
     ret += "There is no dependency chain between these targets.";
   } else {
     // Indirect dependency chain, print the chain.
-    ret += "\nIt's usually best to depend directly on the destination target.\n"
+    ret +=
+        "\nIt's usually best to depend directly on the destination target.\n"
         "In some cases, the destination target is considered a subcomponent\n"
         "of an intermediate target. In this case, the intermediate target\n"
         "should depend publicly on the destination to forward the ability\n"
@@ -230,8 +227,8 @@
 
   // Add the merged list to the master list of all files.
   for (const auto& cur : files_to_public) {
-    (*dest)[cur.first].push_back(TargetInfo(
-        target, cur.second.is_public, cur.second.is_generated));
+    (*dest)[cur.first].push_back(
+        TargetInfo(target, cur.second.is_public, cur.second.is_generated));
   }
 }
 
@@ -278,10 +275,11 @@
   base::FilePath path = build_settings_->GetFullPath(file);
   std::string contents;
   if (!base::ReadFileToString(path, &contents)) {
-    *err = Err(from_target->defined_from(), "Source file not found.",
-        "The target:\n  " + from_target->label().GetUserVisibleName(false) +
-        "\nhas a source file:\n  " + file.value() +
-        "\nwhich was not found.");
+    *err =
+        Err(from_target->defined_from(), "Source file not found.",
+            "The target:\n  " + from_target->label().GetUserVisibleName(false) +
+                "\nhas a source file:\n  " + file.value() +
+                "\nwhich was not found.");
     return false;
   }
 
@@ -405,16 +403,15 @@
                          "This file is private to the target " +
                              target.target->label().GetUserVisibleName(false));
       } else if (!is_permitted_chain) {
-        last_error = Err(
-            CreatePersistentRange(source_file, range),
-            "Can't include this header from here.",
-                GetDependencyChainPublicError(chain));
+        last_error = Err(CreatePersistentRange(source_file, range),
+                         "Can't include this header from here.",
+                         GetDependencyChainPublicError(chain));
       } else {
         NOTREACHED();
       }
-    } else if (
-        to_target->allow_circular_includes_from().find(from_target->label()) !=
-        to_target->allow_circular_includes_from().end()) {
+    } else if (to_target->allow_circular_includes_from().find(
+                   from_target->label()) !=
+               to_target->allow_circular_includes_from().end()) {
       // Not a dependency, but this include is whitelisted from the destination.
       found_dependency = true;
       last_error = Err();
@@ -542,11 +539,10 @@
   return false;
 }
 
-Err HeaderChecker::MakeUnreachableError(
-    const InputFile& source_file,
-    const LocationRange& range,
-    const Target* from_target,
-    const TargetVector& targets) {
+Err HeaderChecker::MakeUnreachableError(const InputFile& source_file,
+                                        const LocationRange& range,
+                                        const Target* from_target,
+                                        const TargetVector& targets) {
   // Normally the toolchains will all match, but when cross-compiling, we can
   // get targets with more than one toolchain in the list of possibilities.
   std::vector<const Target*> targets_with_matching_toolchains;
@@ -584,18 +580,19 @@
   bool include_toolchain = !targets_with_other_toolchains.empty();
 
   std::string msg = "It is not in any dependency of\n  " +
-      from_target->label().GetUserVisibleName(include_toolchain);
+                    from_target->label().GetUserVisibleName(include_toolchain);
   msg += "\nThe include file is in the target(s):\n";
   for (auto* target : targets_with_matching_toolchains)
     msg += "  " + target->label().GetUserVisibleName(include_toolchain) + "\n";
   for (auto* target : targets_with_other_toolchains)
     msg += "  " + target->label().GetUserVisibleName(include_toolchain) + "\n";
   if (targets_with_other_toolchains.size() +
-      targets_with_matching_toolchains.size() > 1)
+          targets_with_matching_toolchains.size() >
+      1)
     msg += "at least one of ";
   msg += "which should somehow be reachable.";
 
   // Danger: must call CreatePersistentRange to put in Err.
-  return Err(CreatePersistentRange(source_file, range),
-             "Include not allowed.", msg);
+  return Err(CreatePersistentRange(source_file, range), "Include not allowed.",
+             msg);
 }
diff --git a/tools/gn/header_checker.h b/tools/gn/header_checker.h
index b1d0f79..8b2d504 100644
--- a/tools/gn/header_checker.h
+++ b/tools/gn/header_checker.h
@@ -78,10 +78,7 @@
   struct TargetInfo {
     TargetInfo() : target(nullptr), is_public(false), is_generated(false) {}
     TargetInfo(const Target* t, bool is_pub, bool is_gen)
-        : target(t),
-          is_public(is_pub),
-          is_generated(is_gen) {
-    }
+        : target(t), is_public(is_pub), is_generated(is_gen) {}
 
     const Target* target;
 
diff --git a/tools/gn/inherited_libraries.cc b/tools/gn/inherited_libraries.cc
index 62c4150..482256f 100644
--- a/tools/gn/inherited_libraries.cc
+++ b/tools/gn/inherited_libraries.cc
@@ -43,8 +43,8 @@
 
 void InheritedLibraries::Append(const Target* target, bool is_public) {
   // Try to insert a new node.
-  auto insert_result = map_.insert(
-      std::make_pair(target, Node(map_.size(), is_public)));
+  auto insert_result =
+      map_.insert(std::make_pair(target, Node(map_.size(), is_public)));
 
   if (!insert_result.second) {
     // Element already present, insert failed and insert_result indicates the
diff --git a/tools/gn/inherited_libraries_unittest.cc b/tools/gn/inherited_libraries_unittest.cc
index b4fd0fd..42999bc 100644
--- a/tools/gn/inherited_libraries_unittest.cc
+++ b/tools/gn/inherited_libraries_unittest.cc
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "test/test.h"
 #include "tools/gn/inherited_libraries.h"
+#include "test/test.h"
 #include "tools/gn/target.h"
 #include "tools/gn/test_with_scope.h"
 
diff --git a/tools/gn/input_conversion.cc b/tools/gn/input_conversion.cc
index 131df0c..f4a0f74 100644
--- a/tools/gn/input_conversion.cc
+++ b/tools/gn/input_conversion.cc
@@ -42,8 +42,8 @@
   InputFile* input_file;
   std::vector<Token>* tokens;
   std::unique_ptr<ParseNode>* parse_root_ptr;
-  g_scheduler->input_file_manager()->AddDynamicInput(
-      SourceFile(), &input_file, &tokens, &parse_root_ptr);
+  g_scheduler->input_file_manager()->AddDynamicInput(SourceFile(), &input_file,
+                                                     &tokens, &parse_root_ptr);
 
   input_file->SetContents(input);
   if (origin) {
@@ -51,10 +51,9 @@
     // script parsing or if a value is blamed. It will say
     // "Error at <...>:line:char" so here we try to make a string for <...>
     // that reads well in this context.
-    input_file->set_friendly_name(
-        "dynamically parsed input that " +
-        origin->GetRange().begin().Describe(true) +
-        " loaded ");
+    input_file->set_friendly_name("dynamically parsed input that " +
+                                  origin->GetRange().begin().Describe(true) +
+                                  " loaded ");
   } else {
     input_file->set_friendly_name("dynamic input");
   }
diff --git a/tools/gn/input_conversion_unittest.cc b/tools/gn/input_conversion_unittest.cc
index e00559d..86a372c 100644
--- a/tools/gn/input_conversion_unittest.cc
+++ b/tools/gn/input_conversion_unittest.cc
@@ -53,10 +53,10 @@
   EXPECT_FALSE(err.has_error());
   EXPECT_EQ(Value::LIST, result.type());
   ASSERT_EQ(4u, result.list_value().size());
-  EXPECT_EQ("",    result.list_value()[0].string_value());
+  EXPECT_EQ("", result.list_value()[0].string_value());
   EXPECT_EQ("foo", result.list_value()[1].string_value());
   EXPECT_EQ("bar", result.list_value()[2].string_value());
-  EXPECT_EQ("",    result.list_value()[3].string_value());
+  EXPECT_EQ("", result.list_value()[3].string_value());
 
   // Test with trimming.
   result = ConvertInputToValue(settings(), input, nullptr,
@@ -97,7 +97,7 @@
   ASSERT_EQ(Value::LIST, result.type());
   ASSERT_EQ(2u, result.list_value().size());
   EXPECT_EQ("a", result.list_value()[0].string_value());
-  EXPECT_EQ(5,   result.list_value()[1].int_value());
+  EXPECT_EQ(5, result.list_value()[1].int_value());
 }
 
 TEST_F(InputConversionTest, ValueDict) {
@@ -247,8 +247,7 @@
       "233105-1",
 
       // Non-literals hidden in arrays are not allowed.
-      "[233105 - 1]",
-      "[rebase_path(\"//\")]",
+      "[233105 - 1]", "[rebase_path(\"//\")]",
   };
 
   for (auto* test : kTests) {
diff --git a/tools/gn/input_file.cc b/tools/gn/input_file.cc
index 4d310e8..438ab38 100644
--- a/tools/gn/input_file.cc
+++ b/tools/gn/input_file.cc
@@ -7,10 +7,7 @@
 #include "base/files/file_util.h"
 
 InputFile::InputFile(const SourceFile& name)
-    : name_(name),
-      dir_(name_.GetDir()),
-      contents_loaded_(false) {
-}
+    : name_(name), dir_(name_.GetDir()), contents_loaded_(false) {}
 
 InputFile::~InputFile() = default;
 
@@ -27,4 +24,3 @@
   }
   return false;
 }
-
diff --git a/tools/gn/input_file_manager.cc b/tools/gn/input_file_manager.cc
index 37841ae..5ac71f0 100644
--- a/tools/gn/input_file_manager.cc
+++ b/tools/gn/input_file_manager.cc
@@ -49,10 +49,10 @@
           build_settings->GetFullPathSecondary(name);
       if (!file->Load(secondary_path)) {
         *err = Err(origin, "Can't load input file.",
-                   "Unable to load:\n  " +
-                   FilePathToUTF8(primary_path) + "\n"
-                   "I also checked in the secondary tree for:\n  " +
-                   FilePathToUTF8(secondary_path));
+                   "Unable to load:\n  " + FilePathToUTF8(primary_path) +
+                       "\n"
+                       "I also checked in the secondary tree for:\n  " +
+                       FilePathToUTF8(secondary_path));
         return false;
       }
     } else {
@@ -82,10 +82,7 @@
 }  // namespace
 
 InputFileManager::InputFileData::InputFileData(const SourceFile& file_name)
-    : file(file_name),
-      loaded(false),
-      sync_invocation(false) {
-}
+    : file(file_name), loaded(false), sync_invocation(false) {}
 
 InputFileManager::InputFileData::~InputFileData() = default;
 
@@ -125,11 +122,14 @@
       if (data->sync_invocation) {
         g_scheduler->FailWithError(Err(
             origin, "Load type mismatch.",
-            "The file \"" + file_name.value() + "\" was previously loaded\n"
-            "synchronously (via an import) and now you're trying to load it "
-            "asynchronously\n(via a deps rule). This is a class 2 misdemeanor: "
-            "a single input file must\nbe loaded the same way each time to "
-            "avoid blowing my tiny, tiny mind."));
+            "The file \"" + file_name.value() +
+                "\" was previously loaded\n"
+                "synchronously (via an import) and now you're trying to load "
+                "it "
+                "asynchronously\n(via a deps rule). This is a class 2 "
+                "misdemeanor: "
+                "a single input file must\nbe loaded the same way each time to "
+                "avoid blowing my tiny, tiny mind."));
         return false;
       }
 
@@ -187,13 +187,16 @@
       // I have no practical way to test this, and generally we should have
       // all include files processed synchronously and all build files
       // processed asynchronously, so it doesn't happen in practice.
-      *err = Err(
-          origin, "Load type mismatch.",
-          "The file \"" + file_name.value() + "\" was previously loaded\n"
-          "asynchronously (via a deps rule) and now you're trying to load it "
-          "synchronously.\nThis is a class 2 misdemeanor: a single input file "
-          "must be loaded the same way\neach time to avoid blowing my tiny, "
-          "tiny mind.");
+      *err = Err(origin, "Load type mismatch.",
+                 "The file \"" + file_name.value() +
+                     "\" was previously loaded\n"
+                     "asynchronously (via a deps rule) and now you're trying "
+                     "to load it "
+                     "synchronously.\nThis is a class 2 misdemeanor: a single "
+                     "input file "
+                     "must be loaded the same way\neach time to avoid blowing "
+                     "my tiny, "
+                     "tiny mind.");
       return nullptr;
     }
 
@@ -269,8 +272,8 @@
                                 Err* err) {
   std::vector<Token> tokens;
   std::unique_ptr<ParseNode> root;
-  bool success = DoLoadFile(origin, build_settings, name, file,
-                            &tokens, &root, err);
+  bool success =
+      DoLoadFile(origin, build_settings, name, file, &tokens, &root, err);
   // Can't return early. We have to ensure that the completion event is
   // signaled in all cases bacause another thread could be blocked on this one.
 
diff --git a/tools/gn/label.cc b/tools/gn/label.cc
index 5617a3a..11b9419 100644
--- a/tools/gn/label.cc
+++ b/tools/gn/label.cc
@@ -126,31 +126,33 @@
       // Leave location piece null.
     } else if (!out_toolchain_dir) {
       // Toolchain specified but not allows in this context.
-      *err = Err(original_value, "Toolchain has a toolchain.",
-          "Your toolchain definition (inside the parens) seems to itself "
-          "have a\ntoolchain. Don't do this.");
+      *err =
+          Err(original_value, "Toolchain has a toolchain.",
+              "Your toolchain definition (inside the parens) seems to itself "
+              "have a\ntoolchain. Don't do this.");
       return false;
     } else {
       // Name piece is everything between the two separators. Note that the
       // separators may be the same (e.g. "//foo(bar)" which means empty name.
       if (toolchain_separator > path_separator) {
-        name_piece = base::StringPiece(
-            &input_str[path_separator + 1],
-            toolchain_separator - path_separator - 1);
+        name_piece =
+            base::StringPiece(&input_str[path_separator + 1],
+                              toolchain_separator - path_separator - 1);
       }
 
       // Toolchain name should end in a ) and this should be the end of the
       // string.
       if (input[input.size() - 1] != ')') {
-        *err = Err(original_value, "Bad toolchain name.",
-            "Toolchain name must end in a \")\" at the end of the label.");
+        *err =
+            Err(original_value, "Bad toolchain name.",
+                "Toolchain name must end in a \")\" at the end of the label.");
         return false;
       }
 
       // Subtract off the two parens to just get the toolchain name.
-      toolchain_piece = base::StringPiece(
-          &input_str[toolchain_separator + 1],
-          input.size() - toolchain_separator - 2);
+      toolchain_piece =
+          base::StringPiece(&input_str[toolchain_separator + 1],
+                            input.size() - toolchain_separator - 2);
     }
   }
 
@@ -169,8 +171,8 @@
                                    out_dir, err))
     return false;
 
-  if (!ComputeTargetNameFromDep(original_value, *out_dir, name_piece,
-                                out_name, err))
+  if (!ComputeTargetNameFromDep(original_value, *out_dir, name_piece, out_name,
+                                err))
     return false;
 
   // Last, do the toolchains.
@@ -254,14 +256,12 @@
              const base::StringPiece& name,
              const SourceDir& toolchain_dir,
              const base::StringPiece& toolchain_name)
-    : dir_(dir),
-      toolchain_dir_(toolchain_dir) {
+    : dir_(dir), toolchain_dir_(toolchain_dir) {
   name_.assign(name.data(), name.size());
   toolchain_name_.assign(toolchain_name.data(), toolchain_name.size());
 }
 
-Label::Label(const SourceDir& dir, const base::StringPiece& name)
-    : dir_(dir) {
+Label::Label(const SourceDir& dir, const base::StringPiece& name) : dir_(dir) {
   name_.assign(name.data(), name.size());
 }
 
@@ -285,10 +285,8 @@
     return ret;
   }
 
-  if (!::Resolve(current_dir, current_toolchain, input, input_string,
-                 &ret.dir_, &ret.name_,
-                 &ret.toolchain_dir_, &ret.toolchain_name_,
-                 err))
+  if (!::Resolve(current_dir, current_toolchain, input, input_string, &ret.dir_,
+                 &ret.name_, &ret.toolchain_dir_, &ret.toolchain_name_, err))
     return Label();
   return ret;
 }
@@ -325,8 +323,7 @@
 }
 
 std::string Label::GetUserVisibleName(const Label& default_toolchain) const {
-  bool include_toolchain =
-      default_toolchain.dir() != toolchain_dir_ ||
-      default_toolchain.name() != toolchain_name_;
+  bool include_toolchain = default_toolchain.dir() != toolchain_dir_ ||
+                           default_toolchain.name() != toolchain_name_;
   return GetUserVisibleName(include_toolchain);
 }
diff --git a/tools/gn/label.h b/tools/gn/label.h
index 54dadff..3c3d85a 100644
--- a/tools/gn/label.h
+++ b/tools/gn/label.h
@@ -69,9 +69,7 @@
            toolchain_dir_ == other.toolchain_dir_ &&
            toolchain_name_ == other.toolchain_name_;
   }
-  bool operator!=(const Label& other) const {
-    return !operator==(other);
-  }
+  bool operator!=(const Label& other) const { return !operator==(other); }
   bool operator<(const Label& other) const {
     if (int c = dir_.value().compare(other.dir_.value()))
       return c < 0;
@@ -106,12 +104,13 @@
 
 namespace std {
 
-template<> struct hash<Label> {
+template <>
+struct hash<Label> {
   std::size_t operator()(const Label& v) const {
     hash<std::string> stringhash;
-    return ((stringhash(v.dir().value()) * 131 +
-             stringhash(v.name())) * 131 +
-            stringhash(v.toolchain_dir().value())) * 131 +
+    return ((stringhash(v.dir().value()) * 131 + stringhash(v.name())) * 131 +
+            stringhash(v.toolchain_dir().value())) *
+               131 +
            stringhash(v.toolchain_name());
   }
 };
diff --git a/tools/gn/label_pattern.cc b/tools/gn/label_pattern.cc
index 5472be0..7d932d3 100644
--- a/tools/gn/label_pattern.cc
+++ b/tools/gn/label_pattern.cc
@@ -48,16 +48,13 @@
         toolchain.
 )*";
 
-LabelPattern::LabelPattern() : type_(MATCH) {
-}
+LabelPattern::LabelPattern() : type_(MATCH) {}
 
 LabelPattern::LabelPattern(Type type,
                            const SourceDir& dir,
                            const base::StringPiece& name,
                            const Label& toolchain_label)
-    : toolchain_(toolchain_label),
-      type_(type),
-      dir_(dir) {
+    : toolchain_(toolchain_label), type_(type), dir_(dir) {
   name.CopyToString(&name_);
 }
 
@@ -165,10 +162,11 @@
 
     if (!path.empty() && path[path.size() - 1] != '/') {
       // The input was "foo*" which is invalid.
-      *err = Err(value, "'*' must match full directories in a label pattern.",
-          "You did \"foo*\" but this thing doesn't do general pattern\n"
-          "matching. Instead, you have to add a slash: \"foo/*\" to match\n"
-          "all targets in a directory hierarchy.");
+      *err =
+          Err(value, "'*' must match full directories in a label pattern.",
+              "You did \"foo*\" but this thing doesn't do general pattern\n"
+              "matching. Instead, you have to add a slash: \"foo/*\" to match\n"
+              "all targets in a directory hierarchy.");
       return LabelPattern();
     }
   }
@@ -178,7 +176,7 @@
     // The non-wildcard stuff better not have a wildcard.
     if (path.find('*') != base::StringPiece::npos) {
       *err = Err(value, "Label patterns only support wildcard suffixes.",
-          "The pattern contained a '*' that wasn't at the end.");
+                 "The pattern contained a '*' that wasn't at the end.");
       return LabelPattern();
     }
 
@@ -191,7 +189,8 @@
   // Resolve the name. At this point, we're doing wildcard matches so the
   // name should either be empty ("foo/*") or a wildcard ("foo:*");
   if (colon != std::string::npos && name != "*") {
-    *err = Err(value, "Invalid label pattern.",
+    *err = Err(
+        value, "Invalid label pattern.",
         "You seem to be using the wildcard more generally that is supported.\n"
         "Did you mean \"foo:*\" to match everything in the file, or\n"
         "\"./*\" to recursively match everything in the currend subtree.");
@@ -234,8 +233,8 @@
       return label.dir() == dir_;
     case RECURSIVE_DIRECTORY:
       // Our directory must be a prefix of the input label for recursive.
-      return label.dir().value().compare(0, dir_.value().size(), dir_.value())
-          == 0;
+      return label.dir().value().compare(0, dir_.value().size(),
+                                         dir_.value()) == 0;
     default:
       NOTREACHED();
       return false;
diff --git a/tools/gn/label_pattern.h b/tools/gn/label_pattern.h
index 774b81a..231fd6d 100644
--- a/tools/gn/label_pattern.h
+++ b/tools/gn/label_pattern.h
@@ -20,8 +20,8 @@
 class LabelPattern {
  public:
   enum Type {
-    MATCH = 1,  // Exact match for a given target.
-    DIRECTORY,  // Only targets in the file in the given directory.
+    MATCH = 1,           // Exact match for a given target.
+    DIRECTORY,           // Only targets in the file in the given directory.
     RECURSIVE_DIRECTORY  // The given directory and any subdir.
                          // (also indicates "public" when dir is empty).
   };
diff --git a/tools/gn/label_ptr.h b/tools/gn/label_ptr.h
index 24906dd..5aaa02d 100644
--- a/tools/gn/label_ptr.h
+++ b/tools/gn/label_ptr.h
@@ -20,7 +20,7 @@
 // the pointers on another thread from where we compute the labels, so this
 // structure lets us save them separately. This also allows us to store the
 // location of the thing that added this dependency.
-template<typename T>
+template <typename T>
 struct LabelPtrPair {
   typedef T DestType;
 
@@ -55,7 +55,7 @@
 
 // To do a brute-force search by label:
 // std::find_if(vect.begin(), vect.end(), LabelPtrLabelEquals<Config>(label));
-template<typename T>
+template <typename T>
 struct LabelPtrLabelEquals {
   explicit LabelPtrLabelEquals(const Label& l) : label(l) {}
 
@@ -68,20 +68,18 @@
 
 // To do a brute-force search by object pointer:
 // std::find_if(vect.begin(), vect.end(), LabelPtrPtrEquals<Config>(config));
-template<typename T>
+template <typename T>
 struct LabelPtrPtrEquals {
   explicit LabelPtrPtrEquals(const T* p) : ptr(p) {}
 
-  bool operator()(const LabelPtrPair<T>& arg) const {
-    return arg.ptr == ptr;
-  }
+  bool operator()(const LabelPtrPair<T>& arg) const { return arg.ptr == ptr; }
 
   const T* ptr;
 };
 
 // To sort by label:
 // std::sort(vect.begin(), vect.end(), LabelPtrLabelLess<Config>());
-template<typename T>
+template <typename T>
 struct LabelPtrLabelLess {
   bool operator()(const LabelPtrPair<T>& a, const LabelPtrPair<T>& b) const {
     return a.label < b.label;
@@ -93,19 +91,20 @@
 // The default hash and comparison operators operate on the label, which should
 // always be valid, whereas the pointer is sometimes null.
 
-template<typename T> inline bool operator==(const LabelPtrPair<T>& a,
-                                            const LabelPtrPair<T>& b) {
+template <typename T>
+inline bool operator==(const LabelPtrPair<T>& a, const LabelPtrPair<T>& b) {
   return a.label == b.label;
 }
 
-template<typename T> inline bool operator<(const LabelPtrPair<T>& a,
-                                           const LabelPtrPair<T>& b) {
+template <typename T>
+inline bool operator<(const LabelPtrPair<T>& a, const LabelPtrPair<T>& b) {
   return a.label < b.label;
 }
 
 namespace std {
 
-template<typename T> struct hash< LabelPtrPair<T> > {
+template <typename T>
+struct hash<LabelPtrPair<T>> {
   std::size_t operator()(const LabelPtrPair<T>& v) const {
     hash<Label> h;
     return h(v.label);
diff --git a/tools/gn/loader.cc b/tools/gn/loader.cc
index 1459f8e..a069fb8 100644
--- a/tools/gn/loader.cc
+++ b/tools/gn/loader.cc
@@ -208,8 +208,8 @@
   Err err;
   pending_loads_++;
   if (!AsyncLoadFile(origin, settings->build_settings(), file,
-                     base::Bind(&LoaderImpl::BackgroundLoadFile, this,
-                                settings, file, origin),
+                     base::Bind(&LoaderImpl::BackgroundLoadFile, this, settings,
+                                file, origin),
                      &err)) {
     g_scheduler->FailWithError(err);
     DecrementPendingLoads();
@@ -223,8 +223,8 @@
   pending_loads_++;
   if (!AsyncLoadFile(LocationRange(), settings->build_settings(),
                      settings->build_settings()->build_config_file(),
-                     base::Bind(&LoaderImpl::BackgroundLoadBuildConfig,
-                                this, settings, toolchain_overrides),
+                     base::Bind(&LoaderImpl::BackgroundLoadBuildConfig, this,
+                                settings, toolchain_overrides),
                      &err)) {
     g_scheduler->FailWithError(err);
     DecrementPendingLoads();
@@ -242,8 +242,9 @@
   }
 
   if (g_scheduler->verbose_logging()) {
-    g_scheduler->Log("Running", file_name.value() + " with toolchain " +
-                     settings->toolchain_label().GetUserVisibleName(false));
+    g_scheduler->Log("Running",
+                     file_name.value() + " with toolchain " +
+                         settings->toolchain_label().GetUserVisibleName(false));
   }
 
   Scope our_scope(settings->base_config());
@@ -269,7 +270,6 @@
     g_scheduler->FailWithError(err);
   }
 
-
   // Pass all of the items that were defined off to the builder.
   for (auto& item : collected_items)
     settings->build_settings()->ItemDefined(std::move(item));
diff --git a/tools/gn/loader.h b/tools/gn/loader.h
index a028565..629d82c 100644
--- a/tools/gn/loader.h
+++ b/tools/gn/loader.h
@@ -75,7 +75,8 @@
                               const BuildSettings*,
                               const SourceFile&,
                               const base::Callback<void(const ParseNode*)>&,
-                              Err*)> AsyncLoadFileCallback;
+                              Err*)>
+      AsyncLoadFileCallback;
 
   explicit LoaderImpl(const BuildSettings* build_settings);
 
@@ -118,9 +119,8 @@
   void ScheduleLoadFile(const Settings* settings,
                         const LocationRange& origin,
                         const SourceFile& file);
-  void ScheduleLoadBuildConfig(
-      Settings* settings,
-      const Scope::KeyValueMap& toolchain_overrides);
+  void ScheduleLoadBuildConfig(Settings* settings,
+                               const Scope::KeyValueMap& toolchain_overrides);
 
   // Runs the given file on the background thread. These are called by the
   // input file manager.
@@ -128,10 +128,9 @@
                           const SourceFile& file_name,
                           const LocationRange& origin,
                           const ParseNode* root);
-  void BackgroundLoadBuildConfig(
-      Settings* settings,
-      const Scope::KeyValueMap& toolchain_overrides,
-      const ParseNode* root);
+  void BackgroundLoadBuildConfig(Settings* settings,
+                                 const Scope::KeyValueMap& toolchain_overrides,
+                                 const ParseNode* root);
 
   // Posted to the main thread when any file other than a build config file
   // file has completed running.
diff --git a/tools/gn/loader_unittest.cc b/tools/gn/loader_unittest.cc
index 78a8584..3cf12d1 100644
--- a/tools/gn/loader_unittest.cc
+++ b/tools/gn/loader_unittest.cc
@@ -87,7 +87,7 @@
   typedef std::map<SourceFile, std::unique_ptr<CannedResult>> CannedResponseMap;
   CannedResponseMap canned_responses_;
 
-  std::vector< std::pair<SourceFile, Callback> > pending_;
+  std::vector<std::pair<SourceFile, Callback>> pending_;
 };
 
 LoaderImpl::AsyncLoadFileCallback MockInputFileManager::GetCallback() {
@@ -142,9 +142,7 @@
 
 class LoaderTest : public TestWithScheduler {
  public:
-  LoaderTest() {
-    build_settings_.SetBuildDir(SourceDir("//out/Debug/"));
-  }
+  LoaderTest() { build_settings_.SetBuildDir(SourceDir("//out/Debug/")); }
 
  protected:
   BuildSettings build_settings_;
diff --git a/tools/gn/location.cc b/tools/gn/location.cc
index f3c2d91..b9e4c22 100644
--- a/tools/gn/location.cc
+++ b/tools/gn/location.cc
@@ -10,11 +10,7 @@
 #include "base/strings/string_number_conversions.h"
 #include "tools/gn/input_file.h"
 
-Location::Location()
-    : file_(nullptr),
-      line_number_(-1),
-      column_number_(-1) {
-}
+Location::Location() : file_(nullptr), line_number_(-1), column_number_(-1) {}
 
 Location::Location(const InputFile* file,
                    int line_number,
@@ -23,12 +19,10 @@
     : file_(file),
       line_number_(line_number),
       column_number_(column_number),
-      byte_(byte) {
-}
+      byte_(byte) {}
 
 bool Location::operator==(const Location& other) const {
-  return other.file_ == file_ &&
-         other.line_number_ == line_number_ &&
+  return other.file_ == file_ && other.line_number_ == line_number_ &&
          other.column_number_ == column_number_;
 }
 
@@ -64,14 +58,12 @@
 LocationRange::LocationRange() = default;
 
 LocationRange::LocationRange(const Location& begin, const Location& end)
-    : begin_(begin),
-      end_(end) {
+    : begin_(begin), end_(end) {
   DCHECK(begin_.file() == end_.file());
 }
 
 LocationRange LocationRange::Union(const LocationRange& other) const {
   DCHECK(begin_.file() == other.begin_.file());
-  return LocationRange(
-      begin_ < other.begin_ ? begin_ : other.begin_,
-      end_ < other.end_ ? other.end_ : end_);
+  return LocationRange(begin_ < other.begin_ ? begin_ : other.begin_,
+                       end_ < other.end_ ? other.end_ : end_);
 }
diff --git a/tools/gn/location.h b/tools/gn/location.h
index 647c6f7..de9b2fd 100644
--- a/tools/gn/location.h
+++ b/tools/gn/location.h
@@ -50,7 +50,6 @@
     return begin_.is_null();  // No need to check both for the null case.
   }
 
-
   LocationRange Union(const LocationRange& other) const;
 
  private:
diff --git a/tools/gn/ninja_action_target_writer.cc b/tools/gn/ninja_action_target_writer.cc
index 263cf23..c2016dc 100644
--- a/tools/gn/ninja_action_target_writer.cc
+++ b/tools/gn/ninja_action_target_writer.cc
@@ -21,8 +21,7 @@
       path_output_no_escaping_(
           target->settings()->build_settings()->build_dir(),
           target->settings()->build_settings()->root_path_utf8(),
-          ESCAPE_NONE) {
-}
+          ESCAPE_NONE) {}
 
 NinjaActionTargetWriter::~NinjaActionTargetWriter() = default;
 
@@ -129,8 +128,8 @@
     for (const auto& arg :
          target_->action_values().rsp_file_contents().list()) {
       out_ << " ";
-      SubstitutionWriter::WriteWithNinjaVariables(
-          arg, args_escape_options, out_);
+      SubstitutionWriter::WriteWithNinjaVariables(arg, args_escape_options,
+                                                  out_);
     }
     out_ << std::endl;
   }
@@ -141,8 +140,7 @@
   path_output_.WriteFile(out_, target_->action_values().script());
   for (const auto& arg : args.list()) {
     out_ << " ";
-    SubstitutionWriter::WriteWithNinjaVariables(
-        arg, args_escape_options, out_);
+    SubstitutionWriter::WriteWithNinjaVariables(arg, args_escape_options, out_);
   }
   out_ << std::endl;
   out_ << "  description = ACTION " << target_label << std::endl;
@@ -196,8 +194,8 @@
     // other) and the redundant assignment won't bother Ninja.
     SubstitutionWriter::WriteNinjaVariablesForSource(
         target_, settings_, sources[i],
-        target_->action_values().args().required_types(),
-        args_escape_options, out_);
+        target_->action_values().args().required_types(), args_escape_options,
+        out_);
     SubstitutionWriter::WriteNinjaVariablesForSource(
         target_, settings_, sources[i],
         target_->action_values().rsp_file_contents().required_types(),
@@ -233,7 +231,8 @@
 }
 
 void NinjaActionTargetWriter::WriteDepfile(const SourceFile& source) {
-  path_output_.WriteFile(out_,
+  path_output_.WriteFile(
+      out_,
       SubstitutionWriter::ApplyPatternToSourceAsOutputFile(
           target_, settings_, target_->action_values().depfile(), source));
 }
diff --git a/tools/gn/ninja_action_target_writer.h b/tools/gn/ninja_action_target_writer.h
index d0010f9..36d7cd9 100644
--- a/tools/gn/ninja_action_target_writer.h
+++ b/tools/gn/ninja_action_target_writer.h
@@ -26,8 +26,7 @@
                            WriteOutputFilesForBuildLine);
   FRIEND_TEST_ALL_PREFIXES(NinjaActionTargetWriter,
                            WriteOutputFilesForBuildLineWithDepfile);
-  FRIEND_TEST_ALL_PREFIXES(NinjaActionTargetWriter,
-                           WriteArgsSubstitutions);
+  FRIEND_TEST_ALL_PREFIXES(NinjaActionTargetWriter, WriteArgsSubstitutions);
 
   // Writes the Ninja rule for invoking the script.
   //
diff --git a/tools/gn/ninja_action_target_writer_unittest.cc b/tools/gn/ninja_action_target_writer_unittest.cc
index 9073223..896803b 100644
--- a/tools/gn/ninja_action_target_writer_unittest.cc
+++ b/tools/gn/ninja_action_target_writer_unittest.cc
@@ -19,9 +19,9 @@
 
   Target target(setup.settings(), Label(SourceDir("//foo/"), "bar"));
   target.set_output_type(Target::ACTION_FOREACH);
-  target.action_values().outputs() = SubstitutionList::MakeForTest(
-      "//out/Debug/gen/a b{{source_name_part}}.h",
-      "//out/Debug/gen/{{source_name_part}}.cc");
+  target.action_values().outputs() =
+      SubstitutionList::MakeForTest("//out/Debug/gen/a b{{source_name_part}}.h",
+                                    "//out/Debug/gen/{{source_name_part}}.cc");
 
   target.SetToolchain(setup.toolchain());
   ASSERT_TRUE(target.OnResolved(&err));
@@ -53,8 +53,8 @@
   target.SetToolchain(setup.toolchain());
   ASSERT_TRUE(target.OnResolved(&err));
 
-  setup.build_settings()->set_python_path(base::FilePath(FILE_PATH_LITERAL(
-      "/usr/bin/python")));
+  setup.build_settings()->set_python_path(
+      base::FilePath(FILE_PATH_LITERAL("/usr/bin/python")));
 
   std::ostringstream out;
   NinjaActionTargetWriter writer(&target, out);
@@ -73,7 +73,6 @@
   EXPECT_EQ(expected, out.str());
 }
 
-
 // Tests an action with no sources and pool
 TEST(NinjaActionTargetWriter, ActionNoSourcesConsole) {
   Err err;
@@ -97,8 +96,8 @@
   target.SetToolchain(setup.toolchain());
   ASSERT_TRUE(target.OnResolved(&err));
 
-  setup.build_settings()->set_python_path(base::FilePath(FILE_PATH_LITERAL(
-      "/usr/bin/python")));
+  setup.build_settings()->set_python_path(
+      base::FilePath(FILE_PATH_LITERAL("/usr/bin/python")));
 
   std::ostringstream out;
   NinjaActionTargetWriter writer(&target, out);
@@ -140,8 +139,8 @@
   target.SetToolchain(setup.toolchain());
   ASSERT_TRUE(target.OnResolved(&err));
 
-  setup.build_settings()->set_python_path(base::FilePath(FILE_PATH_LITERAL(
-      "/usr/bin/python")));
+  setup.build_settings()->set_python_path(
+      base::FilePath(FILE_PATH_LITERAL("/usr/bin/python")));
 
   std::ostringstream out;
   NinjaActionTargetWriter writer(&target, out);
@@ -191,19 +190,17 @@
   target.action_values().set_script(SourceFile("//foo/script.py"));
 
   target.action_values().args() = SubstitutionList::MakeForTest(
-      "-i",
-      "{{source}}",
-      "--out=foo bar{{source_name_part}}.o");
-  target.action_values().outputs() = SubstitutionList::MakeForTest(
-      "//out/Debug/{{source_name_part}}.out");
+      "-i", "{{source}}", "--out=foo bar{{source_name_part}}.o");
+  target.action_values().outputs() =
+      SubstitutionList::MakeForTest("//out/Debug/{{source_name_part}}.out");
 
   target.config_values().inputs().push_back(SourceFile("//foo/included.txt"));
 
   target.SetToolchain(setup.toolchain());
   ASSERT_TRUE(target.OnResolved(&err));
 
-  setup.build_settings()->set_python_path(base::FilePath(FILE_PATH_LITERAL(
-      "/usr/bin/python")));
+  setup.build_settings()->set_python_path(
+      base::FilePath(FILE_PATH_LITERAL("/usr/bin/python")));
 
   std::ostringstream out;
   NinjaActionTargetWriter writer(&target, out);
@@ -212,26 +209,26 @@
   const char expected_linux[] =
       "rule __foo_bar___rule\n"
       "  command = /usr/bin/python ../../foo/script.py -i ${in} "
-          // Escaping is different between Windows and Posix.
+// Escaping is different between Windows and Posix.
 #if defined(OS_WIN)
-          "\"--out=foo$ bar${source_name_part}.o\"\n"
+      "\"--out=foo$ bar${source_name_part}.o\"\n"
 #else
-          "--out=foo\\$ bar${source_name_part}.o\n"
+      "--out=foo\\$ bar${source_name_part}.o\n"
 #endif
       "  description = ACTION //foo:bar()\n"
       "  restat = 1\n"
       "build obj/foo/bar.inputdeps.stamp: stamp ../../foo/script.py "
-          "../../foo/included.txt obj/foo/dep.stamp\n"
+      "../../foo/included.txt obj/foo/dep.stamp\n"
       "\n"
       "build input1.out: __foo_bar___rule ../../foo/input1.txt | "
-          "obj/foo/bar.inputdeps.stamp\n"
+      "obj/foo/bar.inputdeps.stamp\n"
       "  source_name_part = input1\n"
       "build input2.out: __foo_bar___rule ../../foo/input2.txt | "
-          "obj/foo/bar.inputdeps.stamp\n"
+      "obj/foo/bar.inputdeps.stamp\n"
       "  source_name_part = input2\n"
       "\n"
       "build obj/foo/bar.stamp: "
-          "stamp input1.out input2.out || obj/foo/datadep.stamp\n";
+      "stamp input1.out input2.out || obj/foo/datadep.stamp\n";
 
   std::string out_str = out.str();
 #if defined(OS_WIN)
@@ -261,16 +258,14 @@
   target.action_values().set_depfile(depfile);
 
   target.action_values().args() = SubstitutionList::MakeForTest(
-      "-i",
-      "{{source}}",
-      "--out=foo bar{{source_name_part}}.o");
-  target.action_values().outputs() = SubstitutionList::MakeForTest(
-      "//out/Debug/{{source_name_part}}.out");
+      "-i", "{{source}}", "--out=foo bar{{source_name_part}}.o");
+  target.action_values().outputs() =
+      SubstitutionList::MakeForTest("//out/Debug/{{source_name_part}}.out");
 
   target.config_values().inputs().push_back(SourceFile("//foo/included.txt"));
 
-  setup.build_settings()->set_python_path(base::FilePath(FILE_PATH_LITERAL(
-      "/usr/bin/python")));
+  setup.build_settings()->set_python_path(
+      base::FilePath(FILE_PATH_LITERAL("/usr/bin/python")));
 
   std::ostringstream out;
   NinjaActionTargetWriter writer(&target, out);
@@ -280,21 +275,21 @@
       "rule __foo_bar___rule\n"
       "  command = /usr/bin/python ../../foo/script.py -i ${in} "
 #if defined(OS_WIN)
-          "\"--out=foo$ bar${source_name_part}.o\"\n"
+      "\"--out=foo$ bar${source_name_part}.o\"\n"
 #else
-          "--out=foo\\$ bar${source_name_part}.o\n"
+      "--out=foo\\$ bar${source_name_part}.o\n"
 #endif
       "  description = ACTION //foo:bar()\n"
       "  restat = 1\n"
       "build obj/foo/bar.inputdeps.stamp: stamp ../../foo/script.py "
-          "../../foo/included.txt\n"
+      "../../foo/included.txt\n"
       "\n"
       "build input1.out: __foo_bar___rule ../../foo/input1.txt"
-          " | obj/foo/bar.inputdeps.stamp\n"
+      " | obj/foo/bar.inputdeps.stamp\n"
       "  source_name_part = input1\n"
       "  depfile = gen/input1.d\n"
       "build input2.out: __foo_bar___rule ../../foo/input2.txt"
-          " | obj/foo/bar.inputdeps.stamp\n"
+      " | obj/foo/bar.inputdeps.stamp\n"
       "  source_name_part = input2\n"
       "  depfile = gen/input2.d\n"
       "\n"
@@ -318,17 +313,14 @@
   // Make sure we get interesting substitutions for both the args and the
   // response file contents.
   target.action_values().args() = SubstitutionList::MakeForTest(
-      "{{source}}",
-      "{{source_file_part}}",
-      "{{response_file_name}}");
-  target.action_values().rsp_file_contents() = SubstitutionList::MakeForTest(
-      "-j",
-      "{{source_name_part}}");
-  target.action_values().outputs() = SubstitutionList::MakeForTest(
-      "//out/Debug/{{source_name_part}}.out");
+      "{{source}}", "{{source_file_part}}", "{{response_file_name}}");
+  target.action_values().rsp_file_contents() =
+      SubstitutionList::MakeForTest("-j", "{{source_name_part}}");
+  target.action_values().outputs() =
+      SubstitutionList::MakeForTest("//out/Debug/{{source_name_part}}.out");
 
-  setup.build_settings()->set_python_path(base::FilePath(FILE_PATH_LITERAL(
-      "/usr/bin/python")));
+  setup.build_settings()->set_python_path(
+      base::FilePath(FILE_PATH_LITERAL("/usr/bin/python")));
 
   std::ostringstream out;
   NinjaActionTargetWriter writer(&target, out);
@@ -342,12 +334,12 @@
       "  rspfile_content = -j ${source_name_part}\n"
       // These come from the args.
       "  command = /usr/bin/python ../../foo/script.py ${in} "
-          "${source_file_part} ${rspfile}\n"
+      "${source_file_part} ${rspfile}\n"
       "  description = ACTION //foo:bar()\n"
       "  restat = 1\n"
       "\n"
       "build input1.out: __foo_bar___rule ../../foo/input1.txt"
-          " | ../../foo/script.py\n"
+      " | ../../foo/script.py\n"
       // Necessary for the rspfile defined in the rule.
       "  unique_name = 0\n"
       // Substitution for the args.
diff --git a/tools/gn/ninja_binary_target_writer.cc b/tools/gn/ninja_binary_target_writer.cc
index 2e24135..48982d3 100644
--- a/tools/gn/ninja_binary_target_writer.cc
+++ b/tools/gn/ninja_binary_target_writer.cc
@@ -34,12 +34,8 @@
     memset(flags_, 0, sizeof(bool) * static_cast<int>(SOURCE_NUMTYPES));
   }
 
-  void Set(SourceFileType type) {
-    flags_[static_cast<int>(type)] = true;
-  }
-  bool Get(SourceFileType type) const {
-    return flags_[static_cast<int>(type)];
-  }
+  void Set(SourceFileType type) { flags_[static_cast<int>(type)] = true; }
+  bool Get(SourceFileType type) const { return flags_[static_cast<int>(type)]; }
 
  private:
   bool flags_[static_cast<int>(SOURCE_NUMTYPES)];
@@ -55,9 +51,7 @@
 }
 
 struct DefineWriter {
-  DefineWriter() {
-    options.mode = ESCAPE_NINJA_COMMAND;
-  }
+  DefineWriter() { options.mode = ESCAPE_NINJA_COMMAND; }
 
   void operator()(const std::string& s, std::ostream& out) const {
     out << " ";
@@ -68,8 +62,7 @@
 };
 
 struct IncludeWriter {
-  explicit IncludeWriter(PathOutput& path_output) : path_output_(path_output) {
-  }
+  explicit IncludeWriter(PathOutput& path_output) : path_output_(path_output) {}
   ~IncludeWriter() = default;
 
   void operator()(const SourceDir& d, std::ostream& out) const {
@@ -161,8 +154,8 @@
   if (!tool)
     return;
   SubstitutionWriter::ApplyListToCompilerAsOutputFile(
-      target, target->config_values().precompiled_source(),
-      tool->outputs(), outputs);
+      target, target->config_values().precompiled_source(), tool->outputs(),
+      outputs);
 
   if (outputs->empty())
     return;
@@ -192,8 +185,7 @@
       NOTREACHED() << "No outputs for no PCH type.";
       break;
   }
-  output_value.replace(extension_offset - 1,
-                       std::string::npos,
+  output_value.replace(extension_offset - 1, std::string::npos,
                        output_extension);
 }
 
@@ -239,8 +231,8 @@
       }
     }
     if (used_types.Get(SOURCE_MM)) {
-      const Tool* tool = source_set->toolchain()->GetTool(
-          Toolchain::TYPE_OBJCXX);
+      const Tool* tool =
+          source_set->toolchain()->GetTool(Toolchain::TYPE_OBJCXX);
       if (tool && tool->precompiled_header_type() == Tool::PCH_MSVC) {
         GetPCHOutputFiles(source_set, Toolchain::TYPE_OBJCXX, &tool_outputs);
         obj_files->Append(tool_outputs.begin(), tool_outputs.end());
@@ -255,8 +247,7 @@
                                                  std::ostream& out)
     : NinjaTargetWriter(target, out),
       tool_(target->toolchain()->GetToolForTargetFinalOutput(target)),
-      rule_prefix_(GetNinjaRulePrefixForToolchain(settings_)) {
-}
+      rule_prefix_(GetNinjaRulePrefixForToolchain(settings_)) {}
 
 NinjaBinaryTargetWriter::~NinjaBinaryTargetWriter() = default;
 
@@ -311,8 +302,8 @@
   std::vector<OutputFile> pch_other_files;
   WritePCHCommands(used_types, input_dep, order_only_deps, &pch_obj_files,
                    &pch_other_files);
-  std::vector<OutputFile>* pch_files = !pch_obj_files.empty() ?
-      &pch_obj_files : &pch_other_files;
+  std::vector<OutputFile>* pch_files =
+      !pch_obj_files.empty() ? &pch_obj_files : &pch_other_files;
 
   // Treat all pch output files as explicit dependencies of all
   // compiles that support them. Some notes:
@@ -359,8 +350,8 @@
   // Defines.
   if (subst.used[SUBSTITUTION_DEFINES]) {
     out_ << kSubstitutionNinjaNames[SUBSTITUTION_DEFINES] << " =";
-    RecursiveTargetConfigToStream<std::string>(
-        target_, &ConfigValues::defines, DefineWriter(), out_);
+    RecursiveTargetConfigToStream<std::string>(target_, &ConfigValues::defines,
+                                               DefineWriter(), out_);
     out_ << std::endl;
   }
 
@@ -369,8 +360,7 @@
     out_ << kSubstitutionNinjaNames[SUBSTITUTION_INCLUDE_DIRS] << " =";
     PathOutput include_path_output(
         path_output_.current_dir(),
-        settings_->build_settings()->root_path_utf8(),
-        ESCAPE_NINJA_COMMAND);
+        settings_->build_settings()->root_path_utf8(), ESCAPE_NINJA_COMMAND);
     RecursiveTargetConfigToStream<SourceDir>(
         target_, &ConfigValues::include_dirs,
         IncludeWriter(include_path_output), out_);
@@ -411,9 +401,8 @@
 }
 
 OutputFile NinjaBinaryTargetWriter::WriteInputsStampAndGetDep() const {
-  CHECK(target_->toolchain())
-      << "Toolchain not set on target "
-      << target_->label().GetUserVisibleName(true);
+  CHECK(target_->toolchain()) << "Toolchain not set on target "
+                              << target_->label().GetUserVisibleName(true);
 
   std::vector<const SourceFile*> inputs;
   for (ConfigValuesIterator iter(target_); !iter.done(); iter.Next()) {
@@ -438,8 +427,7 @@
 
   out_ << "build ";
   path_output_.WriteFile(out_, input_stamp_file);
-  out_ << ": "
-       << GetNinjaRulePrefixForToolchain(settings_)
+  out_ << ": " << GetNinjaRulePrefixForToolchain(settings_)
        << Toolchain::ToolTypeToName(Toolchain::TYPE_STAMP);
 
   // File inputs.
@@ -456,7 +444,7 @@
     SubstitutionType subst_enum,
     bool has_precompiled_headers,
     Toolchain::ToolType tool_type,
-    const std::vector<std::string>& (ConfigValues::* getter)() const,
+    const std::vector<std::string>& (ConfigValues::*getter)() const,
     EscapeOptions flag_escape_options) {
   if (!target_->toolchain()->substitution_bits().used[subst_enum])
     return;
@@ -473,15 +461,15 @@
       // Enables precompiled headers and names the .h file. It's a string
       // rather than a file name (so no need to rebase or use path_output_).
       out_ << " /Yu" << target_->config_values().precompiled_header();
-      RecursiveTargetConfigStringsToStream(target_, getter,
-                                           flag_escape_options, out_);
+      RecursiveTargetConfigStringsToStream(target_, getter, flag_escape_options,
+                                           out_);
     } else if (tool && tool->precompiled_header_type() == Tool::PCH_GCC) {
       // The targets to build the .gch files should omit the -include flag
       // below. To accomplish this, each substitution flag is overwritten in the
       // target rule and these values are repeated. The -include flag is omitted
       // in place of the required -x <header lang> flag for .gch targets.
-      RecursiveTargetConfigStringsToStream(target_, getter,
-                                           flag_escape_options, out_);
+      RecursiveTargetConfigStringsToStream(target_, getter, flag_escape_options,
+                                           out_);
 
       // Compute the gch file (it will be language-specific).
       std::vector<OutputFile> outputs;
@@ -495,12 +483,12 @@
         out_ << " -include " << pch_file;
       }
     } else {
-      RecursiveTargetConfigStringsToStream(target_, getter,
-                                           flag_escape_options, out_);
+      RecursiveTargetConfigStringsToStream(target_, getter, flag_escape_options,
+                                           out_);
     }
   } else {
-    RecursiveTargetConfigStringsToStream(target_, getter,
-                                         flag_escape_options, out_);
+    RecursiveTargetConfigStringsToStream(target_, getter, flag_escape_options,
+                                         out_);
   }
   out_ << std::endl;
 }
@@ -515,16 +503,14 @@
     return;
 
   const Tool* tool_c = target_->toolchain()->GetTool(Toolchain::TYPE_CC);
-  if (tool_c &&
-      tool_c->precompiled_header_type() != Tool::PCH_NONE &&
+  if (tool_c && tool_c->precompiled_header_type() != Tool::PCH_NONE &&
       used_types.Get(SOURCE_C)) {
     WritePCHCommand(SUBSTITUTION_CFLAGS_C, Toolchain::TYPE_CC,
                     tool_c->precompiled_header_type(), input_dep,
                     order_only_deps, object_files, other_files);
   }
   const Tool* tool_cxx = target_->toolchain()->GetTool(Toolchain::TYPE_CXX);
-  if (tool_cxx &&
-      tool_cxx->precompiled_header_type() != Tool::PCH_NONE &&
+  if (tool_cxx && tool_cxx->precompiled_header_type() != Tool::PCH_NONE &&
       used_types.Get(SOURCE_CPP)) {
     WritePCHCommand(SUBSTITUTION_CFLAGS_CC, Toolchain::TYPE_CXX,
                     tool_cxx->precompiled_header_type(), input_dep,
@@ -532,8 +518,7 @@
   }
 
   const Tool* tool_objc = target_->toolchain()->GetTool(Toolchain::TYPE_OBJC);
-  if (tool_objc &&
-      tool_objc->precompiled_header_type() == Tool::PCH_GCC &&
+  if (tool_objc && tool_objc->precompiled_header_type() == Tool::PCH_GCC &&
       used_types.Get(SOURCE_M)) {
     WritePCHCommand(SUBSTITUTION_CFLAGS_OBJC, Toolchain::TYPE_OBJC,
                     tool_objc->precompiled_header_type(), input_dep,
@@ -542,8 +527,7 @@
 
   const Tool* tool_objcxx =
       target_->toolchain()->GetTool(Toolchain::TYPE_OBJCXX);
-  if (tool_objcxx &&
-      tool_objcxx->precompiled_header_type() == Tool::PCH_GCC &&
+  if (tool_objcxx && tool_objcxx->precompiled_header_type() == Tool::PCH_GCC &&
       used_types.Get(SOURCE_MM)) {
     WritePCHCommand(SUBSTITUTION_CFLAGS_OBJCC, Toolchain::TYPE_OBJCXX,
                     tool_objcxx->precompiled_header_type(), input_dep,
@@ -605,17 +589,17 @@
   // for .gch targets.
   EscapeOptions opts = GetFlagOptions();
   if (tool_type == Toolchain::TYPE_CC) {
-    RecursiveTargetConfigStringsToStream(target_,
-        &ConfigValues::cflags_c, opts, out_);
+    RecursiveTargetConfigStringsToStream(target_, &ConfigValues::cflags_c, opts,
+                                         out_);
   } else if (tool_type == Toolchain::TYPE_CXX) {
-    RecursiveTargetConfigStringsToStream(target_,
-        &ConfigValues::cflags_cc, opts, out_);
+    RecursiveTargetConfigStringsToStream(target_, &ConfigValues::cflags_cc,
+                                         opts, out_);
   } else if (tool_type == Toolchain::TYPE_OBJC) {
-    RecursiveTargetConfigStringsToStream(target_,
-        &ConfigValues::cflags_objc, opts, out_);
+    RecursiveTargetConfigStringsToStream(target_, &ConfigValues::cflags_objc,
+                                         opts, out_);
   } else if (tool_type == Toolchain::TYPE_OBJCXX) {
-    RecursiveTargetConfigStringsToStream(target_,
-        &ConfigValues::cflags_objcc, opts, out_);
+    RecursiveTargetConfigStringsToStream(target_, &ConfigValues::cflags_objcc,
+                                         opts, out_);
   }
 
   // Append the command to specify the language of the .gch file.
@@ -707,9 +691,9 @@
           } else if (tool->precompiled_header_type() == Tool::PCH_GCC) {
             output_extension = GetGCCPCHOutputExtension(tool_type);
           }
-          if (output_value.compare(output_value.size() -
-              output_extension.size(), output_extension.size(),
-              output_extension) == 0) {
+          if (output_value.compare(
+                  output_value.size() - output_extension.size(),
+                  output_extension.size(), output_extension) == 0) {
             deps.push_back(dep);
           }
         }
@@ -930,8 +914,8 @@
               target_, tool_, SUBSTITUTION_OUTPUT_EXTENSION);
   out_ << std::endl;
   out_ << "  output_dir = "
-       << SubstitutionWriter::GetLinkerSubstitution(
-              target_, tool_, SUBSTITUTION_OUTPUT_DIR);
+       << SubstitutionWriter::GetLinkerSubstitution(target_, tool_,
+                                                    SUBSTITUTION_OUTPUT_DIR);
   out_ << std::endl;
 }
 
@@ -974,14 +958,14 @@
     UniqueVector<const Target*>* non_linkable_deps) const {
   // Normal public/private deps.
   for (const auto& pair : target_->GetDeps(Target::DEPS_LINKED)) {
-    ClassifyDependency(pair.ptr, extra_object_files,
-                       linkable_deps, non_linkable_deps);
+    ClassifyDependency(pair.ptr, extra_object_files, linkable_deps,
+                       non_linkable_deps);
   }
 
   // Inherited libraries.
   for (auto* inherited_target : target_->inherited_libraries().GetOrdered()) {
-    ClassifyDependency(inherited_target, extra_object_files,
-                       linkable_deps, non_linkable_deps);
+    ClassifyDependency(inherited_target, extra_object_files, linkable_deps,
+                       non_linkable_deps);
   }
 
   // Data deps.
@@ -1068,20 +1052,22 @@
   for (const auto& file : files) {
     if (!set.insert(file.value()).second) {
       Err err(
-          target_->defined_from(),
-          "Duplicate object file",
+          target_->defined_from(), "Duplicate object file",
           "The target " + target_->label().GetUserVisibleName(false) +
-          "\ngenerates two object files with the same name:\n  " +
-          file.value() + "\n"
-          "\n"
-          "It could be you accidentally have a file listed twice in the\n"
-          "sources. Or, depending on how your toolchain maps sources to\n"
-          "object files, two source files with the same name in different\n"
-          "directories could map to the same object file.\n"
-          "\n"
-          "In the latter case, either rename one of the files or move one of\n"
-          "the sources to a separate source_set to avoid them both being in\n"
-          "the same target.");
+              "\ngenerates two object files with the same name:\n  " +
+              file.value() +
+              "\n"
+              "\n"
+              "It could be you accidentally have a file listed twice in the\n"
+              "sources. Or, depending on how your toolchain maps sources to\n"
+              "object files, two source files with the same name in different\n"
+              "directories could map to the same object file.\n"
+              "\n"
+              "In the latter case, either rename one of the files or move one "
+              "of\n"
+              "the sources to a separate source_set to avoid them both being "
+              "in\n"
+              "the same target.");
       g_scheduler->FailWithError(err);
       return false;
     }
diff --git a/tools/gn/ninja_binary_target_writer.h b/tools/gn/ninja_binary_target_writer.h
index 91a7a27..4bc5b44 100644
--- a/tools/gn/ninja_binary_target_writer.h
+++ b/tools/gn/ninja_binary_target_writer.h
@@ -45,12 +45,12 @@
   // The tool_type indicates the corresponding tool for flags that are
   // tool-specific (e.g. "cflags_c"). For non-tool-specific flags (e.g.
   // "defines") tool_type should be TYPE_NONE.
-  void WriteOneFlag(
-      SubstitutionType subst_enum,
-      bool has_precompiled_headers,
-      Toolchain::ToolType tool_type,
-      const std::vector<std::string>& (ConfigValues::* getter)() const,
-      EscapeOptions flag_escape_options);
+  void WriteOneFlag(SubstitutionType subst_enum,
+                    bool has_precompiled_headers,
+                    Toolchain::ToolType tool_type,
+                    const std::vector<std::string>& (ConfigValues::*getter)()
+                        const,
+                    EscapeOptions flag_escape_options);
 
   // Writes build lines required for precompiled headers. Any generated
   // object files will be appended to the |object_files|. Any generated
@@ -157,4 +157,3 @@
 };
 
 #endif  // TOOLS_GN_NINJA_BINARY_TARGET_WRITER_H_
-
diff --git a/tools/gn/ninja_binary_target_writer_unittest.cc b/tools/gn/ninja_binary_target_writer_unittest.cc
index 388c96f..456fac2 100644
--- a/tools/gn/ninja_binary_target_writer_unittest.cc
+++ b/tools/gn/ninja_binary_target_writer_unittest.cc
@@ -53,7 +53,7 @@
         "build obj/foo/bar.input2.o: cxx ../../foo/input2.cc\n"
         "\n"
         "build obj/foo/bar.stamp: stamp obj/foo/bar.input1.o "
-            "obj/foo/bar.input2.o ../../foo/input3.o ../../foo/input4.obj\n";
+        "obj/foo/bar.input2.o ../../foo/input3.o ../../foo/input4.obj\n";
     std::string out_str = out.str();
     EXPECT_EQ(expected, out_str);
   }
@@ -82,8 +82,8 @@
         // specified, with the target's first, followed by the source set's, in
         // order.
         "build ./libshlib.so: solink obj/foo/bar.input1.o "
-            "obj/foo/bar.input2.o ../../foo/input3.o ../../foo/input4.obj "
-            "|| obj/foo/bar.stamp\n"
+        "obj/foo/bar.input2.o ../../foo/input3.o ../../foo/input4.obj "
+        "|| obj/foo/bar.stamp\n"
         "  ldflags =\n"
         "  libs =\n"
         "  output_extension = .so\n"
@@ -141,8 +141,8 @@
         // specified, with the target's first, followed by the source set's, in
         // order.
         "build obj/foo/libstlib.a: alink obj/foo/bar.input1.o "
-            "obj/foo/bar.input2.o ../../foo/input3.o ../../foo/input4.obj "
-            "|| obj/foo/bar.stamp\n"
+        "obj/foo/bar.input2.o ../../foo/input3.o ../../foo/input4.obj "
+        "|| obj/foo/bar.stamp\n"
         "  arflags =\n"
         "  output_extension = \n"
         "  output_dir = \n";
@@ -244,7 +244,7 @@
         "build obj/foo/libbar.input1.o: cxx ../../foo/input1.cc\n"
         "\n"
         "build obj/foo/libbar.a: alink obj/foo/libbar.input1.o "
-            "obj/foo/libbaz.input2.o || obj/foo/libbaz.a\n"
+        "obj/foo/libbaz.input2.o || obj/foo/libbaz.a\n"
         "  arflags = --asdf\n"
         "  output_extension = \n"
         "  output_dir = \n";
@@ -273,7 +273,7 @@
         "build obj/foo/libbar.input1.o: cxx ../../foo/input1.cc\n"
         "\n"
         "build obj/foo/libbar.a: alink obj/foo/libbar.input1.o "
-            "|| obj/foo/libbaz.a\n"
+        "|| obj/foo/libbaz.a\n"
         "  arflags = --asdf\n"
         "  output_extension = \n"
         "  output_dir = \n";
@@ -320,15 +320,15 @@
       "target_output_name = libshlib\n"
       "\n"
       "build obj/foo/libshlib.input1.o: cxx ../../foo/input1.cc"
-        " || obj/foo/action.stamp\n"
+      " || obj/foo/action.stamp\n"
       "build obj/foo/libshlib.input2.o: cxx ../../foo/input2.cc"
-        " || obj/foo/action.stamp\n"
+      " || obj/foo/action.stamp\n"
       "\n"
       "build ./libshlib.so.6: solink obj/foo/libshlib.input1.o "
       // The order-only dependency here is stricly unnecessary since the
       // sources list this as an order-only dep. See discussion in the code
       // that writes this.
-          "obj/foo/libshlib.input2.o || obj/foo/action.stamp\n"
+      "obj/foo/libshlib.input2.o || obj/foo/action.stamp\n"
       "  ldflags =\n"
       "  libs =\n"
       "  output_extension = .so.6\n"
@@ -533,7 +533,7 @@
       "build obj/foo/shlib.input2.o: cxx ../../foo/input2.cc\n"
       "\n"
       "build ./shlib: solink obj/foo/shlib.input1.o "
-          "obj/foo/shlib.input2.o\n"
+      "obj/foo/shlib.input2.o\n"
       "  ldflags =\n"
       "  libs =\n"
       "  output_extension = \n"
@@ -583,7 +583,7 @@
       "build obj/foo/inter.inter.o: cxx ../../foo/inter.cc\n"
       "\n"
       "build obj/foo/inter.stamp: stamp obj/foo/inter.inter.o || "
-          "./data_target\n";
+      "./data_target\n";
   EXPECT_EQ(inter_expected, inter_out.str());
 
   // Final target.
@@ -615,7 +615,7 @@
       "build obj/foo/exe.final.o: cxx ../../foo/final.cc\n"
       "\n"
       "build ./exe: link obj/foo/exe.final.o obj/foo/inter.inter.o || "
-          "obj/foo/inter.stamp\n"
+      "obj/foo/inter.stamp\n"
       "  ldflags =\n"
       "  libs =\n"
       "  output_extension = \n"
@@ -784,13 +784,13 @@
         "target_output_name = no_pch_target\n"
         "\n"
         "build withpch/obj/foo/no_pch_target.input1.o: "
-               "withpch_cxx ../../foo/input1.cc\n"
+        "withpch_cxx ../../foo/input1.cc\n"
         "build withpch/obj/foo/no_pch_target.input2.o: "
-               "withpch_cc ../../foo/input2.c\n"
+        "withpch_cc ../../foo/input2.c\n"
         "\n"
         "build withpch/obj/foo/no_pch_target.stamp: "
-               "withpch_stamp withpch/obj/foo/no_pch_target.input1.o "
-               "withpch/obj/foo/no_pch_target.input2.o\n";
+        "withpch_stamp withpch/obj/foo/no_pch_target.input1.o "
+        "withpch/obj/foo/no_pch_target.input2.o\n";
     EXPECT_EQ(no_pch_expected, out.str());
   }
 
@@ -817,35 +817,35 @@
         "cflags =\n"
         // It should output language-specific pch files.
         "cflags_c = /Fpwithpch/obj/foo/pch_target_c.pch "
-                    "/Yubuild/precompile.h\n"
+        "/Yubuild/precompile.h\n"
         "cflags_cc = /Fpwithpch/obj/foo/pch_target_cc.pch "
-                     "/Yubuild/precompile.h\n"
+        "/Yubuild/precompile.h\n"
         "target_output_name = pch_target\n"
         "\n"
         // Compile the precompiled source files with /Yc.
         "build withpch/obj/build/pch_target.precompile.c.o: "
-               "withpch_cc ../../build/precompile.cc\n"
+        "withpch_cc ../../build/precompile.cc\n"
         "  cflags_c = ${cflags_c} /Ycbuild/precompile.h\n"
         "\n"
         "build withpch/obj/build/pch_target.precompile.cc.o: "
-               "withpch_cxx ../../build/precompile.cc\n"
+        "withpch_cxx ../../build/precompile.cc\n"
         "  cflags_cc = ${cflags_cc} /Ycbuild/precompile.h\n"
         "\n"
         "build withpch/obj/foo/pch_target.input1.o: "
-               "withpch_cxx ../../foo/input1.cc | "
-               // Explicit dependency on the PCH build step.
-               "withpch/obj/build/pch_target.precompile.cc.o\n"
+        "withpch_cxx ../../foo/input1.cc | "
+        // Explicit dependency on the PCH build step.
+        "withpch/obj/build/pch_target.precompile.cc.o\n"
         "build withpch/obj/foo/pch_target.input2.o: "
-               "withpch_cc ../../foo/input2.c | "
-               // Explicit dependency on the PCH build step.
-               "withpch/obj/build/pch_target.precompile.c.o\n"
+        "withpch_cc ../../foo/input2.c | "
+        // Explicit dependency on the PCH build step.
+        "withpch/obj/build/pch_target.precompile.c.o\n"
         "\n"
         "build withpch/obj/foo/pch_target.stamp: withpch_stamp "
-               "withpch/obj/foo/pch_target.input1.o "
-               "withpch/obj/foo/pch_target.input2.o "
-               // The precompiled object files were added to the outputs.
-               "withpch/obj/build/pch_target.precompile.c.o "
-               "withpch/obj/build/pch_target.precompile.cc.o\n";
+        "withpch/obj/foo/pch_target.input1.o "
+        "withpch/obj/foo/pch_target.input2.o "
+        // The precompiled object files were added to the outputs.
+        "withpch/obj/build/pch_target.precompile.c.o "
+        "withpch/obj/build/pch_target.precompile.cc.o\n";
     EXPECT_EQ(pch_win_expected, out.str());
   }
 }
@@ -912,13 +912,13 @@
         "target_output_name = no_pch_target\n"
         "\n"
         "build withpch/obj/foo/no_pch_target.input1.o: "
-               "withpch_cxx ../../foo/input1.cc\n"
+        "withpch_cxx ../../foo/input1.cc\n"
         "build withpch/obj/foo/no_pch_target.input2.o: "
-               "withpch_cc ../../foo/input2.c\n"
+        "withpch_cc ../../foo/input2.c\n"
         "\n"
         "build withpch/obj/foo/no_pch_target.stamp: "
-               "withpch_stamp withpch/obj/foo/no_pch_target.input1.o "
-               "withpch/obj/foo/no_pch_target.input2.o\n";
+        "withpch_stamp withpch/obj/foo/no_pch_target.input1.o "
+        "withpch/obj/foo/no_pch_target.input2.o\n";
     EXPECT_EQ(no_pch_expected, out.str());
   }
 
@@ -944,31 +944,31 @@
         "include_dirs =\n"
         "cflags =\n"
         "cflags_c = -std=c99 "
-                    "-include withpch/obj/build/pch_target.precompile.h-c\n"
+        "-include withpch/obj/build/pch_target.precompile.h-c\n"
         "cflags_cc = -include withpch/obj/build/pch_target.precompile.h-cc\n"
         "target_output_name = pch_target\n"
         "\n"
         // Compile the precompiled sources with -x <lang>.
         "build withpch/obj/build/pch_target.precompile.h-c.gch: "
-               "withpch_cc ../../build/precompile.h\n"
+        "withpch_cc ../../build/precompile.h\n"
         "  cflags_c = -std=c99 -x c-header\n"
         "\n"
         "build withpch/obj/build/pch_target.precompile.h-cc.gch: "
-               "withpch_cxx ../../build/precompile.h\n"
+        "withpch_cxx ../../build/precompile.h\n"
         "  cflags_cc = -x c++-header\n"
         "\n"
         "build withpch/obj/foo/pch_target.input1.o: "
-               "withpch_cxx ../../foo/input1.cc | "
-               // Explicit dependency on the PCH build step.
-               "withpch/obj/build/pch_target.precompile.h-cc.gch\n"
+        "withpch_cxx ../../foo/input1.cc | "
+        // Explicit dependency on the PCH build step.
+        "withpch/obj/build/pch_target.precompile.h-cc.gch\n"
         "build withpch/obj/foo/pch_target.input2.o: "
-               "withpch_cc ../../foo/input2.c | "
-               // Explicit dependency on the PCH build step.
-               "withpch/obj/build/pch_target.precompile.h-c.gch\n"
+        "withpch_cc ../../foo/input2.c | "
+        // Explicit dependency on the PCH build step.
+        "withpch/obj/build/pch_target.precompile.h-c.gch\n"
         "\n"
         "build withpch/obj/foo/pch_target.stamp: "
-               "withpch_stamp withpch/obj/foo/pch_target.input1.o "
-               "withpch/obj/foo/pch_target.input2.o\n";
+        "withpch_stamp withpch/obj/foo/pch_target.input1.o "
+        "withpch/obj/foo/pch_target.input2.o\n";
     EXPECT_EQ(pch_gcc_expected, out.str());
   }
 }
@@ -1026,12 +1026,12 @@
         "target_output_name = bar\n"
         "\n"
         "build obj/foo/bar.input1.o: cxx ../../foo/input1.cc"
-          " | ../../foo/input.data\n"
+        " | ../../foo/input.data\n"
         "build obj/foo/bar.input2.o: cxx ../../foo/input2.cc"
-          " | ../../foo/input.data\n"
+        " | ../../foo/input.data\n"
         "\n"
         "build obj/foo/bar.stamp: stamp obj/foo/bar.input1.o "
-            "obj/foo/bar.input2.o\n";
+        "obj/foo/bar.input2.o\n";
 
     EXPECT_EQ(expected, out.str());
   }
@@ -1092,14 +1092,14 @@
         "target_output_name = bar\n"
         "\n"
         "build obj/foo/bar.inputs.stamp: stamp"
-          " ../../foo/input1.data ../../foo/input2.data\n"
+        " ../../foo/input1.data ../../foo/input2.data\n"
         "build obj/foo/bar.input1.o: cxx ../../foo/input1.cc"
-          " | obj/foo/bar.inputs.stamp\n"
+        " | obj/foo/bar.inputs.stamp\n"
         "build obj/foo/bar.input2.o: cxx ../../foo/input2.cc"
-          " | obj/foo/bar.inputs.stamp\n"
+        " | obj/foo/bar.inputs.stamp\n"
         "\n"
         "build obj/foo/bar.stamp: stamp obj/foo/bar.input1.o "
-            "obj/foo/bar.input2.o\n";
+        "obj/foo/bar.input2.o\n";
 
     EXPECT_EQ(expected, out.str());
   }
@@ -1140,14 +1140,14 @@
         "target_output_name = bar\n"
         "\n"
         "build obj/foo/bar.inputs.stamp: stamp"
-          " ../../foo/input1.data ../../foo/input2.data ../../foo/input3.data\n"
+        " ../../foo/input1.data ../../foo/input2.data ../../foo/input3.data\n"
         "build obj/foo/bar.input1.o: cxx ../../foo/input1.cc"
-          " | obj/foo/bar.inputs.stamp\n"
+        " | obj/foo/bar.inputs.stamp\n"
         "build obj/foo/bar.input2.o: cxx ../../foo/input2.cc"
-          " | obj/foo/bar.inputs.stamp\n"
+        " | obj/foo/bar.inputs.stamp\n"
         "\n"
         "build obj/foo/bar.stamp: stamp obj/foo/bar.input1.o "
-            "obj/foo/bar.input2.o\n";
+        "obj/foo/bar.input2.o\n";
 
     EXPECT_EQ(expected, out.str());
   }
diff --git a/tools/gn/ninja_build_writer.cc b/tools/gn/ninja_build_writer.cc
index 1ce08e9..7953939 100644
--- a/tools/gn/ninja_build_writer.cc
+++ b/tools/gn/ninja_build_writer.cc
@@ -91,8 +91,7 @@
     // since those will have been written to the file and will be used
     // implicitly in the future. Keeping --args would mean changes to the file
     // would be ignored.
-    if (i->first != switches::kQuiet &&
-        i->first != switches::kRoot &&
+    if (i->first != switches::kQuiet && i->first != switches::kRoot &&
         i->first != switches::kArgs) {
       std::string escaped_value =
           EscapeString(FilePathToUTF8(i->second), escape_shell, nullptr);
@@ -129,11 +128,14 @@
     matches_string += "  " + target->label().GetUserVisibleName(false) + "\n";
 
   Err result(matches[0]->defined_from(), "Duplicate output file.",
-      "Two or more targets generate the same output:\n  " +
-      bad_output.value() + "\n\n"
-      "This is can often be fixed by changing one of the target names, or by \n"
-      "setting an output_name on one of them.\n"
-      "\nCollisions:\n" + matches_string);
+             "Two or more targets generate the same output:\n  " +
+                 bad_output.value() +
+                 "\n\n"
+                 "This is can often be fixed by changing one of the target "
+                 "names, or by \n"
+                 "setting an output_name on one of them.\n"
+                 "\nCollisions:\n" +
+                 matches_string);
   for (size_t i = 1; i < matches.size(); i++)
     result.AppendSubErr(Err(matches[i]->defined_from(), "Collision."));
   return result;
@@ -144,11 +146,13 @@
 Err GetDuplicateToolchainError(const SourceFile& source_file,
                                const Toolchain* previous_toolchain,
                                const Toolchain* toolchain) {
-  Err result(toolchain->defined_from(), "Duplicate toolchain.",
+  Err result(
+      toolchain->defined_from(), "Duplicate toolchain.",
       "Two or more toolchains write to the same directory:\n  " +
-      source_file.GetDir().value() + "\n\n"
-      "This can be fixed by making sure that distinct toolchains have\n"
-      "distinct names.\n");
+          source_file.GetDir().value() +
+          "\n\n"
+          "This can be fixed by making sure that distinct toolchains have\n"
+          "distinct names.\n");
   result.AppendSubErr(
       Err(previous_toolchain->defined_from(), "Previous toolchain."));
   return result;
@@ -183,10 +187,9 @@
 }
 
 // static
-bool NinjaBuildWriter::RunAndWriteFile(
-    const BuildSettings* build_settings,
-    const Builder& builder,
-    Err* err) {
+bool NinjaBuildWriter::RunAndWriteFile(const BuildSettings* build_settings,
+                                       const Builder& builder,
+                                       Err* err) {
   ScopedTrace trace(TraceItem::TRACE_FILE_WRITE, "build.ninja");
 
   std::vector<const Target*> all_targets = builder.GetAllResolvedTargets();
@@ -462,14 +465,14 @@
 
     // Find targets in "important" directories.
     const std::string& dir_string = label.dir().value();
-    if (dir_string.size() == 2 &&
-        dir_string[0] == '/' && dir_string[1] == '/') {
+    if (dir_string.size() == 2 && dir_string[0] == '/' &&
+        dir_string[1] == '/') {
       toplevel_targets.push_back(target);
-    } else if (
-        dir_string.size() == label.name().size() + 3 &&  // Size matches.
-        dir_string[0] == '/' && dir_string[1] == '/' &&  // "//" at beginning.
-        dir_string[dir_string.size() - 1] == '/' &&  // "/" at end.
-        dir_string.compare(2, label.name().size(), label.name()) == 0) {
+    } else if (dir_string.size() == label.name().size() + 3 &&  // Size matches.
+               dir_string[0] == '/' &&
+               dir_string[1] == '/' &&  // "//" at beginning.
+               dir_string[dir_string.size() - 1] == '/' &&  // "/" at end.
+               dir_string.compare(2, label.name().size(), label.name()) == 0) {
       toplevel_dir_targets.push_back(target);
     }
 
diff --git a/tools/gn/ninja_build_writer.h b/tools/gn/ninja_build_writer.h
index bfc75e3..eee3a6e 100644
--- a/tools/gn/ninja_build_writer.h
+++ b/tools/gn/ninja_build_writer.h
@@ -7,8 +7,8 @@
 
 #include <iosfwd>
 #include <map>
-#include <vector>
 #include <unordered_map>
+#include <vector>
 
 #include "base/macros.h"
 #include "tools/gn/path_output.h"
@@ -39,10 +39,9 @@
   // constructor. The class itself doesn't depend on the Builder at all which
   // makes testing much easier (tests integrating various functions along with
   // the Builder get very complicated).
-  static bool RunAndWriteFile(
-      const BuildSettings* settings,
-      const Builder& builder,
-      Err* err);
+  static bool RunAndWriteFile(const BuildSettings* settings,
+                              const Builder& builder,
+                              Err* err);
 
   bool Run(Err* err);
 
@@ -70,4 +69,3 @@
 extern const char kNinjaRules_Help[];
 
 #endif  // TOOLS_GN_NINJA_BUILD_WRITER_H_
-
diff --git a/tools/gn/ninja_build_writer_unittest.cc b/tools/gn/ninja_build_writer_unittest.cc
index d14e88a..e647a28 100644
--- a/tools/gn/ninja_build_writer_unittest.cc
+++ b/tools/gn/ninja_build_writer_unittest.cc
@@ -63,7 +63,7 @@
   used_toolchains[setup.settings()] = setup.toolchain();
   used_toolchains[&other_settings] = &other_toolchain;
 
-  std::vector<const Target*> targets = { &target_foo, &target_bar };
+  std::vector<const Target*> targets = {&target_foo, &target_bar};
 
   std::ostringstream ninja_out;
   std::ostringstream depfile_out;
@@ -80,8 +80,7 @@
   const char expected_other_pool[] =
       "pool other_toolchain_other_depth_pool\n"
       "  depth = 42\n";
-  const char expected_toolchain[] =
-      "subninja toolchain.ninja\n";
+  const char expected_toolchain[] = "subninja toolchain.ninja\n";
   const char expected_targets[] =
       "build bar: phony obj/bar/bar.stamp\n"
       "build foo$:bar: phony obj/foo/bar.stamp\n"
@@ -90,8 +89,7 @@
       "build all: phony $\n"
       "    obj/foo/bar.stamp $\n"
       "    obj/bar/bar.stamp\n";
-  const char expected_default[] =
-      "default all\n";
+  const char expected_default[] = "default all\n";
   std::string out_str = ninja_out.str();
 #define EXPECT_SNIPPET(expected)                       \
   EXPECT_NE(std::string::npos, out_str.find(expected)) \
@@ -132,7 +130,7 @@
 
   std::unordered_map<const Settings*, const Toolchain*> used_toolchains;
   used_toolchains[setup.settings()] = setup.toolchain();
-  std::vector<const Target*> targets = { &target_foo, &target_bar };
+  std::vector<const Target*> targets = {&target_foo, &target_bar};
   std::ostringstream ninja_out;
   std::ostringstream depfile_out;
   NinjaBuildWriter writer(setup.build_settings(), used_toolchains,
diff --git a/tools/gn/ninja_bundle_data_target_writer_unittest.cc b/tools/gn/ninja_bundle_data_target_writer_unittest.cc
index e06f4d4..ba7e900 100644
--- a/tools/gn/ninja_bundle_data_target_writer_unittest.cc
+++ b/tools/gn/ninja_bundle_data_target_writer_unittest.cc
@@ -41,13 +41,13 @@
 
   const char expected[] =
       "build obj/foo/data.stamp: stamp "
-          "../../foo/input1.txt "
-          "../../foo/input2.txt "
-          "../../foo/Foo.xcassets/Contents.json "
-          "../../foo/Foo.xcassets/foo.imageset/Contents.json "
-          "../../foo/Foo.xcassets/foo.imageset/FooIcon-29.png "
-          "../../foo/Foo.xcassets/foo.imageset/FooIcon-29@2x.png "
-          "../../foo/Foo.xcassets/foo.imageset/FooIcon-29@3x.png\n";
+      "../../foo/input1.txt "
+      "../../foo/input2.txt "
+      "../../foo/Foo.xcassets/Contents.json "
+      "../../foo/Foo.xcassets/foo.imageset/Contents.json "
+      "../../foo/Foo.xcassets/foo.imageset/FooIcon-29.png "
+      "../../foo/Foo.xcassets/foo.imageset/FooIcon-29@2x.png "
+      "../../foo/Foo.xcassets/foo.imageset/FooIcon-29@3x.png\n";
   std::string out_str = out.str();
   EXPECT_EQ(expected, out_str);
 }
diff --git a/tools/gn/ninja_copy_target_writer.cc b/tools/gn/ninja_copy_target_writer.cc
index 194e2aa..2a6f001 100644
--- a/tools/gn/ninja_copy_target_writer.cc
+++ b/tools/gn/ninja_copy_target_writer.cc
@@ -16,8 +16,7 @@
 
 NinjaCopyTargetWriter::NinjaCopyTargetWriter(const Target* target,
                                              std::ostream& out)
-    : NinjaTargetWriter(target, out) {
-}
+    : NinjaTargetWriter(target, out) {}
 
 NinjaCopyTargetWriter::~NinjaCopyTargetWriter() = default;
 
@@ -66,9 +65,8 @@
       << "Should have one entry exactly.";
   const SubstitutionPattern& output_subst = output_subst_list.list()[0];
 
-  std::string tool_name =
-      GetNinjaRulePrefixForToolchain(settings_) +
-      Toolchain::ToolTypeToName(Toolchain::TYPE_COPY);
+  std::string tool_name = GetNinjaRulePrefixForToolchain(settings_) +
+                          Toolchain::ToolTypeToName(Toolchain::TYPE_COPY);
 
   size_t num_stamp_uses = target_->sources().size();
   std::vector<OutputFile> input_deps = WriteInputDepsStampAndGetDep(
diff --git a/tools/gn/ninja_create_bundle_target_writer.cc b/tools/gn/ninja_create_bundle_target_writer.cc
index 3602df4..f5d8f8e 100644
--- a/tools/gn/ninja_create_bundle_target_writer.cc
+++ b/tools/gn/ninja_create_bundle_target_writer.cc
@@ -18,12 +18,16 @@
 
 void FailWithMissingToolError(Toolchain::ToolType tool, const Target* target) {
   const std::string& tool_name = Toolchain::ToolTypeToName(tool);
-  g_scheduler->FailWithError(Err(
-      nullptr, tool_name + " tool not defined",
-      "The toolchain " +
-          target->toolchain()->label().GetUserVisibleName(false) + "\n"
-          "used by target " + target->label().GetUserVisibleName(false) + "\n"
-          "doesn't define a \"" + tool_name + "\" tool."));
+  g_scheduler->FailWithError(
+      Err(nullptr, tool_name + " tool not defined",
+          "The toolchain " +
+              target->toolchain()->label().GetUserVisibleName(false) +
+              "\n"
+              "used by target " +
+              target->label().GetUserVisibleName(false) +
+              "\n"
+              "doesn't define a \"" +
+              tool_name + "\" tool."));
 }
 
 bool EnsureAllToolsAvailable(const Target* target) {
diff --git a/tools/gn/ninja_create_bundle_target_writer_unittest.cc b/tools/gn/ninja_create_bundle_target_writer_unittest.cc
index 090ab15..12d6def 100644
--- a/tools/gn/ninja_create_bundle_target_writer_unittest.cc
+++ b/tools/gn/ninja_create_bundle_target_writer_unittest.cc
@@ -175,7 +175,6 @@
   EXPECT_EQ(expected, out_str);
 }
 
-
 // Tests multiple files from asset catalog.
 TEST(NinjaCreateBundleTargetWriter, AssetCatalog) {
   Err err;
diff --git a/tools/gn/ninja_group_target_writer.cc b/tools/gn/ninja_group_target_writer.cc
index baff95a..85906bb 100644
--- a/tools/gn/ninja_group_target_writer.cc
+++ b/tools/gn/ninja_group_target_writer.cc
@@ -12,8 +12,7 @@
 
 NinjaGroupTargetWriter::NinjaGroupTargetWriter(const Target* target,
                                                std::ostream& out)
-    : NinjaTargetWriter(target, out) {
-}
+    : NinjaTargetWriter(target, out) {}
 
 NinjaGroupTargetWriter::~NinjaGroupTargetWriter() = default;
 
diff --git a/tools/gn/ninja_group_target_writer_unittest.cc b/tools/gn/ninja_group_target_writer_unittest.cc
index 5e9b89a..9dc8dd9 100644
--- a/tools/gn/ninja_group_target_writer_unittest.cc
+++ b/tools/gn/ninja_group_target_writer_unittest.cc
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "test/test.h"
 #include "tools/gn/ninja_group_target_writer.h"
+#include "test/test.h"
 #include "tools/gn/target.h"
 #include "tools/gn/test_with_scope.h"
 
@@ -45,6 +45,7 @@
   writer.Run();
 
   const char expected[] =
-      "build obj/foo/bar.stamp: stamp obj/foo/dep.stamp obj/foo/dep2.stamp || obj/foo/datadep.stamp\n";
+      "build obj/foo/bar.stamp: stamp obj/foo/dep.stamp obj/foo/dep2.stamp || "
+      "obj/foo/datadep.stamp\n";
   EXPECT_EQ(expected, out.str());
 }
diff --git a/tools/gn/ninja_target_writer.cc b/tools/gn/ninja_target_writer.cc
index c8d1b84..de87e8f 100644
--- a/tools/gn/ninja_target_writer.cc
+++ b/tools/gn/ninja_target_writer.cc
@@ -26,15 +26,13 @@
 #include "tools/gn/target.h"
 #include "tools/gn/trace.h"
 
-NinjaTargetWriter::NinjaTargetWriter(const Target* target,
-                                     std::ostream& out)
+NinjaTargetWriter::NinjaTargetWriter(const Target* target, std::ostream& out)
     : settings_(target->settings()),
       target_(target),
       out_(out),
       path_output_(settings_->build_settings()->build_dir(),
                    settings_->build_settings()->root_path_utf8(),
-                   ESCAPE_NINJA) {
-}
+                   ESCAPE_NINJA) {}
 
 NinjaTargetWriter::~NinjaTargetWriter() = default;
 
@@ -108,7 +106,7 @@
     std::string result = "subninja ";
     result.append(EscapeString(
         OutputFile(target->settings()->build_settings(), ninja_file).value(),
-                   options, nullptr));
+        options, nullptr));
     result.push_back('\n');
     return result;
   }
@@ -122,9 +120,8 @@
   opts.mode = ESCAPE_NINJA;
 
   out_ << kSubstitutionNinjaNames[type] << " = ";
-  EscapeStringToStream(out_,
-      SubstitutionWriter::GetTargetSubstitution(target_, type),
-      opts);
+  EscapeStringToStream(
+      out_, SubstitutionWriter::GetTargetSubstitution(target_, type), opts);
   out_ << std::endl;
 }
 
@@ -182,9 +179,8 @@
 std::vector<OutputFile> NinjaTargetWriter::WriteInputDepsStampAndGetDep(
     const std::vector<const Target*>& extra_hard_deps,
     size_t num_stamp_uses) const {
-  CHECK(target_->toolchain())
-      << "Toolchain not set on target "
-      << target_->label().GetUserVisibleName(true);
+  CHECK(target_->toolchain()) << "Toolchain not set on target "
+                              << target_->label().GetUserVisibleName(true);
 
   // ----------
   // Collect all input files that are input deps of this target. Knowing the
@@ -293,8 +289,7 @@
 
   out_ << "build ";
   path_output_.WriteFile(out_, input_stamp_file);
-  out_ << ": "
-       << GetNinjaRulePrefixForToolchain(settings_)
+  out_ << ": " << GetNinjaRulePrefixForToolchain(settings_)
        << Toolchain::ToolTypeToName(Toolchain::TYPE_STAMP);
   path_output_.WriteFiles(out_, outs);
 
@@ -317,8 +312,7 @@
   out_ << "build ";
   path_output_.WriteFile(out_, stamp_file);
 
-  out_ << ": "
-       << GetNinjaRulePrefixForToolchain(settings_)
+  out_ << ": " << GetNinjaRulePrefixForToolchain(settings_)
        << Toolchain::ToolTypeToName(Toolchain::TYPE_STAMP);
   path_output_.WriteFiles(out_, files);
 
diff --git a/tools/gn/ninja_target_writer.h b/tools/gn/ninja_target_writer.h
index dc9a885..a6db060 100644
--- a/tools/gn/ninja_target_writer.h
+++ b/tools/gn/ninja_target_writer.h
@@ -58,7 +58,7 @@
                            const std::vector<OutputFile>& order_only_deps);
 
   const Settings* settings_;  // Non-owning.
-  const Target* target_;  // Non-owning.
+  const Target* target_;      // Non-owning.
   std::ostream& out_;
   PathOutput path_output_;
 
diff --git a/tools/gn/ninja_target_writer_unittest.cc b/tools/gn/ninja_target_writer_unittest.cc
index b997614..3cfa7a1 100644
--- a/tools/gn/ninja_target_writer_unittest.cc
+++ b/tools/gn/ninja_target_writer_unittest.cc
@@ -17,8 +17,7 @@
   TestingNinjaTargetWriter(const Target* target,
                            const Toolchain* toolchain,
                            std::ostream& out)
-      : NinjaTargetWriter(target, out) {
-  }
+      : NinjaTargetWriter(target, out) {}
 
   void Run() override {}
 
diff --git a/tools/gn/ninja_toolchain_writer.cc b/tools/gn/ninja_toolchain_writer.cc
index d22740f..ee7c5cd 100644
--- a/tools/gn/ninja_toolchain_writer.cc
+++ b/tools/gn/ninja_toolchain_writer.cc
@@ -24,17 +24,15 @@
 
 }  // namespace
 
-NinjaToolchainWriter::NinjaToolchainWriter(
-    const Settings* settings,
-    const Toolchain* toolchain,
-    std::ostream& out)
+NinjaToolchainWriter::NinjaToolchainWriter(const Settings* settings,
+                                           const Toolchain* toolchain,
+                                           std::ostream& out)
     : settings_(settings),
       toolchain_(toolchain),
       out_(out),
       path_output_(settings_->build_settings()->build_dir(),
                    settings_->build_settings()->root_path_utf8(),
-                   ESCAPE_NINJA) {
-}
+                   ESCAPE_NINJA) {}
 
 NinjaToolchainWriter::~NinjaToolchainWriter() = default;
 
diff --git a/tools/gn/ninja_toolchain_writer_unittest.cc b/tools/gn/ninja_toolchain_writer_unittest.cc
index 38e7652..e2fab81 100644
--- a/tools/gn/ninja_toolchain_writer_unittest.cc
+++ b/tools/gn/ninja_toolchain_writer_unittest.cc
@@ -20,6 +20,6 @@
   EXPECT_EQ(
       "rule prefix_cc\n"
       "  command = cc ${in} ${cflags} ${cflags_c} ${defines} ${include_dirs} "
-          "-o ${out}\n",
+      "-o ${out}\n",
       stream.str());
 }
diff --git a/tools/gn/ninja_utils.cc b/tools/gn/ninja_utils.cc
index 9e90392..98f3205 100644
--- a/tools/gn/ninja_utils.cc
+++ b/tools/gn/ninja_utils.cc
@@ -15,9 +15,10 @@
 }
 
 SourceFile GetNinjaFileForToolchain(const Settings* settings) {
-  return SourceFile(GetBuildDirAsSourceDir(
-      BuildDirContext(settings), BuildDirType::TOOLCHAIN_ROOT).value() +
-      "toolchain.ninja");
+  return SourceFile(GetBuildDirAsSourceDir(BuildDirContext(settings),
+                                           BuildDirType::TOOLCHAIN_ROOT)
+                        .value() +
+                    "toolchain.ninja");
 }
 
 std::string GetNinjaRulePrefixForToolchain(const Settings* settings) {
diff --git a/tools/gn/ninja_writer.cc b/tools/gn/ninja_writer.cc
index 3326f83..c6d65ac 100644
--- a/tools/gn/ninja_writer.cc
+++ b/tools/gn/ninja_writer.cc
@@ -12,18 +12,15 @@
 #include "tools/gn/settings.h"
 #include "tools/gn/target.h"
 
-NinjaWriter::NinjaWriter(const Builder& builder)
-    : builder_(builder) {
-}
+NinjaWriter::NinjaWriter(const Builder& builder) : builder_(builder) {}
 
 NinjaWriter::~NinjaWriter() = default;
 
 // static
-bool NinjaWriter::RunAndWriteFiles(
-    const BuildSettings* build_settings,
-    const Builder& builder,
-    const PerToolchainRules& per_toolchain_rules,
-    Err* err) {
+bool NinjaWriter::RunAndWriteFiles(const BuildSettings* build_settings,
+                                   const Builder& builder,
+                                   const PerToolchainRules& per_toolchain_rules,
+                                   Err* err) {
   NinjaWriter writer(builder);
 
   if (!writer.WriteToolchains(per_toolchain_rules, err))
@@ -45,8 +42,8 @@
     const Settings* settings =
         builder_.loader()->GetToolchainSettings(toolchain->label());
     if (!NinjaToolchainWriter::RunAndWriteFile(settings, toolchain, i.second)) {
-      Err(Location(),
-          "Couldn't open toolchain buildfile(s) for writing").PrintToStdout();
+      Err(Location(), "Couldn't open toolchain buildfile(s) for writing")
+          .PrintToStdout();
       return false;
     }
   }
diff --git a/tools/gn/ninja_writer.h b/tools/gn/ninja_writer.h
index 6372f0c..b9b93a4 100644
--- a/tools/gn/ninja_writer.h
+++ b/tools/gn/ninja_writer.h
@@ -30,18 +30,16 @@
   // On failure will populate |err| and will return false.  The map contains
   // the per-toolchain set of rules collected to write to the toolchain build
   // files.
-  static bool RunAndWriteFiles(
-      const BuildSettings* build_settings,
-      const Builder& builder,
-      const PerToolchainRules& per_toolchain_rules,
-      Err* err);
+  static bool RunAndWriteFiles(const BuildSettings* build_settings,
+                               const Builder& builder,
+                               const PerToolchainRules& per_toolchain_rules,
+                               Err* err);
 
  private:
   NinjaWriter(const Builder& builder);
   ~NinjaWriter();
 
-  bool WriteToolchains(const PerToolchainRules& per_toolchain_rules,
-                       Err* err);
+  bool WriteToolchains(const PerToolchainRules& per_toolchain_rules, Err* err);
 
   const Builder& builder_;
 
diff --git a/tools/gn/operators.cc b/tools/gn/operators.cc
index 8bef028..b5227f4 100644
--- a/tools/gn/operators.cc
+++ b/tools/gn/operators.cc
@@ -75,8 +75,7 @@
       scope_(nullptr),
       name_token_(nullptr),
       list_(nullptr),
-      index_(0) {
-}
+      index_(0) {}
 
 bool ValueDestination::Init(Scope* exec_scope,
                             const ParseNode* dest,
@@ -103,13 +102,14 @@
 
   // Known to be an accessor.
   base::StringPiece base_str = dest_accessor->base().value();
-  Value* base = exec_scope->GetMutableValue(
-      base_str, Scope::SEARCH_CURRENT, false);
+  Value* base =
+      exec_scope->GetMutableValue(base_str, Scope::SEARCH_CURRENT, false);
   if (!base) {
     // Base is either undefined or it's defined but not in the current scope.
     // Make a good error message.
     if (exec_scope->GetValue(base_str, false)) {
-      *err = Err(dest_accessor->base(), "Suspicious in-place modification.",
+      *err = Err(
+          dest_accessor->base(), "Suspicious in-place modification.",
           "This variable exists in a containing scope. Normally, writing to it "
           "would\nmake a copy of it into the current scope with the modified "
           "version. But\nhere you're modifying only an element of a scope or "
@@ -117,8 +117,10 @@
           "to modify this part of it.\n"
           "\n"
           "If you really wanted to do this, do:\n"
-          "  " + base_str.as_string() + " = " + base_str.as_string() + "\n"
-          "to copy it into the current scope before doing this operation.");
+          "  " +
+              base_str.as_string() + " = " + base_str.as_string() +
+              "\n"
+              "to copy it into the current scope before doing this operation.");
     } else {
       *err = Err(dest_accessor->base(), "Undefined identifier.");
     }
@@ -164,8 +166,8 @@
 Value* ValueDestination::GetExistingMutableValueIfExists(
     const ParseNode* origin) {
   if (type_ == SCOPE) {
-    Value* value = scope_->GetMutableValue(
-        name_token_->value(), Scope::SEARCH_CURRENT, false);
+    Value* value = scope_->GetMutableValue(name_token_->value(),
+                                           Scope::SEARCH_CURRENT, false);
     if (value) {
       // The value will be written to, reset its tracking information.
       value->set_origin(origin);
@@ -210,8 +212,7 @@
 }
 
 // Computes an error message for overwriting a nonempty list/scope with another.
-Err MakeOverwriteError(const BinaryOpNode* op_node,
-                       const Value& old_value) {
+Err MakeOverwriteError(const BinaryOpNode* op_node, const Value& old_value) {
   std::string type_name;
   std::string empty_def;
 
@@ -226,13 +227,15 @@
   }
 
   Err result(op_node->left()->GetRange(),
-      "Replacing nonempty " + type_name + ".",
-      "This overwrites a previously-defined nonempty " + type_name +
-      " with another nonempty " + type_name + ".");
-  result.AppendSubErr(Err(old_value, "for previous definition",
+             "Replacing nonempty " + type_name + ".",
+             "This overwrites a previously-defined nonempty " + type_name +
+                 " with another nonempty " + type_name + ".");
+  result.AppendSubErr(Err(
+      old_value, "for previous definition",
       "Did you mean to append/modify instead? If you really want to overwrite, "
       "do:\n"
-      "  foo = " + empty_def + "\nbefore reassigning."));
+      "  foo = " +
+          empty_def + "\nbefore reassigning."));
   return result;
 }
 
@@ -241,13 +244,14 @@
 Err MakeIncompatibleTypeError(const BinaryOpNode* op_node,
                               const Value& left,
                               const Value& right) {
-  std::string msg =
-      std::string("You can't do <") + Value::DescribeType(left.type()) + "> " +
-      op_node->op().value().as_string() +
-      " <" + Value::DescribeType(right.type()) + ">.";
+  std::string msg = std::string("You can't do <") +
+                    Value::DescribeType(left.type()) + "> " +
+                    op_node->op().value().as_string() + " <" +
+                    Value::DescribeType(right.type()) + ">.";
   if (left.type() == Value::LIST) {
     // Append extra hint for list stuff.
-    msg += "\n\nHint: If you're attempting to add or remove a single item from "
+    msg +=
+        "\n\nHint: If you're attempting to add or remove a single item from "
         " a list, use \"foo + [ bar ]\".";
   }
   return Err(op_node, "Incompatible types for binary operator.", msg);
@@ -262,8 +266,7 @@
   if (err->has_error())
     return Value();
   if (value.type() == Value::NONE) {
-    *err = Err(op_node->op(),
-               "Operator requires a value.",
+    *err = Err(op_node->op(), "Operator requires a value.",
                "This thing on the " + std::string(name) +
                    " does not evaluate to a value.");
     err->AppendRange(node->GetRange());
@@ -292,8 +295,8 @@
       }
       if (!found_match) {
         *err = Err(to_remove.origin()->GetRange(), "Item not found",
-            "You were trying to remove " + to_remove.ToString(true) +
-            "\nfrom the list but it wasn't there.");
+                   "You were trying to remove " + to_remove.ToString(true) +
+                       "\nfrom the list but it wasn't there.");
       }
       break;
     }
@@ -350,9 +353,7 @@
     std::vector<Value>& list_value = written_value->list_value();
     auto first_deleted = std::remove_if(
         list_value.begin(), list_value.end(),
-        [filter](const Value& v) {
-          return filter->MatchesValue(v);
-        });
+        [filter](const Value& v) { return filter->MatchesValue(v); });
     list_value.erase(first_deleted, list_value.end());
   }
   return Value();
@@ -374,9 +375,8 @@
       return Value(op_node, left.int_value() + right.int_value());
     } else if (right.type() == Value::STRING && allow_left_type_conversion) {
       // Int + string -> string concat.
-      return Value(
-          op_node,
-          base::Int64ToString(left.int_value()) + right.string_value());
+      return Value(op_node, base::Int64ToString(left.int_value()) +
+                                right.string_value());
     }
     *err = MakeIncompatibleTypeError(op_node, left, right);
     return Value();
@@ -386,8 +386,8 @@
   if (left.type() == Value::STRING) {
     if (right.type() == Value::INTEGER) {
       // String + int -> string concat.
-      return Value(op_node,
-          left.string_value() + base::Int64ToString(right.int_value()));
+      return Value(op_node, left.string_value() +
+                                base::Int64ToString(right.int_value()));
     } else if (right.type() == Value::STRING) {
       // String + string -> string concat. Since the left is passed by copy
       // we can avoid realloc if there is enough buffer by appending to left
@@ -469,8 +469,9 @@
     if (existing_value->type() != Value::STRING &&
         existing_value->type() != Value::LIST) {
       // Case #4 above.
-      dest->SetValue(ExecutePlus(op_node, *existing_value,
-                                 std::move(right), false, err), op_node);
+      dest->SetValue(
+          ExecutePlus(op_node, *existing_value, std::move(right), false, err),
+          op_node);
       return;
     }
 
@@ -479,8 +480,9 @@
   } else if (mutable_dest->type() != Value::STRING &&
              mutable_dest->type() != Value::LIST) {
     // Case #2 above.
-    dest->SetValue(ExecutePlus(op_node, *mutable_dest,
-                               std::move(right), false, err), op_node);
+    dest->SetValue(
+        ExecutePlus(op_node, *mutable_dest, std::move(right), false, err),
+        op_node);
     return;
   }  // "else" is case #1 above.
 
@@ -515,7 +517,7 @@
       }
     } else {
       *err = Err(op_node->op(), "Incompatible types to add.",
-          "To append a single item to a list do \"foo += [ bar ]\".");
+                 "To append a single item to a list do \"foo += [ bar ]\".");
     }
   }
 }
@@ -632,8 +634,8 @@
     return Value();
   if (left.type() != Value::BOOLEAN) {
     *err = Err(op_node->left(), "Left side of || operator is not a boolean.",
-        "Type is \"" + std::string(Value::DescribeType(left.type())) +
-        "\" instead.");
+               "Type is \"" + std::string(Value::DescribeType(left.type())) +
+                   "\" instead.");
     return Value();
   }
   if (left.boolean_value())
@@ -644,8 +646,8 @@
     return Value();
   if (right.type() != Value::BOOLEAN) {
     *err = Err(op_node->right(), "Right side of || operator is not a boolean.",
-        "Type is \"" + std::string(Value::DescribeType(right.type())) +
-        "\" instead.");
+               "Type is \"" + std::string(Value::DescribeType(right.type())) +
+                   "\" instead.");
     return Value();
   }
 
@@ -662,8 +664,8 @@
     return Value();
   if (left.type() != Value::BOOLEAN) {
     *err = Err(op_node->left(), "Left side of && operator is not a boolean.",
-        "Type is \"" + std::string(Value::DescribeType(left.type())) +
-        "\" instead.");
+               "Type is \"" + std::string(Value::DescribeType(left.type())) +
+                   "\" instead.");
     return Value();
   }
   if (!left.boolean_value())
@@ -674,8 +676,8 @@
     return Value();
   if (right.type() != Value::BOOLEAN) {
     *err = Err(op_node->right(), "Right side of && operator is not a boolean.",
-        "Type is \"" + std::string(Value::DescribeType(right.type())) +
-        "\" instead.");
+               "Type is \"" + std::string(Value::DescribeType(right.type())) +
+                   "\" instead.");
     return Value();
   }
   return Value(op_node, left.boolean_value() && right.boolean_value());
@@ -693,8 +695,8 @@
 
   if (expr.type() != Value::BOOLEAN) {
     *err = Err(op_node, "Operand of ! operator is not a boolean.",
-        "Type is \"" + std::string(Value::DescribeType(expr.type())) +
-        "\" instead.");
+               "Type is \"" + std::string(Value::DescribeType(expr.type())) +
+                   "\" instead.");
     return Value();
   }
   // TODO(scottmg): Why no unary minus?
@@ -709,8 +711,7 @@
   const Token& op = op_node->op();
 
   // First handle the ones that take an lvalue.
-  if (op.type() == Token::EQUAL ||
-      op.type() == Token::PLUS_EQUALS ||
+  if (op.type() == Token::EQUAL || op.type() == Token::PLUS_EQUALS ||
       op.type() == Token::MINUS_EQUALS) {
     // Compute the left side.
     ValueDestination dest;
diff --git a/tools/gn/operators_unittest.cc b/tools/gn/operators_unittest.cc
index 5ee5391..dd49aa4 100644
--- a/tools/gn/operators_unittest.cc
+++ b/tools/gn/operators_unittest.cc
@@ -32,21 +32,15 @@
 // Execute().
 class TestParseNode : public ParseNode {
  public:
-  TestParseNode(const Value& v) : value_(v) {
-  }
+  TestParseNode(const Value& v) : value_(v) {}
 
-  Value Execute(Scope* scope, Err* err) const override {
-    return value_;
-  }
-  LocationRange GetRange() const override {
-    return LocationRange();
-  }
+  Value Execute(Scope* scope, Err* err) const override { return value_; }
+  LocationRange GetRange() const override { return LocationRange(); }
   Err MakeErrorDescribing(const std::string& msg,
                           const std::string& help) const override {
     return Err(this, msg);
   }
-  void Print(std::ostream& out, int indent) const override {
-  }
+  void Print(std::ostream& out, int indent) const override {}
 
  private:
   Value value_;
@@ -56,8 +50,7 @@
 class TestBinaryOpNode : public BinaryOpNode {
  public:
   // Input token value string must outlive class.
-  TestBinaryOpNode(Token::Type op_token_type,
-                   const char* op_token_value)
+  TestBinaryOpNode(Token::Type op_token_type, const char* op_token_value)
       : BinaryOpNode(),
         op_token_ownership_(Location(), op_token_type, op_token_value) {
     set_op(op_token_ownership_);
@@ -221,8 +214,8 @@
 
   // Subtract a list consisting of "foo".
   node.SetRightToListOfValue(Value(nullptr, foo_str));
-  Value result = ExecuteBinaryOperator(
-      setup.scope(), &node, node.left(), node.right(), &err);
+  Value result = ExecuteBinaryOperator(setup.scope(), &node, node.left(),
+                                       node.right(), &err);
   EXPECT_FALSE(err.has_error());
 
   // -= returns an empty value to reduce the possibility of writing confusing
diff --git a/tools/gn/ordered_set.h b/tools/gn/ordered_set.h
index c67439b..5081112 100644
--- a/tools/gn/ordered_set.h
+++ b/tools/gn/ordered_set.h
@@ -11,7 +11,7 @@
 
 // An ordered set of items. Only appending is supported. Iteration is designed
 // to be by index.
-template<typename T>
+template <typename T>
 class OrderedSet {
  private:
   typedef std::set<T> set_type;
@@ -24,19 +24,11 @@
   OrderedSet() {}
   ~OrderedSet() {}
 
-  const T& operator[](size_t index) const {
-    return *ordering_[index];
-  }
-  size_t size() const {
-    return ordering_.size();
-  }
-  bool empty() const {
-    return ordering_.empty();
-  }
+  const T& operator[](size_t index) const { return *ordering_[index]; }
+  size_t size() const { return ordering_.size(); }
+  bool empty() const { return ordering_.empty(); }
 
-  bool has_item(const T& t) const {
-    return set_.find(t) != set_.end();
-  }
+  bool has_item(const T& t) const { return set_.find(t) != set_.end(); }
 
   // Returns true if the item was inserted. False if it was already in the
   // set.
@@ -48,7 +40,7 @@
   }
 
   // Appends a range of items, skipping ones that already exist.
-  template<class InputIterator>
+  template <class InputIterator>
   void append(const InputIterator& insert_begin,
               const InputIterator& insert_end) {
     for (InputIterator i = insert_begin; i != insert_end; ++i) {
diff --git a/tools/gn/output_file.cc b/tools/gn/output_file.cc
index a70bae9..f92e097 100644
--- a/tools/gn/output_file.cc
+++ b/tools/gn/output_file.cc
@@ -7,23 +7,17 @@
 #include "tools/gn/filesystem_utils.h"
 #include "tools/gn/source_file.h"
 
-OutputFile::OutputFile() : value_() {
-}
+OutputFile::OutputFile() : value_() {}
 
-OutputFile::OutputFile(std::string&& v)
-    : value_(v) {
-}
+OutputFile::OutputFile(std::string&& v) : value_(v) {}
 
-OutputFile::OutputFile(const std::string& v)
-    : value_(v) {
-}
+OutputFile::OutputFile(const std::string& v) : value_(v) {}
 
 OutputFile::OutputFile(const BuildSettings* build_settings,
                        const SourceFile& source_file)
     : value_(RebasePath(source_file.value(),
                         build_settings->build_dir(),
-                        build_settings->root_path_utf8())) {
-}
+                        build_settings->root_path_utf8())) {}
 
 OutputFile::~OutputFile() = default;
 
diff --git a/tools/gn/output_file.h b/tools/gn/output_file.h
index 2f96a33..a3a64e0 100644
--- a/tools/gn/output_file.h
+++ b/tools/gn/output_file.h
@@ -49,7 +49,8 @@
 
 namespace std {
 
-template<> struct hash<OutputFile> {
+template <>
+struct hash<OutputFile> {
   std::size_t operator()(const OutputFile& v) const {
     hash<std::string> h;
     return h(v.value());
diff --git a/tools/gn/parse_node_value_adapter.cc b/tools/gn/parse_node_value_adapter.cc
index 70c78e5..bf3ad66 100644
--- a/tools/gn/parse_node_value_adapter.cc
+++ b/tools/gn/parse_node_value_adapter.cc
@@ -7,8 +7,7 @@
 #include "tools/gn/parse_tree.h"
 #include "tools/gn/scope.h"
 
-ParseNodeValueAdapter::ParseNodeValueAdapter() : ref_(nullptr) {
-}
+ParseNodeValueAdapter::ParseNodeValueAdapter() : ref_(nullptr) {}
 
 ParseNodeValueAdapter::~ParseNodeValueAdapter() = default;
 
diff --git a/tools/gn/parse_tree.cc b/tools/gn/parse_tree.cc
index df95bf5..20f272b 100644
--- a/tools/gn/parse_tree.cc
+++ b/tools/gn/parse_tree.cc
@@ -93,17 +93,39 @@
 
 ParseNode::~ParseNode() = default;
 
-const AccessorNode* ParseNode::AsAccessor() const { return nullptr; }
-const BinaryOpNode* ParseNode::AsBinaryOp() const { return nullptr; }
-const BlockCommentNode* ParseNode::AsBlockComment() const { return nullptr; }
-const BlockNode* ParseNode::AsBlock() const { return nullptr; }
-const ConditionNode* ParseNode::AsConditionNode() const { return nullptr; }
-const EndNode* ParseNode::AsEnd() const { return nullptr; }
-const FunctionCallNode* ParseNode::AsFunctionCall() const { return nullptr; }
-const IdentifierNode* ParseNode::AsIdentifier() const { return nullptr; }
-const ListNode* ParseNode::AsList() const { return nullptr; }
-const LiteralNode* ParseNode::AsLiteral() const { return nullptr; }
-const UnaryOpNode* ParseNode::AsUnaryOp() const { return nullptr; }
+const AccessorNode* ParseNode::AsAccessor() const {
+  return nullptr;
+}
+const BinaryOpNode* ParseNode::AsBinaryOp() const {
+  return nullptr;
+}
+const BlockCommentNode* ParseNode::AsBlockComment() const {
+  return nullptr;
+}
+const BlockNode* ParseNode::AsBlock() const {
+  return nullptr;
+}
+const ConditionNode* ParseNode::AsConditionNode() const {
+  return nullptr;
+}
+const EndNode* ParseNode::AsEnd() const {
+  return nullptr;
+}
+const FunctionCallNode* ParseNode::AsFunctionCall() const {
+  return nullptr;
+}
+const IdentifierNode* ParseNode::AsIdentifier() const {
+  return nullptr;
+}
+const ListNode* ParseNode::AsList() const {
+  return nullptr;
+}
+const LiteralNode* ParseNode::AsLiteral() const {
+  return nullptr;
+}
+const UnaryOpNode* ParseNode::AsUnaryOp() const {
+  return nullptr;
+}
 
 Comments* ParseNode::comments_mutable() {
   if (!comments_)
@@ -193,8 +215,8 @@
   const Value* result = nullptr;
 
   // Look up the value in the scope named by "base_".
-  Value* mutable_base_value = scope->GetMutableValue(
-      base_.value(), Scope::SEARCH_NESTED, true);
+  Value* mutable_base_value =
+      scope->GetMutableValue(base_.value(), Scope::SEARCH_NESTED, true);
   if (mutable_base_value) {
     // Common case: base value is mutable so we can track variable accesses
     // for unused value warnings.
@@ -218,8 +240,8 @@
   }
 
   if (!result) {
-    *err = Err(member_.get(), "No value named \"" +
-        member_->value().value() + "\" in scope \"" + base_.value() + "\"");
+    *err = Err(member_.get(), "No value named \"" + member_->value().value() +
+                                  "\" in scope \"" + base_.value() + "\"");
     return Value();
   }
   return *result;
@@ -244,7 +266,7 @@
   int64_t index_int = index_value.int_value();
   if (index_int < 0) {
     *err = Err(index_->GetRange(), "Negative array subscript.",
-        "You gave me " + base::Int64ToString(index_int) + ".");
+               "You gave me " + base::Int64ToString(index_int) + ".");
     return false;
   }
   size_t index_sizet = static_cast<size_t>(index_int);
@@ -292,8 +314,7 @@
 
 // BlockNode ------------------------------------------------------------------
 
-BlockNode::BlockNode(ResultMode result_mode) : result_mode_(result_mode) {
-}
+BlockNode::BlockNode(ResultMode result_mode) : result_mode_(result_mode) {}
 
 BlockNode::~BlockNode() = default;
 
@@ -388,8 +409,7 @@
     *err = condition_->MakeErrorDescribing(
         "Condition does not evaluate to a boolean value.",
         std::string("This is a value of type \"") +
-            Value::DescribeType(condition_result.type()) +
-            "\" instead.");
+            Value::DescribeType(condition_result.type()) + "\" instead.");
     err->AppendRange(if_token_.range());
     return Value();
   }
@@ -463,8 +483,7 @@
 
 IdentifierNode::IdentifierNode() = default;
 
-IdentifierNode::IdentifierNode(const Token& token) : value_(token) {
-}
+IdentifierNode::IdentifierNode(const Token& token) : value_(token) {}
 
 IdentifierNode::~IdentifierNode() = default;
 
@@ -474,8 +493,8 @@
 
 Value IdentifierNode::Execute(Scope* scope, Err* err) const {
   const Scope* found_in_scope = nullptr;
-  const Value* value = scope->GetValueWithScope(value_.value(), true,
-                                                &found_in_scope);
+  const Value* value =
+      scope->GetValueWithScope(value_.value(), true, &found_in_scope);
   Value result;
   if (!value) {
     *err = MakeErrorDescribing("Undefined identifier");
@@ -512,8 +531,7 @@
 
 // ListNode -------------------------------------------------------------------
 
-ListNode::ListNode() : prefer_multiline_(false) {
-}
+ListNode::ListNode() : prefer_multiline_(false) {}
 
 ListNode::~ListNode() = default;
 
@@ -533,9 +551,8 @@
     if (err->has_error())
       return Value();
     if (results.back().type() == Value::NONE) {
-      *err = cur->MakeErrorDescribing(
-          "This does not evaluate to a value.",
-          "I can't do something with nothing.");
+      *err = cur->MakeErrorDescribing("This does not evaluate to a value.",
+                                      "I can't do something with nothing.");
       return Value();
     }
   }
@@ -543,8 +560,7 @@
 }
 
 LocationRange ListNode::GetRange() const {
-  return LocationRange(begin_token_.location(),
-                       end_->value().location());
+  return LocationRange(begin_token_.location(), end_->value().location());
 }
 
 Err ListNode::MakeErrorDescribing(const std::string& msg,
@@ -707,8 +723,7 @@
 
 LiteralNode::LiteralNode() = default;
 
-LiteralNode::LiteralNode(const Token& token) : value_(token) {
-}
+LiteralNode::LiteralNode(const Token& token) : value_(token) {}
 
 LiteralNode::~LiteralNode() = default;
 
@@ -831,8 +846,7 @@
 
 // EndNode ---------------------------------------------------------------------
 
-EndNode::EndNode(const Token& token) : value_(token) {
-}
+EndNode::EndNode(const Token& token) : value_(token) {}
 
 EndNode::~EndNode() = default;
 
@@ -849,7 +863,7 @@
 }
 
 Err EndNode::MakeErrorDescribing(const std::string& msg,
-                                        const std::string& help) const {
+                                 const std::string& help) const {
   return Err(value_, msg, help);
 }
 
diff --git a/tools/gn/parser.cc b/tools/gn/parser.cc
index c8dd654..df57c9e 100644
--- a/tools/gn/parser.cc
+++ b/tools/gn/parser.cc
@@ -225,7 +225,7 @@
   PRECEDENCE_SUM = 6,
   PRECEDENCE_PREFIX = 7,
   PRECEDENCE_CALL = 8,
-  PRECEDENCE_DOT = 9,         // Highest precedence.
+  PRECEDENCE_DOT = 9,  // Highest precedence.
 };
 
 // The top-level for blocks/ifs is recursive descent, the expression parser is
@@ -238,7 +238,8 @@
 //
 // Refs:
 // - http://javascript.crockford.com/tdop/tdop.html
-// - http://journal.stuffwithstuff.com/2011/03/19/pratt-parsers-expression-parsing-made-easy/
+// -
+// http://journal.stuffwithstuff.com/2011/03/19/pratt-parsers-expression-parsing-made-easy/
 
 // Indexed by Token::Type.
 ParserHelper Parser::expressions_[] = {
@@ -377,7 +378,7 @@
 }
 
 const Token& Parser::Consume(Token::Type type, const char* error_message) {
-  Token::Type types[1] = { type };
+  Token::Type types[1] = {type};
   return Consume(types, 1, error_message);
 }
 
@@ -424,9 +425,8 @@
   PrefixFunc prefix = expressions_[token.type()].prefix;
 
   if (prefix == nullptr) {
-    *err_ = Err(token,
-                std::string("Unexpected token '") + token.value().as_string() +
-                    std::string("'"));
+    *err_ = Err(token, std::string("Unexpected token '") +
+                           token.value().as_string() + std::string("'"));
     return std::unique_ptr<ParseNode>();
   }
 
@@ -567,8 +567,8 @@
                                               const Token& token) {
   if (left->AsIdentifier() == nullptr && left->AsAccessor() == nullptr) {
     *err_ = Err(left.get(),
-        "The left-hand side of an assignment must be an identifier, "
-        "scope access, or array access.");
+                "The left-hand side of an assignment must be an identifier, "
+                "scope access, or array access.");
     return std::unique_ptr<ParseNode>();
   }
   std::unique_ptr<ParseNode> value = ParseExpression(PRECEDENCE_ASSIGNMENT);
@@ -589,7 +589,8 @@
   // TODO: Maybe support more complex expressions like a[0][0]. This would
   // require work on the evaluator too.
   if (left->AsIdentifier() == nullptr) {
-    *err_ = Err(left.get(), "May only subscript identifiers.",
+    *err_ = Err(
+        left.get(), "May only subscript identifiers.",
         "The thing on the left hand side of the [] must be an identifier\n"
         "and not an expression. If you need this, you'll have to assign the\n"
         "value to a temporary before subscripting. Sorry.");
@@ -606,7 +607,8 @@
 std::unique_ptr<ParseNode> Parser::DotOperator(std::unique_ptr<ParseNode> left,
                                                const Token& token) {
   if (left->AsIdentifier() == nullptr) {
-    *err_ = Err(left.get(), "May only use \".\" for identifiers.",
+    *err_ = Err(
+        left.get(), "May only use \".\" for identifiers.",
         "The thing on the left hand side of the dot must be an identifier\n"
         "and not an expression. If you need this, you'll have to assign the\n"
         "value to a temporary first. Sorry.");
@@ -615,7 +617,8 @@
 
   std::unique_ptr<ParseNode> right = ParseExpression(PRECEDENCE_DOT);
   if (!right || !right->AsIdentifier()) {
-    *err_ = Err(token, "Expected identifier for right-hand-side of \".\"",
+    *err_ = Err(
+        token, "Expected identifier for right-hand-side of \".\"",
         "Good: a.cookies\nBad: a.42\nLooks good but still bad: a.cookies()");
     return std::unique_ptr<ParseNode>();
   }
@@ -753,8 +756,8 @@
       BlockNode::DISCARDS_RESULT));
   if (Match(Token::ELSE)) {
     if (LookAhead(Token::LEFT_BRACE)) {
-      condition->set_if_false(ParseBlock(Consume(),
-                                         BlockNode::DISCARDS_RESULT));
+      condition->set_if_false(
+          ParseBlock(Consume(), BlockNode::DISCARDS_RESULT));
     } else if (LookAhead(Token::IF)) {
       condition->set_if_false(ParseStatement());
     } else {
@@ -846,8 +849,7 @@
   // Assign suffix to syntax immediately before.
   cur_comment = static_cast<int>(suffix_comment_tokens_.size() - 1);
   for (std::vector<const ParseNode*>::const_reverse_iterator i = post.rbegin();
-       i != post.rend();
-       ++i) {
+       i != post.rend(); ++i) {
     // Don't assign suffix comments to the function, list, or block, but instead
     // to the last thing inside.
     if ((*i)->AsFunctionCall() || (*i)->AsList() || (*i)->AsBlock())
diff --git a/tools/gn/parser_unittest.cc b/tools/gn/parser_unittest.cc
index 9d34cb7..c52825c 100644
--- a/tools/gn/parser_unittest.cc
+++ b/tools/gn/parser_unittest.cc
@@ -100,30 +100,30 @@
   // TODO(scottmg): The tokenizer is dumb, and treats "5-1" as two integers,
   // not a binary operator between two positive integers.
   DoExpressionPrintTest("5 - 1",
-      "BINARY(-)\n"
-      " LITERAL(5)\n"
-      " LITERAL(1)\n");
+                        "BINARY(-)\n"
+                        " LITERAL(5)\n"
+                        " LITERAL(1)\n");
   DoExpressionPrintTest("5+1",
-      "BINARY(+)\n"
-      " LITERAL(5)\n"
-      " LITERAL(1)\n");
+                        "BINARY(+)\n"
+                        " LITERAL(5)\n"
+                        " LITERAL(1)\n");
   DoExpressionPrintTest("5 - 1 - 2",
-      "BINARY(-)\n"
-      " BINARY(-)\n"
-      "  LITERAL(5)\n"
-      "  LITERAL(1)\n"
-      " LITERAL(2)\n");
+                        "BINARY(-)\n"
+                        " BINARY(-)\n"
+                        "  LITERAL(5)\n"
+                        "  LITERAL(1)\n"
+                        " LITERAL(2)\n");
 }
 
 TEST(Parser, FunctionCall) {
   DoExpressionPrintTest("foo()",
-      "FUNCTION(foo)\n"
-      " LIST\n");
+                        "FUNCTION(foo)\n"
+                        " LIST\n");
   DoExpressionPrintTest("blah(1, 2)",
-      "FUNCTION(blah)\n"
-      " LIST\n"
-      "  LITERAL(1)\n"
-      "  LITERAL(2)\n");
+                        "FUNCTION(blah)\n"
+                        " LIST\n"
+                        "  LITERAL(1)\n"
+                        "  LITERAL(2)\n");
   DoExpressionErrorTest("foo(1, 2,)", 1, 10);
   DoExpressionErrorTest("foo(1 2)", 1, 7);
 }
@@ -179,8 +179,8 @@
 
 TEST(Parser, UnaryOp) {
   DoExpressionPrintTest("!foo",
-      "UNARY(!)\n"
-      " IDENTIFIER(foo)\n");
+                        "UNARY(!)\n"
+                        " IDENTIFIER(foo)\n");
 
   // No contents for binary operator.
   DoExpressionErrorTest("a = !", 1, 5);
@@ -189,23 +189,23 @@
 TEST(Parser, List) {
   DoExpressionPrintTest("[]", "LIST\n");
   DoExpressionPrintTest("[1,asd,]",
-      "LIST\n"
-      " LITERAL(1)\n"
-      " IDENTIFIER(asd)\n");
+                        "LIST\n"
+                        " LITERAL(1)\n"
+                        " IDENTIFIER(asd)\n");
   DoExpressionPrintTest("[1, 2+3 - foo]",
-      "LIST\n"
-      " LITERAL(1)\n"
-      " BINARY(-)\n"
-      "  BINARY(+)\n"
-      "   LITERAL(2)\n"
-      "   LITERAL(3)\n"
-      "  IDENTIFIER(foo)\n");
+                        "LIST\n"
+                        " LITERAL(1)\n"
+                        " BINARY(-)\n"
+                        "  BINARY(+)\n"
+                        "   LITERAL(2)\n"
+                        "   LITERAL(3)\n"
+                        "  IDENTIFIER(foo)\n");
   DoExpressionPrintTest("[1,\n2,\n 3,\n  4]",
-      "LIST\n"
-      " LITERAL(1)\n"
-      " LITERAL(2)\n"
-      " LITERAL(3)\n"
-      " LITERAL(4)\n");
+                        "LIST\n"
+                        " LITERAL(1)\n"
+                        " LITERAL(2)\n"
+                        " LITERAL(3)\n"
+                        " LITERAL(4)\n");
 
   DoExpressionErrorTest("[a, 2+,]", 1, 7);
   DoExpressionErrorTest("[,]", 1, 2);
@@ -400,60 +400,51 @@
 }
 
 TEST(Parser, NewlinesInUnusualPlaces2) {
-  DoParserPrintTest(
-      "a\n=\n2\n",
-      "BLOCK\n"
-      " BINARY(=)\n"
-      "  IDENTIFIER(a)\n"
-      "  LITERAL(2)\n");
-  DoParserPrintTest(
-      "x =\ny if\n(1\n) {}",
-      "BLOCK\n"
-      " BINARY(=)\n"
-      "  IDENTIFIER(x)\n"
-      "  IDENTIFIER(y)\n"
-      " CONDITION\n"
-      "  LITERAL(1)\n"
-      "  BLOCK\n");
-  DoParserPrintTest(
-      "x = 3\n+2",
-      "BLOCK\n"
-      " BINARY(=)\n"
-      "  IDENTIFIER(x)\n"
-      "  BINARY(+)\n"
-      "   LITERAL(3)\n"
-      "   LITERAL(2)\n"
-      );
+  DoParserPrintTest("a\n=\n2\n",
+                    "BLOCK\n"
+                    " BINARY(=)\n"
+                    "  IDENTIFIER(a)\n"
+                    "  LITERAL(2)\n");
+  DoParserPrintTest("x =\ny if\n(1\n) {}",
+                    "BLOCK\n"
+                    " BINARY(=)\n"
+                    "  IDENTIFIER(x)\n"
+                    "  IDENTIFIER(y)\n"
+                    " CONDITION\n"
+                    "  LITERAL(1)\n"
+                    "  BLOCK\n");
+  DoParserPrintTest("x = 3\n+2",
+                    "BLOCK\n"
+                    " BINARY(=)\n"
+                    "  IDENTIFIER(x)\n"
+                    "  BINARY(+)\n"
+                    "   LITERAL(3)\n"
+                    "   LITERAL(2)\n");
 }
 
 TEST(Parser, NewlineBeforeSubscript) {
   const char* input = "a = b[1]";
   const char* input_with_newline = "a = b\n[1]";
   const char* expected =
-    "BLOCK\n"
-    " BINARY(=)\n"
-    "  IDENTIFIER(a)\n"
-    "  ACCESSOR\n"
-    "   b\n"
-    "   LITERAL(1)\n";
-  DoParserPrintTest(
-      input,
-      expected);
-  DoParserPrintTest(
-      input_with_newline,
-      expected);
-}
-
-TEST(Parser, SequenceOfExpressions) {
-  DoParserPrintTest(
-      "a = 1 b = 2",
       "BLOCK\n"
       " BINARY(=)\n"
       "  IDENTIFIER(a)\n"
-      "  LITERAL(1)\n"
-      " BINARY(=)\n"
-      "  IDENTIFIER(b)\n"
-      "  LITERAL(2)\n");
+      "  ACCESSOR\n"
+      "   b\n"
+      "   LITERAL(1)\n";
+  DoParserPrintTest(input, expected);
+  DoParserPrintTest(input_with_newline, expected);
+}
+
+TEST(Parser, SequenceOfExpressions) {
+  DoParserPrintTest("a = 1 b = 2",
+                    "BLOCK\n"
+                    " BINARY(=)\n"
+                    "  IDENTIFIER(a)\n"
+                    "  LITERAL(1)\n"
+                    " BINARY(=)\n"
+                    "  IDENTIFIER(b)\n"
+                    "  LITERAL(2)\n");
 }
 
 TEST(Parser, BlockAfterFunction) {
@@ -461,11 +452,11 @@
   // TODO(scottmg): Do we really want these to mean different things?
   const char* input_with_newline = "func(\"stuff\")\n{\n}";
   const char* expected =
-    "BLOCK\n"
-    " FUNCTION(func)\n"
-    "  LIST\n"
-    "   LITERAL(\"stuff\")\n"
-    "  BLOCK\n";
+      "BLOCK\n"
+      " FUNCTION(func)\n"
+      "  LIST\n"
+      "   LITERAL(\"stuff\")\n"
+      "  BLOCK\n";
   DoParserPrintTest(input, expected);
   DoParserPrintTest(input_with_newline, expected);
 }
@@ -473,180 +464,180 @@
 TEST(Parser, LongExpression) {
   const char* input = "a = b + c && d || e";
   const char* expected =
-    "BLOCK\n"
-    " BINARY(=)\n"
-    "  IDENTIFIER(a)\n"
-    "  BINARY(||)\n"
-    "   BINARY(&&)\n"
-    "    BINARY(+)\n"
-    "     IDENTIFIER(b)\n"
-    "     IDENTIFIER(c)\n"
-    "    IDENTIFIER(d)\n"
-    "   IDENTIFIER(e)\n";
+      "BLOCK\n"
+      " BINARY(=)\n"
+      "  IDENTIFIER(a)\n"
+      "  BINARY(||)\n"
+      "   BINARY(&&)\n"
+      "    BINARY(+)\n"
+      "     IDENTIFIER(b)\n"
+      "     IDENTIFIER(c)\n"
+      "    IDENTIFIER(d)\n"
+      "   IDENTIFIER(e)\n";
   DoParserPrintTest(input, expected);
 }
 
 TEST(Parser, CommentsStandalone) {
   const char* input =
-    "# Toplevel comment.\n"
-    "\n"
-    "executable(\"wee\") {}\n";
+      "# Toplevel comment.\n"
+      "\n"
+      "executable(\"wee\") {}\n";
   const char* expected =
-    "BLOCK\n"
-    " BLOCK_COMMENT(# Toplevel comment.)\n"
-    " FUNCTION(executable)\n"
-    "  LIST\n"
-    "   LITERAL(\"wee\")\n"
-    "  BLOCK\n";
+      "BLOCK\n"
+      " BLOCK_COMMENT(# Toplevel comment.)\n"
+      " FUNCTION(executable)\n"
+      "  LIST\n"
+      "   LITERAL(\"wee\")\n"
+      "  BLOCK\n";
   DoParserPrintTest(input, expected);
 }
 
 TEST(Parser, CommentsStandaloneEof) {
   const char* input =
-    "executable(\"wee\") {}\n"
-    "# EOF comment.\n";
+      "executable(\"wee\") {}\n"
+      "# EOF comment.\n";
   const char* expected =
-    "BLOCK\n"
-    " +AFTER_COMMENT(\"# EOF comment.\")\n"
-    " FUNCTION(executable)\n"
-    "  LIST\n"
-    "   LITERAL(\"wee\")\n"
-    "  BLOCK\n";
+      "BLOCK\n"
+      " +AFTER_COMMENT(\"# EOF comment.\")\n"
+      " FUNCTION(executable)\n"
+      "  LIST\n"
+      "   LITERAL(\"wee\")\n"
+      "  BLOCK\n";
   DoParserPrintTest(input, expected);
 }
 
 TEST(Parser, CommentsLineAttached) {
   const char* input =
-    "executable(\"wee\") {\n"
-    "  # Some sources.\n"
-    "  sources = [\n"
-    "    \"stuff.cc\",\n"
-    "    \"things.cc\",\n"
-    "    # This file is special or something.\n"
-    "    \"another.cc\",\n"
-    "  ]\n"
-    "}\n";
+      "executable(\"wee\") {\n"
+      "  # Some sources.\n"
+      "  sources = [\n"
+      "    \"stuff.cc\",\n"
+      "    \"things.cc\",\n"
+      "    # This file is special or something.\n"
+      "    \"another.cc\",\n"
+      "  ]\n"
+      "}\n";
   const char* expected =
-    "BLOCK\n"
-    " FUNCTION(executable)\n"
-    "  LIST\n"
-    "   LITERAL(\"wee\")\n"
-    "  BLOCK\n"
-    "   BINARY(=)\n"
-    "    +BEFORE_COMMENT(\"# Some sources.\")\n"
-    "    IDENTIFIER(sources)\n"
-    "    LIST\n"
-    "     LITERAL(\"stuff.cc\")\n"
-    "     LITERAL(\"things.cc\")\n"
-    "     LITERAL(\"another.cc\")\n"
-    "      +BEFORE_COMMENT(\"# This file is special or something.\")\n";
+      "BLOCK\n"
+      " FUNCTION(executable)\n"
+      "  LIST\n"
+      "   LITERAL(\"wee\")\n"
+      "  BLOCK\n"
+      "   BINARY(=)\n"
+      "    +BEFORE_COMMENT(\"# Some sources.\")\n"
+      "    IDENTIFIER(sources)\n"
+      "    LIST\n"
+      "     LITERAL(\"stuff.cc\")\n"
+      "     LITERAL(\"things.cc\")\n"
+      "     LITERAL(\"another.cc\")\n"
+      "      +BEFORE_COMMENT(\"# This file is special or something.\")\n";
   DoParserPrintTest(input, expected);
 }
 
 TEST(Parser, CommentsSuffix) {
   const char* input =
-    "executable(\"wee\") { # This is some stuff.\n"
-    "sources = [ \"a.cc\" # And another comment here.\n"
-    "] }";
+      "executable(\"wee\") { # This is some stuff.\n"
+      "sources = [ \"a.cc\" # And another comment here.\n"
+      "] }";
   const char* expected =
-    "BLOCK\n"
-    " FUNCTION(executable)\n"
-    "  LIST\n"
-    "   LITERAL(\"wee\")\n"
-    "   END())\n"
-    "    +SUFFIX_COMMENT(\"# This is some stuff.\")\n"
-    "  BLOCK\n"
-    "   BINARY(=)\n"
-    "    IDENTIFIER(sources)\n"
-    "    LIST\n"
-    "     LITERAL(\"a.cc\")\n"
-    "      +SUFFIX_COMMENT(\"# And another comment here.\")\n";
+      "BLOCK\n"
+      " FUNCTION(executable)\n"
+      "  LIST\n"
+      "   LITERAL(\"wee\")\n"
+      "   END())\n"
+      "    +SUFFIX_COMMENT(\"# This is some stuff.\")\n"
+      "  BLOCK\n"
+      "   BINARY(=)\n"
+      "    IDENTIFIER(sources)\n"
+      "    LIST\n"
+      "     LITERAL(\"a.cc\")\n"
+      "      +SUFFIX_COMMENT(\"# And another comment here.\")\n";
   DoParserPrintTest(input, expected);
 }
 
 TEST(Parser, CommentsSuffixDifferentLine) {
   const char* input =
-    "executable(\"wee\") {\n"
-    "  sources = [ \"a\",\n"
-    "      \"b\" ] # Comment\n"
-    "}\n";
+      "executable(\"wee\") {\n"
+      "  sources = [ \"a\",\n"
+      "      \"b\" ] # Comment\n"
+      "}\n";
   const char* expected =
-    "BLOCK\n"
-    " FUNCTION(executable)\n"
-    "  LIST\n"
-    "   LITERAL(\"wee\")\n"
-    "  BLOCK\n"
-    "   BINARY(=)\n"
-    "    IDENTIFIER(sources)\n"
-    "    LIST\n"
-    "     LITERAL(\"a\")\n"
-    "     LITERAL(\"b\")\n"
-    "     END(])\n"
-    "      +SUFFIX_COMMENT(\"# Comment\")\n";
+      "BLOCK\n"
+      " FUNCTION(executable)\n"
+      "  LIST\n"
+      "   LITERAL(\"wee\")\n"
+      "  BLOCK\n"
+      "   BINARY(=)\n"
+      "    IDENTIFIER(sources)\n"
+      "    LIST\n"
+      "     LITERAL(\"a\")\n"
+      "     LITERAL(\"b\")\n"
+      "     END(])\n"
+      "      +SUFFIX_COMMENT(\"# Comment\")\n";
   DoParserPrintTest(input, expected);
 }
 
 TEST(Parser, CommentsSuffixMultiple) {
   const char* input =
-    "executable(\"wee\") {\n"
-    "  sources = [\n"
-    "    \"a\",  # This is a comment,\n"
-    "          # and some more,\n"  // Note that this is aligned with above.
-    "          # then the end.\n"
-    "  ]\n"
-    "}\n";
+      "executable(\"wee\") {\n"
+      "  sources = [\n"
+      "    \"a\",  # This is a comment,\n"
+      "          # and some more,\n"  // Note that this is aligned with above.
+      "          # then the end.\n"
+      "  ]\n"
+      "}\n";
   const char* expected =
-    "BLOCK\n"
-    " FUNCTION(executable)\n"
-    "  LIST\n"
-    "   LITERAL(\"wee\")\n"
-    "  BLOCK\n"
-    "   BINARY(=)\n"
-    "    IDENTIFIER(sources)\n"
-    "    LIST\n"
-    "     LITERAL(\"a\")\n"
-    "      +SUFFIX_COMMENT(\"# This is a comment,\")\n"
-    "      +SUFFIX_COMMENT(\"# and some more,\")\n"
-    "      +SUFFIX_COMMENT(\"# then the end.\")\n";
+      "BLOCK\n"
+      " FUNCTION(executable)\n"
+      "  LIST\n"
+      "   LITERAL(\"wee\")\n"
+      "  BLOCK\n"
+      "   BINARY(=)\n"
+      "    IDENTIFIER(sources)\n"
+      "    LIST\n"
+      "     LITERAL(\"a\")\n"
+      "      +SUFFIX_COMMENT(\"# This is a comment,\")\n"
+      "      +SUFFIX_COMMENT(\"# and some more,\")\n"
+      "      +SUFFIX_COMMENT(\"# then the end.\")\n";
   DoParserPrintTest(input, expected);
 }
 
 TEST(Parser, CommentsConnectedInList) {
   const char* input =
-    "defines = [\n"
-    "\n"
-    "  # Connected comment.\n"
-    "  \"WEE\",\n"
-    "  \"BLORPY\",\n"
-    "]\n";
+      "defines = [\n"
+      "\n"
+      "  # Connected comment.\n"
+      "  \"WEE\",\n"
+      "  \"BLORPY\",\n"
+      "]\n";
   const char* expected =
-    "BLOCK\n"
-    " BINARY(=)\n"
-    "  IDENTIFIER(defines)\n"
-    "  LIST\n"
-    "   LITERAL(\"WEE\")\n"
-    "    +BEFORE_COMMENT(\"# Connected comment.\")\n"
-    "   LITERAL(\"BLORPY\")\n";
+      "BLOCK\n"
+      " BINARY(=)\n"
+      "  IDENTIFIER(defines)\n"
+      "  LIST\n"
+      "   LITERAL(\"WEE\")\n"
+      "    +BEFORE_COMMENT(\"# Connected comment.\")\n"
+      "   LITERAL(\"BLORPY\")\n";
   DoParserPrintTest(input, expected);
 }
 
 TEST(Parser, CommentsAtEndOfBlock) {
   const char* input =
-    "if (is_win) {\n"
-    "  sources = [\"a.cc\"]\n"
-    "  # Some comment at end.\n"
-    "}\n";
+      "if (is_win) {\n"
+      "  sources = [\"a.cc\"]\n"
+      "  # Some comment at end.\n"
+      "}\n";
   const char* expected =
-    "BLOCK\n"
-    " CONDITION\n"
-    "  IDENTIFIER(is_win)\n"
-    "  BLOCK\n"
-    "   BINARY(=)\n"
-    "    IDENTIFIER(sources)\n"
-    "    LIST\n"
-    "     LITERAL(\"a.cc\")\n"
-    "   END(})\n"
-    "    +BEFORE_COMMENT(\"# Some comment at end.\")\n";
+      "BLOCK\n"
+      " CONDITION\n"
+      "  IDENTIFIER(is_win)\n"
+      "  BLOCK\n"
+      "   BINARY(=)\n"
+      "    IDENTIFIER(sources)\n"
+      "    LIST\n"
+      "     LITERAL(\"a.cc\")\n"
+      "   END(})\n"
+      "    +BEFORE_COMMENT(\"# Some comment at end.\")\n";
   DoParserPrintTest(input, expected);
 }
 
@@ -654,14 +645,14 @@
 // which thing this comment is intended to be attached to.
 TEST(Parser, CommentsEndOfBlockSingleLine) {
   const char* input =
-    "defines = [ # EOL defines.\n"
-    "]\n";
+      "defines = [ # EOL defines.\n"
+      "]\n";
   const char* expected =
-    "BLOCK\n"
-    " BINARY(=)\n"
-    "  IDENTIFIER(defines)\n"
-    "   +SUFFIX_COMMENT(\"# EOL defines.\")\n"
-    "  LIST\n";
+      "BLOCK\n"
+      " BINARY(=)\n"
+      "  IDENTIFIER(defines)\n"
+      "   +SUFFIX_COMMENT(\"# EOL defines.\")\n"
+      "  LIST\n";
   DoParserPrintTest(input, expected);
 }
 
@@ -720,25 +711,25 @@
 
 TEST(Parser, BlockValues) {
   const char* input =
-    "print({a = 1 b = 2}, 3)\n"
-    "a = { b = \"asd\" }";
+      "print({a = 1 b = 2}, 3)\n"
+      "a = { b = \"asd\" }";
   const char* expected =
-    "BLOCK\n"
-    " FUNCTION(print)\n"
-    "  LIST\n"
-    "   BLOCK\n"
-    "    BINARY(=)\n"
-    "     IDENTIFIER(a)\n"
-    "     LITERAL(1)\n"
-    "    BINARY(=)\n"
-    "     IDENTIFIER(b)\n"
-    "     LITERAL(2)\n"
-    "   LITERAL(3)\n"
-    " BINARY(=)\n"
-    "  IDENTIFIER(a)\n"
-    "  BLOCK\n"
-    "   BINARY(=)\n"
-    "    IDENTIFIER(b)\n"
-    "    LITERAL(\"asd\")\n";
+      "BLOCK\n"
+      " FUNCTION(print)\n"
+      "  LIST\n"
+      "   BLOCK\n"
+      "    BINARY(=)\n"
+      "     IDENTIFIER(a)\n"
+      "     LITERAL(1)\n"
+      "    BINARY(=)\n"
+      "     IDENTIFIER(b)\n"
+      "     LITERAL(2)\n"
+      "   LITERAL(3)\n"
+      " BINARY(=)\n"
+      "  IDENTIFIER(a)\n"
+      "  BLOCK\n"
+      "   BINARY(=)\n"
+      "    IDENTIFIER(b)\n"
+      "    LITERAL(\"asd\")\n";
   DoParserPrintTest(input, expected);
 }
diff --git a/tools/gn/path_output.cc b/tools/gn/path_output.cc
index 9e1aef8..dbbd8f8 100644
--- a/tools/gn/path_output.cc
+++ b/tools/gn/path_output.cc
@@ -64,8 +64,8 @@
     WritePathStr(out, dir.value());
   } else {
     // DIR_NO_LAST_SLASH mode, just trim the last char.
-    WritePathStr(out, base::StringPiece(dir.value().data(),
-                                        dir.value().size() - 1));
+    WritePathStr(out,
+                 base::StringPiece(dir.value().data(), dir.value().size() - 1));
   }
 }
 
@@ -93,8 +93,7 @@
 void PathOutput::WriteDir(std::ostream& out,
                           const OutputFile& file,
                           DirSlashEnding slash_ending) const {
-  DCHECK(file.value().empty() ||
-         file.value()[file.value().size() - 1] == '/');
+  DCHECK(file.value().empty() || file.value()[file.value().size() - 1] == '/');
 
   switch (slash_ending) {
     case DIR_INCLUDE_LAST_SLASH:
@@ -122,9 +121,8 @@
   EscapeStringToStream(out, FilePathToUTF8(file), options_);
 }
 
-void PathOutput::WriteSourceRelativeString(
-    std::ostream& out,
-    const base::StringPiece& str) const {
+void PathOutput::WriteSourceRelativeString(std::ostream& out,
+                                           const base::StringPiece& str) const {
   if (options_.mode == ESCAPE_NINJA_COMMAND) {
     // Shell escaping needs an intermediate string since it may end up
     // quoting the whole thing.
@@ -134,8 +132,8 @@
                         inverse_current_dir_.size());
     intermediate.append(str.data(), str.size());
 
-    EscapeStringToStream(out,
-        base::StringPiece(intermediate.c_str(), intermediate.size()),
+    EscapeStringToStream(
+        out, base::StringPiece(intermediate.c_str(), intermediate.size()),
         options_);
   } else {
     // Ninja (and none) escaping can avoid the intermediate string and
@@ -158,8 +156,8 @@
   } else if (str.size() >= 2 && str[1] == '/') {
     WriteSourceRelativeString(out, str.substr(2));
   } else {
-    // Input begins with one slash, don't write the current directory since
-    // it's system-absolute.
+// Input begins with one slash, don't write the current directory since
+// it's system-absolute.
 #if defined(OS_WIN)
     // On Windows, trim the leading slash, since the input for absolute
     // paths will look like "/C:/foo/bar.txt".
diff --git a/tools/gn/path_output.h b/tools/gn/path_output.h
index ca72948..1d98a2c 100644
--- a/tools/gn/path_output.h
+++ b/tools/gn/path_output.h
@@ -34,7 +34,8 @@
     DIR_NO_LAST_SLASH,
   };
 
-  PathOutput(const SourceDir& current_dir, const base::StringPiece& source_root,
+  PathOutput(const SourceDir& current_dir,
+             const base::StringPiece& source_root,
              EscapingMode escaping);
   ~PathOutput();
 
diff --git a/tools/gn/path_output_unittest.cc b/tools/gn/path_output_unittest.cc
index 8ec593e..6dd2415 100644
--- a/tools/gn/path_output_unittest.cc
+++ b/tools/gn/path_output_unittest.cc
@@ -187,34 +187,29 @@
     // Output source root dir.
     {
       std::ostringstream out;
-      writer.WriteDir(out, SourceDir("//"),
-                      PathOutput::DIR_INCLUDE_LAST_SLASH);
+      writer.WriteDir(out, SourceDir("//"), PathOutput::DIR_INCLUDE_LAST_SLASH);
       EXPECT_EQ("../../", out.str());
     }
     {
       std::ostringstream out;
-      writer.WriteDir(out, SourceDir("//"),
-                      PathOutput::DIR_NO_LAST_SLASH);
+      writer.WriteDir(out, SourceDir("//"), PathOutput::DIR_NO_LAST_SLASH);
       EXPECT_EQ("../..", out.str());
     }
 
     // Output system root dir.
     {
       std::ostringstream out;
-      writer.WriteDir(out, SourceDir("/"),
-                      PathOutput::DIR_INCLUDE_LAST_SLASH);
+      writer.WriteDir(out, SourceDir("/"), PathOutput::DIR_INCLUDE_LAST_SLASH);
       EXPECT_EQ("/", out.str());
     }
     {
       std::ostringstream out;
-      writer.WriteDir(out, SourceDir("/"),
-                      PathOutput::DIR_INCLUDE_LAST_SLASH);
+      writer.WriteDir(out, SourceDir("/"), PathOutput::DIR_INCLUDE_LAST_SLASH);
       EXPECT_EQ("/", out.str());
     }
     {
       std::ostringstream out;
-      writer.WriteDir(out, SourceDir("/"),
-                      PathOutput::DIR_NO_LAST_SLASH);
+      writer.WriteDir(out, SourceDir("/"), PathOutput::DIR_NO_LAST_SLASH);
       EXPECT_EQ("/.", out.str());
     }
 
@@ -253,14 +248,12 @@
     }
     {
       std::ostringstream out;
-      writer.WriteDir(out, OutputFile("foo/"),
-                      PathOutput::DIR_NO_LAST_SLASH);
+      writer.WriteDir(out, OutputFile("foo/"), PathOutput::DIR_NO_LAST_SLASH);
       EXPECT_EQ("foo", out.str());
     }
     {
       std::ostringstream out;
-      writer.WriteDir(out, OutputFile(),
-                      PathOutput::DIR_INCLUDE_LAST_SLASH);
+      writer.WriteDir(out, OutputFile(), PathOutput::DIR_INCLUDE_LAST_SLASH);
       EXPECT_EQ("", out.str());
     }
   }
@@ -276,8 +269,7 @@
     }
     {
       std::ostringstream out;
-      root_writer.WriteDir(out, SourceDir("//"),
-                           PathOutput::DIR_NO_LAST_SLASH);
+      root_writer.WriteDir(out, SourceDir("//"), PathOutput::DIR_NO_LAST_SLASH);
       EXPECT_EQ(".", out.str());
     }
   }
diff --git a/tools/gn/pattern.cc b/tools/gn/pattern.cc
index 15bbf58..aff2ad9 100644
--- a/tools/gn/pattern.cc
+++ b/tools/gn/pattern.cc
@@ -55,8 +55,7 @@
 Pattern::Pattern(const std::string& s) {
   ParsePattern(s, &subranges_);
   is_suffix_ =
-      (subranges_.size() == 2 &&
-       subranges_[0].type == Subrange::ANYTHING &&
+      (subranges_.size() == 2 && subranges_[0].type == Subrange::ANYTHING &&
        subranges_[1].type == Subrange::LITERAL);
 }
 
diff --git a/tools/gn/pattern.h b/tools/gn/pattern.h
index f141f3e..ef29c62 100644
--- a/tools/gn/pattern.h
+++ b/tools/gn/pattern.h
@@ -16,15 +16,13 @@
  public:
   struct Subrange {
     enum Type {
-      LITERAL,  // Matches exactly the contents of the string.
-      ANYTHING,  // * (zero or more chars).
+      LITERAL,       // Matches exactly the contents of the string.
+      ANYTHING,      // * (zero or more chars).
       PATH_BOUNDARY  // '/' or beginning of string.
     };
 
     explicit Subrange(Type t, const std::string& l = std::string())
-        : type(t),
-          literal(l) {
-    }
+        : type(t), literal(l) {}
 
     // Returns the minimum number of chars that this subrange requires.
     size_t MinSize() const {
diff --git a/tools/gn/pattern_unittest.cc b/tools/gn/pattern_unittest.cc
index 2d14082..f39df1d 100644
--- a/tools/gn/pattern_unittest.cc
+++ b/tools/gn/pattern_unittest.cc
@@ -20,45 +20,45 @@
 
 TEST(Pattern, Matches) {
   Case pattern_cases[] = {
-    // Empty pattern matches only empty string.
-    { "", "", true },
-    { "", "foo", false },
-    // Exact matches.
-    { "foo", "foo", true },
-    { "foo", "bar", false },
-    // Path boundaries.
-    { "\\b", "", true },
-    { "\\b", "/", true },
-    { "\\b\\b", "/", true },
-    { "\\b\\b\\b", "", false },
-    { "\\b\\b\\b", "/", true },
-    { "\\b", "//", false },
-    { "\\bfoo\\b", "foo", true },
-    { "\\bfoo\\b", "/foo/", true },
-    { "\\b\\bfoo", "/foo", true },
-    // *
-    { "*", "", true },
-    { "*", "foo", true },
-    { "*foo", "foo", true },
-    { "*foo", "gagafoo", true },
-    { "*foo", "gagafoob", false },
-    { "foo*bar", "foobar", true },
-    { "foo*bar", "foo-bar", true },
-    { "foo*bar", "foolalalalabar", true },
-    { "foo*bar", "foolalalalabaz", false },
-    { "*a*b*c*d*", "abcd", true },
-    { "*a*b*c*d*", "1a2b3c4d5", true },
-    { "*a*b*c*d*", "1a2b3c45", false },
-    { "*\\bfoo\\b*", "foo", true },
-    { "*\\bfoo\\b*", "/foo/", true },
-    { "*\\bfoo\\b*", "foob", false },
-    { "*\\bfoo\\b*", "lala/foo/bar/baz", true },
+      // Empty pattern matches only empty string.
+      {"", "", true},
+      {"", "foo", false},
+      // Exact matches.
+      {"foo", "foo", true},
+      {"foo", "bar", false},
+      // Path boundaries.
+      {"\\b", "", true},
+      {"\\b", "/", true},
+      {"\\b\\b", "/", true},
+      {"\\b\\b\\b", "", false},
+      {"\\b\\b\\b", "/", true},
+      {"\\b", "//", false},
+      {"\\bfoo\\b", "foo", true},
+      {"\\bfoo\\b", "/foo/", true},
+      {"\\b\\bfoo", "/foo", true},
+      // *
+      {"*", "", true},
+      {"*", "foo", true},
+      {"*foo", "foo", true},
+      {"*foo", "gagafoo", true},
+      {"*foo", "gagafoob", false},
+      {"foo*bar", "foobar", true},
+      {"foo*bar", "foo-bar", true},
+      {"foo*bar", "foolalalalabar", true},
+      {"foo*bar", "foolalalalabaz", false},
+      {"*a*b*c*d*", "abcd", true},
+      {"*a*b*c*d*", "1a2b3c4d5", true},
+      {"*a*b*c*d*", "1a2b3c45", false},
+      {"*\\bfoo\\b*", "foo", true},
+      {"*\\bfoo\\b*", "/foo/", true},
+      {"*\\bfoo\\b*", "foob", false},
+      {"*\\bfoo\\b*", "lala/foo/bar/baz", true},
   };
   for (size_t i = 0; i < arraysize(pattern_cases); i++) {
     const Case& c = pattern_cases[i];
     Pattern pattern(c.pattern);
     bool result = pattern.MatchesString(c.candidate);
-    EXPECT_EQ(c.expected_match, result) << i << ": \"" << c.pattern
-        << "\", \"" << c.candidate << "\"";
+    EXPECT_EQ(c.expected_match, result)
+        << i << ": \"" << c.pattern << "\", \"" << c.candidate << "\"";
   }
 }
diff --git a/tools/gn/qt_creator_writer.cc b/tools/gn/qt_creator_writer.cc
index 687bff2..b43b7d6 100644
--- a/tools/gn/qt_creator_writer.cc
+++ b/tools/gn/qt_creator_writer.cc
@@ -28,7 +28,7 @@
 base::FilePath::CharType kSourcesFileSuffix[] = FILE_PATH_LITERAL(".files");
 base::FilePath::CharType kIncludesFileSuffix[] = FILE_PATH_LITERAL(".includes");
 base::FilePath::CharType kDefinesFileSuffix[] = FILE_PATH_LITERAL(".config");
-}
+}  // namespace
 
 // static
 bool QtCreatorWriter::RunAndWriteFile(const BuildSettings* build_settings,
@@ -43,8 +43,8 @@
     if (!base::CreateDirectoryAndGetError(project_dir, &error)) {
       *err =
           Err(Location(), "Could not create the QtCreator project directory '" +
-                              FilePathToUTF8(project_dir) + "': " +
-                              base::File::ErrorToString(error));
+                              FilePathToUTF8(project_dir) +
+                              "': " + base::File::ErrorToString(error));
       return false;
     }
   }
diff --git a/tools/gn/runtime_deps.cc b/tools/gn/runtime_deps.cc
index f0a242d..3477ce4 100644
--- a/tools/gn/runtime_deps.cc
+++ b/tools/gn/runtime_deps.cc
@@ -43,10 +43,9 @@
               const Target* source,
               RuntimeDepsVector* deps,
               std::set<OutputFile>* found_file) {
-  OutputFile output_file(RebasePath(
-      str,
-      source->settings()->build_settings()->build_dir(),
-      source->settings()->build_settings()->root_path_utf8()));
+  OutputFile output_file(
+      RebasePath(str, source->settings()->build_settings()->build_dir(),
+                 source->settings()->build_settings()->root_path_utf8()));
   AddIfNew(output_file, source, deps, found_file);
 }
 
@@ -88,10 +87,9 @@
     AddIfNew(file, target, deps, found_files);
 
   // Actions/copy have all outputs considered when the're a data dep.
-  if (is_target_data_dep &&
-      (target->output_type() == Target::ACTION ||
-       target->output_type() == Target::ACTION_FOREACH ||
-       target->output_type() == Target::COPY_FILES)) {
+  if (is_target_data_dep && (target->output_type() == Target::ACTION ||
+                             target->output_type() == Target::ACTION_FOREACH ||
+                             target->output_type() == Target::COPY_FILES)) {
     std::vector<SourceFile> outputs;
     target->action_values().GetOutputsAsSourceFiles(target, &outputs);
     for (const auto& output_file : outputs)
@@ -100,8 +98,8 @@
 
   // Data dependencies.
   for (const auto& dep_pair : target->data_deps()) {
-    RecursiveCollectRuntimeDeps(dep_pair.ptr, true,
-                                deps, seen_targets, found_files);
+    RecursiveCollectRuntimeDeps(dep_pair.ptr, true, deps, seen_targets,
+                                found_files);
   }
 
   // Do not recurse into bundle targets. A bundle's dependencies should be
@@ -124,8 +122,8 @@
       // unless it were listed in data deps.
       continue;
     }
-    RecursiveCollectRuntimeDeps(dep_pair.ptr, false,
-                                deps, seen_targets, found_files);
+    RecursiveCollectRuntimeDeps(dep_pair.ptr, false, deps, seen_targets,
+                                found_files);
   }
 }
 
@@ -144,18 +142,17 @@
   if (!base::ReadFileToString(UTF8ToFilePath(deps_target_list_file),
                               &list_contents)) {
     *err = Err(Location(),
-        std::string("File for --") + switches::kRuntimeDepsListFile +
-            " doesn't exist.",
-        "The file given was \"" + deps_target_list_file + "\"");
+               std::string("File for --") + switches::kRuntimeDepsListFile +
+                   " doesn't exist.",
+               "The file given was \"" + deps_target_list_file + "\"");
     return false;
   }
   load_trace.Done();
 
   SourceDir root_dir("//");
   Label default_toolchain_label = builder.loader()->GetDefaultToolchain();
-  for (const auto& line :
-       base::SplitString(list_contents, "\n", base::TRIM_WHITESPACE,
-                         base::SPLIT_WANT_ALL)) {
+  for (const auto& line : base::SplitString(
+           list_contents, "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) {
     if (line.empty())
       continue;
     Label label = Label::Resolve(root_dir, default_toolchain_label,
@@ -166,11 +163,14 @@
     const Item* item = builder.GetItem(label);
     const Target* target = item ? item->AsTarget() : nullptr;
     if (!target) {
-      *err = Err(Location(), "The label \"" + label.GetUserVisibleName(true) +
-          "\" isn't a target.",
-          "When reading the line:\n  " + line + "\n"
-          "from the --" + switches::kRuntimeDepsListFile + "=" +
-          deps_target_list_file);
+      *err =
+          Err(Location(),
+              "The label \"" + label.GetUserVisibleName(true) +
+                  "\" isn't a target.",
+              "When reading the line:\n  " + line +
+                  "\n"
+                  "from the --" +
+                  switches::kRuntimeDepsListFile + "=" + deps_target_list_file);
       return false;
     }
 
@@ -287,8 +287,8 @@
   // The initial target is not considered a data dependency so that actions's
   // outputs (if the current target is an action) are not automatically
   // considered data deps.
-  RecursiveCollectRuntimeDeps(target, false,
-                              &result, &seen_targets, &found_files);
+  RecursiveCollectRuntimeDeps(target, false, &result, &seen_targets,
+                              &found_files);
   return result;
 }
 
diff --git a/tools/gn/runtime_deps_unittest.cc b/tools/gn/runtime_deps_unittest.cc
index 1595862..20ecd03 100644
--- a/tools/gn/runtime_deps_unittest.cc
+++ b/tools/gn/runtime_deps_unittest.cc
@@ -238,8 +238,7 @@
   Target dep(setup.settings(), Label(SourceDir("//"), "dep"));
   InitTargetWithType(setup, &dep, Target::ACTION);
   dep.data().push_back("//dep.data");
-  dep.action_values().outputs() =
-      SubstitutionList::MakeForTest("//dep.output");
+  dep.action_values().outputs() = SubstitutionList::MakeForTest("//dep.output");
   ASSERT_TRUE(dep.OnResolved(&err));
 
   Target dep_copy(setup.settings(), Label(SourceDir("//"), "dep_copy"));
@@ -431,8 +430,8 @@
 
   // Should fail for garbage inputs.
   err = Err();
-  EXPECT_FALSE(setup.ExecuteSnippet(
-      "group(\"foo\") { write_runtime_deps = 0 }", &err));
+  EXPECT_FALSE(
+      setup.ExecuteSnippet("group(\"foo\") { write_runtime_deps = 0 }", &err));
 
   // Should be able to write inside the out dir, and shouldn't write the one
   // in the else clause.
@@ -442,7 +441,8 @@
       "  group(\"foo\") { write_runtime_deps = \"//out/Debug/foo.txt\" }\n"
       "} else {\n"
       "  group(\"bar\") { write_runtime_deps = \"//out/Debug/bar.txt\" }\n"
-      "}", &err));
+      "}",
+      &err));
   EXPECT_EQ(1U, setup.items().size());
   EXPECT_EQ(1U, scheduler().GetWriteRuntimeDepsTargets().size());
 }
diff --git a/tools/gn/scheduler.cc b/tools/gn/scheduler.cc
index 0ab9c22..8da3035 100644
--- a/tools/gn/scheduler.cc
+++ b/tools/gn/scheduler.cc
@@ -10,9 +10,7 @@
 #include "tools/gn/standard_out.h"
 #include "tools/gn/target.h"
 
-namespace {
-
-}  // namespace
+namespace {}  // namespace
 
 Scheduler* g_scheduler = nullptr;
 
@@ -124,8 +122,8 @@
   return false;
 }
 
-std::multimap<SourceFile, const Target*>
-    Scheduler::GetUnknownGeneratedInputs() const {
+std::multimap<SourceFile, const Target*> Scheduler::GetUnknownGeneratedInputs()
+    const {
   base::AutoLock lock(lock_);
 
   // Remove all unknown inputs that were written files. These are OK as inputs
diff --git a/tools/gn/scope.cc b/tools/gn/scope.cc
index 145d6ad..2368356 100644
--- a/tools/gn/scope.cc
+++ b/tools/gn/scope.cc
@@ -141,7 +141,7 @@
 }
 
 const Value* Scope::GetValue(const base::StringPiece& ident) const {
-  const Scope *found_in_scope = nullptr;
+  const Scope* found_in_scope = nullptr;
   return GetValueWithScope(ident, &found_in_scope);
 }
 
@@ -256,12 +256,12 @@
       const BinaryOpNode* binary = pair.second.value.origin()->AsBinaryOp();
       if (binary && binary->op().type() == Token::EQUAL) {
         // Make a nicer error message for normal var sets.
-        *err = Err(binary->left()->GetRange(), "Assignment had no effect.",
-                   help);
+        *err =
+            Err(binary->left()->GetRange(), "Assignment had no effect.", help);
       } else {
         // This will happen for internally-generated variables.
-        *err = Err(pair.second.value.origin(), "Assignment had no effect.",
-                   help);
+        *err =
+            Err(pair.second.value.origin(), "Assignment had no effect.", help);
       }
       return false;
     }
diff --git a/tools/gn/scope.h b/tools/gn/scope.h
index 1ae120f..10219c0 100644
--- a/tools/gn/scope.h
+++ b/tools/gn/scope.h
@@ -8,9 +8,9 @@
 #include <map>
 #include <memory>
 #include <set>
+#include <unordered_map>
 #include <utility>
 #include <vector>
-#include <unordered_map>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
@@ -45,10 +45,7 @@
 
   // A flag to indicate whether a function should recurse into nested scopes,
   // or only operate on the current scope.
-  enum SearchNested {
-    SEARCH_NESTED,
-    SEARCH_CURRENT
-  };
+  enum SearchNested { SEARCH_NESTED, SEARCH_CURRENT };
 
   // Allows code to provide values for built-in variables. This class will
   // automatically register itself on construction and deregister itself on
@@ -139,8 +136,7 @@
   // found_in_scope is set to the scope that contains the definition of the
   // ident. If the value was provided programmatically (like host_cpu),
   // found_in_scope will be set to null.
-  const Value* GetValue(const base::StringPiece& ident,
-                        bool counts_as_used);
+  const Value* GetValue(const base::StringPiece& ident, bool counts_as_used);
   const Value* GetValue(const base::StringPiece& ident) const;
   const Value* GetValueWithScope(const base::StringPiece& ident,
                                  const Scope** found_in_scope) const;
@@ -375,7 +371,7 @@
   std::unique_ptr<PatternList> sources_assignment_filter_;
 
   // Owning pointers, must be deleted.
-  typedef std::map<std::string, scoped_refptr<const Template> > TemplateMap;
+  typedef std::map<std::string, scoped_refptr<const Template>> TemplateMap;
   TemplateMap templates_;
 
   ItemVector* item_collector_;
diff --git a/tools/gn/scope_per_file_provider.cc b/tools/gn/scope_per_file_provider.cc
index a577129..d7d11af 100644
--- a/tools/gn/scope_per_file_provider.cc
+++ b/tools/gn/scope_per_file_provider.cc
@@ -12,11 +12,8 @@
 #include "tools/gn/value.h"
 #include "tools/gn/variables.h"
 
-ScopePerFileProvider::ScopePerFileProvider(Scope* scope,
-                                           bool allow_target_vars)
-    : ProgrammaticProvider(scope),
-      allow_target_vars_(allow_target_vars) {
-}
+ScopePerFileProvider::ScopePerFileProvider(Scope* scope, bool allow_target_vars)
+    : ProgrammaticProvider(scope), allow_target_vars_(allow_target_vars) {}
 
 ScopePerFileProvider::~ScopePerFileProvider() = default;
 
diff --git a/tools/gn/scope_per_file_provider_unittest.cc b/tools/gn/scope_per_file_provider_unittest.cc
index dc4a10e..f7b3b1a 100644
--- a/tools/gn/scope_per_file_provider_unittest.cc
+++ b/tools/gn/scope_per_file_provider_unittest.cc
@@ -2,9 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "tools/gn/scope_per_file_provider.h"
 #include "test/test.h"
 #include "tools/gn/build_settings.h"
-#include "tools/gn/scope_per_file_provider.h"
 #include "tools/gn/settings.h"
 #include "tools/gn/test_with_scope.h"
 #include "tools/gn/toolchain.h"
@@ -22,13 +22,13 @@
     scope.set_source_dir(SourceDir("//source/"));
     ScopePerFileProvider provider(&scope, true);
 
-    EXPECT_EQ("//toolchain:default",    GPV(variables::kCurrentToolchain));
+    EXPECT_EQ("//toolchain:default", GPV(variables::kCurrentToolchain));
     // TODO(brettw) this test harness does not set up the Toolchain manager
     // which is the source of this value, so we can't test this yet.
-    //EXPECT_EQ("//toolchain:default",    GPV(variables::kDefaultToolchain));
-    EXPECT_EQ("//out/Debug",            GPV(variables::kRootBuildDir));
-    EXPECT_EQ("//out/Debug/gen",        GPV(variables::kRootGenDir));
-    EXPECT_EQ("//out/Debug",            GPV(variables::kRootOutDir));
+    // EXPECT_EQ("//toolchain:default",    GPV(variables::kDefaultToolchain));
+    EXPECT_EQ("//out/Debug", GPV(variables::kRootBuildDir));
+    EXPECT_EQ("//out/Debug/gen", GPV(variables::kRootGenDir));
+    EXPECT_EQ("//out/Debug", GPV(variables::kRootOutDir));
     EXPECT_EQ("//out/Debug/gen/source", GPV(variables::kTargetGenDir));
     EXPECT_EQ("//out/Debug/obj/source", GPV(variables::kTargetOutDir));
   }
@@ -43,12 +43,12 @@
     scope.set_source_dir(SourceDir("//source/"));
     ScopePerFileProvider provider(&scope, true);
 
-    EXPECT_EQ("//toolchain:tc",            GPV(variables::kCurrentToolchain));
+    EXPECT_EQ("//toolchain:tc", GPV(variables::kCurrentToolchain));
     // See above.
-    //EXPECT_EQ("//toolchain:default",       GPV(variables::kDefaultToolchain));
-    EXPECT_EQ("//out/Debug",               GPV(variables::kRootBuildDir));
-    EXPECT_EQ("//out/Debug/tc/gen",        GPV(variables::kRootGenDir));
-    EXPECT_EQ("//out/Debug/tc",            GPV(variables::kRootOutDir));
+    // EXPECT_EQ("//toolchain:default", GPV(variables::kDefaultToolchain));
+    EXPECT_EQ("//out/Debug", GPV(variables::kRootBuildDir));
+    EXPECT_EQ("//out/Debug/tc/gen", GPV(variables::kRootGenDir));
+    EXPECT_EQ("//out/Debug/tc", GPV(variables::kRootOutDir));
     EXPECT_EQ("//out/Debug/tc/gen/source", GPV(variables::kTargetGenDir));
     EXPECT_EQ("//out/Debug/tc/obj/source", GPV(variables::kTargetOutDir));
   }
diff --git a/tools/gn/scope_unittest.cc b/tools/gn/scope_unittest.cc
index 6075851..c5c5521 100644
--- a/tools/gn/scope_unittest.cc
+++ b/tools/gn/scope_unittest.cc
@@ -50,7 +50,7 @@
   // given value.
   InputFile input_file(SourceFile("//foo"));
   Token assignment_token(Location(&input_file, 1, 1, 1), Token::STRING,
-      "\"hello\"");
+                         "\"hello\"");
   LiteralNode assignment;
   assignment.set_value(assignment_token);
 
@@ -76,8 +76,7 @@
 
     Err err;
     EXPECT_FALSE(setup.scope()->NonRecursiveMergeTo(
-        &new_scope, Scope::MergeOptions(),
-        &assignment, "error", &err));
+        &new_scope, Scope::MergeOptions(), &assignment, "error", &err));
     EXPECT_TRUE(err.has_error());
   }
 
@@ -104,8 +103,8 @@
     Err err;
     Scope::MergeOptions options;
     options.clobber_existing = true;
-    EXPECT_TRUE(setup.scope()->NonRecursiveMergeTo(
-        &new_scope, options, &assignment, "error", &err));
+    EXPECT_TRUE(setup.scope()->NonRecursiveMergeTo(&new_scope, options,
+                                                   &assignment, "error", &err));
     EXPECT_FALSE(err.has_error());
 
     const Value* found_value = new_scope.GetValue("v");
@@ -124,8 +123,8 @@
     options.clobber_existing = true;
 
     Err err;
-    EXPECT_TRUE(setup.scope()->NonRecursiveMergeTo(
-        &new_scope, options, &assignment, "error", &err));
+    EXPECT_TRUE(setup.scope()->NonRecursiveMergeTo(&new_scope, options,
+                                                   &assignment, "error", &err));
     EXPECT_FALSE(err.has_error());
 
     const Template* found_value = new_scope.GetTemplate("templ");
@@ -178,8 +177,8 @@
     Err err;
     Scope::MergeOptions options;
     options.skip_private_vars = true;
-    EXPECT_TRUE(setup.scope()->NonRecursiveMergeTo(
-        &new_scope, options, &assignment, "error", &err));
+    EXPECT_TRUE(setup.scope()->NonRecursiveMergeTo(&new_scope, options,
+                                                   &assignment, "error", &err));
     EXPECT_FALSE(err.has_error());
     EXPECT_FALSE(new_scope.GetValue(private_var_name));
     EXPECT_FALSE(new_scope.GetTemplate("_templ"));
@@ -191,8 +190,8 @@
 
     Err err;
     Scope::MergeOptions options;
-    EXPECT_TRUE(setup.scope()->NonRecursiveMergeTo(
-        &new_scope, options, &assignment, "error", &err));
+    EXPECT_TRUE(setup.scope()->NonRecursiveMergeTo(&new_scope, options,
+                                                   &assignment, "error", &err));
     EXPECT_FALSE(err.has_error());
     EXPECT_FALSE(new_scope.CheckForUnusedVars(&err));
     EXPECT_TRUE(err.has_error());
@@ -205,8 +204,8 @@
     Err err;
     Scope::MergeOptions options;
     options.mark_dest_used = true;
-    EXPECT_TRUE(setup.scope()->NonRecursiveMergeTo(
-        &new_scope, options, &assignment, "error", &err));
+    EXPECT_TRUE(setup.scope()->NonRecursiveMergeTo(&new_scope, options,
+                                                   &assignment, "error", &err));
     EXPECT_FALSE(err.has_error());
     EXPECT_TRUE(new_scope.CheckForUnusedVars(&err));
     EXPECT_FALSE(err.has_error());
@@ -239,11 +238,11 @@
   // given value.
   InputFile input_file(SourceFile("//foo"));
   Token assignment_token(Location(&input_file, 1, 1, 1), Token::STRING,
-      "\"hello\"");
+                         "\"hello\"");
   LiteralNode assignment;
   assignment.set_value(assignment_token);
   setup.scope()->SetValue("on_root", Value(&assignment, "on_root"),
-                           &assignment);
+                          &assignment);
 
   // Root scope should be const from the nested caller's perspective.
   Scope nested1(static_cast<const Scope*>(setup.scope()));
@@ -255,7 +254,7 @@
 
   // Making a closure from the root scope.
   std::unique_ptr<Scope> result = setup.scope()->MakeClosure();
-  EXPECT_FALSE(result->containing());  // Should have no containing scope.
+  EXPECT_FALSE(result->containing());        // Should have no containing scope.
   EXPECT_TRUE(result->GetValue("on_root"));  // Value should be copied.
 
   // Making a closure from the second nested scope.
@@ -274,7 +273,7 @@
   // given value.
   InputFile input_file(SourceFile("//foo"));
   Token assignment_token(Location(&input_file, 1, 1, 1), Token::STRING,
-      "\"hello\"");
+                         "\"hello\"");
   LiteralNode assignment;
   assignment.set_value(assignment_token);
 
@@ -299,12 +298,12 @@
 
   // Check getting root scope values.
   EXPECT_TRUE(mutable_scope2.GetValue(kOnConst, true));
-  EXPECT_FALSE(mutable_scope2.GetMutableValue(
-      kOnConst, Scope::SEARCH_NESTED, true));
+  EXPECT_FALSE(
+      mutable_scope2.GetMutableValue(kOnConst, Scope::SEARCH_NESTED, true));
 
   // Test reading a value from scope 1.
-  Value* mutable1_result = mutable_scope2.GetMutableValue(
-      kOnMutable1, Scope::SEARCH_NESTED, false);
+  Value* mutable1_result =
+      mutable_scope2.GetMutableValue(kOnMutable1, Scope::SEARCH_NESTED, false);
   ASSERT_TRUE(mutable1_result);
   EXPECT_TRUE(*mutable1_result == value);
 
@@ -312,15 +311,15 @@
   // used in the previous step).
   Err err;
   EXPECT_FALSE(mutable_scope1.CheckForUnusedVars(&err));
-  mutable1_result = mutable_scope2.GetMutableValue(
-      kOnMutable1, Scope::SEARCH_NESTED, true);
+  mutable1_result =
+      mutable_scope2.GetMutableValue(kOnMutable1, Scope::SEARCH_NESTED, true);
   EXPECT_TRUE(mutable1_result);
   err = Err();
   EXPECT_TRUE(mutable_scope1.CheckForUnusedVars(&err));
 
   // Test reading a value from scope 2.
-  Value* mutable2_result = mutable_scope2.GetMutableValue(
-      kOnMutable2, Scope::SEARCH_NESTED, true);
+  Value* mutable2_result =
+      mutable_scope2.GetMutableValue(kOnMutable2, Scope::SEARCH_NESTED, true);
   ASSERT_TRUE(mutable2_result);
   EXPECT_TRUE(*mutable2_result == value);
 }
diff --git a/tools/gn/settings.h b/tools/gn/settings.h
index 91f6410..f0a6691 100644
--- a/tools/gn/settings.h
+++ b/tools/gn/settings.h
@@ -66,9 +66,7 @@
   }
 
   // Directory for generated files.
-  const SourceDir& toolchain_gen_dir() const {
-    return toolchain_gen_dir_;
-  }
+  const SourceDir& toolchain_gen_dir() const { return toolchain_gen_dir_; }
 
   // The import manager caches the result of executing imported files in the
   // context of a given settings object.
@@ -84,9 +82,7 @@
   // means that only targets that have a dependency from (directly or
   // indirectly) some magic root node are actually generated. See the comments
   // on ItemTree for more.
-  bool greedy_target_generation() const {
-    return greedy_target_generation_;
-  }
+  bool greedy_target_generation() const { return greedy_target_generation_; }
   void set_greedy_target_generation(bool gtg) {
     greedy_target_generation_ = gtg;
   }
diff --git a/tools/gn/setup.cc b/tools/gn/setup.cc
index 20b3a6f..726b037 100644
--- a/tools/gn/setup.cc
+++ b/tools/gn/setup.cc
@@ -447,8 +447,9 @@
       return false;
     }
     err.PrintNonfatalToStdout();
-    OutputString("\nThe build continued as if that argument was "
-                 "unspecified.\n\n");
+    OutputString(
+        "\nThe build continued as if that argument was "
+        "unspecified.\n\n");
     return true;
   }
 
@@ -462,8 +463,8 @@
       to_check = all_targets;
     }
 
-    if (!commands::CheckPublicHeaders(&build_settings_, all_targets,
-                                      to_check, false)) {
+    if (!commands::CheckPublicHeaders(&build_settings_, all_targets, to_check,
+                                      false)) {
       return false;
     }
   }
@@ -580,10 +581,10 @@
   base::ReplaceSubstringsAfterOffset(&contents, 0, "\n", "\r\n");
 #endif
   if (base::WriteFile(build_arg_file, contents.c_str(),
-      static_cast<int>(contents.size())) == -1) {
+                      static_cast<int>(contents.size())) == -1) {
     Err(Location(), "Args file could not be written.",
-      "The file is \"" + FilePathToUTF8(build_arg_file) +
-        "\"").PrintToStdout();
+        "The file is \"" + FilePathToUTF8(build_arg_file) + "\"")
+        .PrintToStdout();
     return false;
   }
 
@@ -606,7 +607,8 @@
     if (root_path.empty()) {
       Err(Location(), "Root source path not found.",
           "The path \"" + FilePathToUTF8(relative_root_path) +
-          "\" doesn't exist.").PrintToStdout();
+              "\" doesn't exist.")
+          .PrintToStdout();
       return false;
     }
 
@@ -622,7 +624,8 @@
       if (dotfile_name_.empty()) {
         Err(Location(), "Could not load dotfile.",
             "The file \"" + FilePathToUTF8(dot_file_path) +
-            "\" couldn't be loaded.").PrintToStdout();
+                "\" couldn't be loaded.")
+            .PrintToStdout();
         return false;
       }
     }
@@ -646,7 +649,8 @@
   if (root_realpath.empty()) {
     Err(Location(), "Can't get the real root path.",
         "I could not get the real path of \"" + FilePathToUTF8(root_path) +
-        "\".").PrintToStdout();
+            "\".")
+        .PrintToStdout();
     return false;
   }
   if (scheduler_.verbose_logging())
@@ -659,9 +663,9 @@
 bool Setup::FillBuildDir(const std::string& build_dir, bool require_exists) {
   Err err;
   SourceDir resolved =
-      SourceDirForCurrentDirectory(build_settings_.root_path()).
-    ResolveRelativeDir(Value(nullptr, build_dir), &err,
-        build_settings_.root_path_utf8());
+      SourceDirForCurrentDirectory(build_settings_.root_path())
+          .ResolveRelativeDir(Value(nullptr, build_dir), &err,
+                              build_settings_.root_path_utf8());
   if (err.has_error()) {
     err.PrintToStdout();
     return false;
@@ -671,7 +675,8 @@
   if (!base::CreateDirectory(build_dir_path)) {
     Err(Location(), "Can't create the build dir.",
         "I could not create the build dir \"" + FilePathToUTF8(build_dir_path) +
-        "\".").PrintToStdout();
+            "\".")
+        .PrintToStdout();
     return false;
   }
   base::FilePath build_dir_realpath =
@@ -679,23 +684,23 @@
   if (build_dir_realpath.empty()) {
     Err(Location(), "Can't get the real build dir path.",
         "I could not get the real path of \"" + FilePathToUTF8(build_dir_path) +
-        "\".").PrintToStdout();
+            "\".")
+        .PrintToStdout();
     return false;
   }
-  resolved = SourceDirForPath(build_settings_.root_path(),
-                              build_dir_realpath);
+  resolved = SourceDirForPath(build_settings_.root_path(), build_dir_realpath);
 
   if (scheduler_.verbose_logging())
     scheduler_.Log("Using build dir", resolved.value());
 
   if (require_exists) {
-    if (!base::PathExists(build_dir_path.Append(
-            FILE_PATH_LITERAL("build.ninja")))) {
+    if (!base::PathExists(
+            build_dir_path.Append(FILE_PATH_LITERAL("build.ninja")))) {
       Err(Location(), "Not a build directory.",
           "This command requires an existing build directory. I interpreted "
-          "your input\n\"" + build_dir + "\" as:\n  " +
-          FilePathToUTF8(build_dir_path) +
-          "\nwhich doesn't seem to contain a previously-generated build.")
+          "your input\n\"" +
+              build_dir + "\" as:\n  " + FilePathToUTF8(build_dir_path) +
+              "\nwhich doesn't seem to contain a previously-generated build.")
           .PrintToStdout();
       return false;
     }
@@ -724,8 +729,9 @@
 #if defined(OS_WIN)
     base::FilePath python_path = FindWindowsPython();
     if (python_path.empty()) {
-      scheduler_.Log("WARNING", "Could not find python on path, using "
-          "just \"python.exe\"");
+      scheduler_.Log("WARNING",
+                     "Could not find python on path, using "
+                     "just \"python.exe\"");
       python_path = base::FilePath(kPythonExeName);
     }
     build_settings_.set_python_path(python_path.NormalizePathSeparatorsTo('/'));
@@ -812,8 +818,10 @@
       dotfile_scope_.GetValue("buildconfig", true);
   if (!build_config_value) {
     Err(Location(), "No build config file.",
-        "Your .gn file (\"" + FilePathToUTF8(dotfile_name_) + "\")\n"
-        "didn't specify a \"buildconfig\" value.").PrintToStdout();
+        "Your .gn file (\"" + FilePathToUTF8(dotfile_name_) +
+            "\")\n"
+            "didn't specify a \"buildconfig\" value.")
+        .PrintToStdout();
     return false;
   } else if (!build_config_value->VerifyTypeIs(Value::STRING, &err)) {
     err.PrintToStdout();
diff --git a/tools/gn/setup.h b/tools/gn/setup.h
index 08bb11b..13d0da5 100644
--- a/tools/gn/setup.h
+++ b/tools/gn/setup.h
@@ -70,9 +70,7 @@
 
   // After a successful run, setting this will additionally cause the public
   // headers to be checked. Defaults to false.
-  void set_check_public_headers(bool s) {
-    check_public_headers_ = s;
-  }
+  void set_check_public_headers(bool s) { check_public_headers_ = s; }
 
   // Read from the .gn file, these are the targets to check. If the .gn file
   // does not specify anything, this will be null. If the .gn file specifies
diff --git a/tools/gn/source_dir.cc b/tools/gn/source_dir.cc
index 31f9582..1fcecfa 100644
--- a/tools/gn/source_dir.cc
+++ b/tools/gn/source_dir.cc
@@ -59,8 +59,7 @@
 
 SourceDir::SourceDir() = default;
 
-SourceDir::SourceDir(const base::StringPiece& p)
-    : value_(p.data(), p.size()) {
+SourceDir::SourceDir(const base::StringPiece& p) : value_(p.data(), p.size()) {
   if (!EndsWithSlash(value_))
     value_.push_back('/');
   AssertValueSourceDirString(value_);
diff --git a/tools/gn/source_dir.h b/tools/gn/source_dir.h
index 8b407b5..5c1621b 100644
--- a/tools/gn/source_dir.h
+++ b/tools/gn/source_dir.h
@@ -105,9 +105,7 @@
 
   // Returns true if this path starts with a single slash which indicates a
   // system-absolute path.
-  bool is_system_absolute() const {
-    return !is_source_absolute();
-  }
+  bool is_system_absolute() const { return !is_source_absolute(); }
 
   // Returns a source-absolute path starting with only one slash at the
   // beginning (normally source-absolute paths start with two slashes to mark
@@ -126,16 +124,10 @@
   bool operator==(const SourceDir& other) const {
     return value_ == other.value_;
   }
-  bool operator!=(const SourceDir& other) const {
-    return !operator==(other);
-  }
-  bool operator<(const SourceDir& other) const {
-    return value_ < other.value_;
-  }
+  bool operator!=(const SourceDir& other) const { return !operator==(other); }
+  bool operator<(const SourceDir& other) const { return value_ < other.value_; }
 
-  void swap(SourceDir& other) {
-    value_.swap(other.value_);
-  }
+  void swap(SourceDir& other) { value_.swap(other.value_); }
 
  private:
   friend class SourceFile;
@@ -146,7 +138,8 @@
 
 namespace std {
 
-template<> struct hash<SourceDir> {
+template <>
+struct hash<SourceDir> {
   std::size_t operator()(const SourceDir& v) const {
     hash<std::string> h;
     return h(v.value());
diff --git a/tools/gn/source_dir_unittest.cc b/tools/gn/source_dir_unittest.cc
index 0fd1e79..e4a1950 100644
--- a/tools/gn/source_dir_unittest.cc
+++ b/tools/gn/source_dir_unittest.cc
@@ -2,10 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "tools/gn/source_dir.h"
 #include "build_config.h"
 #include "test/test.h"
 #include "tools/gn/err.h"
-#include "tools/gn/source_dir.h"
 #include "tools/gn/source_file.h"
 #include "tools/gn/value.h"
 
@@ -19,83 +19,85 @@
 #endif
 
   // Empty input is an error.
-  EXPECT_TRUE(base.ResolveRelativeFile(
-      Value(nullptr, std::string()), &err, source_root) == SourceFile());
+  EXPECT_TRUE(base.ResolveRelativeFile(Value(nullptr, std::string()), &err,
+                                       source_root) == SourceFile());
   EXPECT_TRUE(err.has_error());
 
   // These things are directories, so should be an error.
   err = Err();
-  EXPECT_TRUE(base.ResolveRelativeFile(
-      Value(nullptr, "//foo/bar/"), &err, source_root) == SourceFile());
+  EXPECT_TRUE(base.ResolveRelativeFile(Value(nullptr, "//foo/bar/"), &err,
+                                       source_root) == SourceFile());
   EXPECT_TRUE(err.has_error());
 
   err = Err();
-  EXPECT_TRUE(base.ResolveRelativeFile(
-      Value(nullptr, "bar/"), &err, source_root) == SourceFile());
+  EXPECT_TRUE(base.ResolveRelativeFile(Value(nullptr, "bar/"), &err,
+                                       source_root) == SourceFile());
   EXPECT_TRUE(err.has_error());
 
   // Absolute paths should be passed unchanged.
   err = Err();
-  EXPECT_TRUE(base.ResolveRelativeFile(
-      Value(nullptr, "//foo"), &err, source_root) == SourceFile("//foo"));
+  EXPECT_TRUE(base.ResolveRelativeFile(Value(nullptr, "//foo"), &err,
+                                       source_root) == SourceFile("//foo"));
   EXPECT_FALSE(err.has_error());
 
-  EXPECT_TRUE(base.ResolveRelativeFile(
-      Value(nullptr, "/foo"), &err, source_root) == SourceFile("/foo"));
+  EXPECT_TRUE(base.ResolveRelativeFile(Value(nullptr, "/foo"), &err,
+                                       source_root) == SourceFile("/foo"));
   EXPECT_FALSE(err.has_error());
 
   // Basic relative stuff.
-  EXPECT_TRUE(base.ResolveRelativeFile(
-      Value(nullptr, "foo"), &err, source_root) == SourceFile("//base/foo"));
+  EXPECT_TRUE(
+      base.ResolveRelativeFile(Value(nullptr, "foo"), &err, source_root) ==
+      SourceFile("//base/foo"));
   EXPECT_FALSE(err.has_error());
-  EXPECT_TRUE(base.ResolveRelativeFile(
-      Value(nullptr, "./foo"), &err, source_root) == SourceFile("//base/foo"));
+  EXPECT_TRUE(
+      base.ResolveRelativeFile(Value(nullptr, "./foo"), &err, source_root) ==
+      SourceFile("//base/foo"));
   EXPECT_FALSE(err.has_error());
-  EXPECT_TRUE(base.ResolveRelativeFile(
-      Value(nullptr, "../foo"), &err, source_root) == SourceFile("//foo"));
+  EXPECT_TRUE(base.ResolveRelativeFile(Value(nullptr, "../foo"), &err,
+                                       source_root) == SourceFile("//foo"));
   EXPECT_FALSE(err.has_error());
 
-  // If the given relative path points outside the source root, we
-  // expect an absolute path.
+// If the given relative path points outside the source root, we
+// expect an absolute path.
 #if defined(OS_WIN)
-  EXPECT_TRUE(base.ResolveRelativeFile(
-          Value(nullptr, "../../foo"), &err, source_root) ==
+  EXPECT_TRUE(base.ResolveRelativeFile(Value(nullptr, "../../foo"), &err,
+                                       source_root) ==
+              SourceFile("/C:/source/foo"));
+  EXPECT_FALSE(err.has_error());
+
+  EXPECT_TRUE(
+      base.ResolveRelativeFile(Value(nullptr, "//../foo"), &err, source_root) ==
       SourceFile("/C:/source/foo"));
   EXPECT_FALSE(err.has_error());
 
-  EXPECT_TRUE(base.ResolveRelativeFile(
-          Value(nullptr, "//../foo"), &err, source_root) ==
-      SourceFile("/C:/source/foo"));
+  EXPECT_TRUE(base.ResolveRelativeFile(Value(nullptr, "//../root/foo"), &err,
+                                       source_root) ==
+              SourceFile("/C:/source/root/foo"));
   EXPECT_FALSE(err.has_error());
 
-  EXPECT_TRUE(base.ResolveRelativeFile(
-          Value(nullptr, "//../root/foo"), &err, source_root) ==
-      SourceFile("/C:/source/root/foo"));
-  EXPECT_FALSE(err.has_error());
-
-  EXPECT_TRUE(base.ResolveRelativeFile(
-          Value(nullptr, "//../../../foo/bar"), &err, source_root) ==
-      SourceFile("/foo/bar"));
+  EXPECT_TRUE(base.ResolveRelativeFile(Value(nullptr, "//../../../foo/bar"),
+                                       &err,
+                                       source_root) == SourceFile("/foo/bar"));
   EXPECT_FALSE(err.has_error());
 #else
-  EXPECT_TRUE(base.ResolveRelativeFile(
-          Value(nullptr, "../../foo"), &err, source_root) ==
+  EXPECT_TRUE(base.ResolveRelativeFile(Value(nullptr, "../../foo"), &err,
+                                       source_root) ==
+              SourceFile("/source/foo"));
+  EXPECT_FALSE(err.has_error());
+
+  EXPECT_TRUE(
+      base.ResolveRelativeFile(Value(nullptr, "//../foo"), &err, source_root) ==
       SourceFile("/source/foo"));
   EXPECT_FALSE(err.has_error());
 
-  EXPECT_TRUE(base.ResolveRelativeFile(
-          Value(nullptr, "//../foo"), &err, source_root) ==
-      SourceFile("/source/foo"));
+  EXPECT_TRUE(base.ResolveRelativeFile(Value(nullptr, "//../root/foo"), &err,
+                                       source_root) ==
+              SourceFile("/source/root/foo"));
   EXPECT_FALSE(err.has_error());
 
-  EXPECT_TRUE(base.ResolveRelativeFile(
-          Value(nullptr, "//../root/foo"), &err, source_root) ==
-      SourceFile("/source/root/foo"));
-  EXPECT_FALSE(err.has_error());
-
-  EXPECT_TRUE(base.ResolveRelativeFile(
-          Value(nullptr, "//../../../foo/bar"), &err, source_root) ==
-      SourceFile("/foo/bar"));
+  EXPECT_TRUE(base.ResolveRelativeFile(Value(nullptr, "//../../../foo/bar"),
+                                       &err,
+                                       source_root) == SourceFile("/foo/bar"));
   EXPECT_FALSE(err.has_error());
 #endif
 
@@ -103,9 +105,9 @@
   // Note that we don't canonicalize the backslashes to forward slashes.
   // This could potentially be changed in the future which would mean we should
   // just change the expected result.
-  EXPECT_TRUE(base.ResolveRelativeFile(
-          Value(nullptr, "C:\\foo\\bar.txt"), &err, source_root) ==
-      SourceFile("/C:/foo/bar.txt"));
+  EXPECT_TRUE(base.ResolveRelativeFile(Value(nullptr, "C:\\foo\\bar.txt"), &err,
+                                       source_root) ==
+              SourceFile("/C:/foo/bar.txt"));
   EXPECT_FALSE(err.has_error());
 #endif
 }
@@ -120,68 +122,66 @@
 #endif
 
   // Empty input is an error.
-  EXPECT_TRUE(base.ResolveRelativeDir(
-      Value(nullptr, std::string()), &err, source_root) == SourceDir());
+  EXPECT_TRUE(base.ResolveRelativeDir(Value(nullptr, std::string()), &err,
+                                      source_root) == SourceDir());
   EXPECT_TRUE(err.has_error());
 
   // Absolute paths should be passed unchanged.
   err = Err();
-  EXPECT_TRUE(base.ResolveRelativeDir(
-      Value(nullptr, "//foo"), &err, source_root) == SourceDir("//foo/"));
+  EXPECT_TRUE(base.ResolveRelativeDir(Value(nullptr, "//foo"), &err,
+                                      source_root) == SourceDir("//foo/"));
   EXPECT_FALSE(err.has_error());
-  EXPECT_TRUE(base.ResolveRelativeDir(
-      Value(nullptr, "/foo"), &err, source_root) == SourceDir("/foo/"));
+  EXPECT_TRUE(base.ResolveRelativeDir(Value(nullptr, "/foo"), &err,
+                                      source_root) == SourceDir("/foo/"));
   EXPECT_FALSE(err.has_error());
 
   // Basic relative stuff.
-  EXPECT_TRUE(base.ResolveRelativeDir(
-      Value(nullptr, "foo"), &err, source_root) == SourceDir("//base/foo/"));
+  EXPECT_TRUE(base.ResolveRelativeDir(Value(nullptr, "foo"), &err,
+                                      source_root) == SourceDir("//base/foo/"));
   EXPECT_FALSE(err.has_error());
-  EXPECT_TRUE(base.ResolveRelativeDir(
-      Value(nullptr, "./foo"), &err, source_root) == SourceDir("//base/foo/"));
+  EXPECT_TRUE(base.ResolveRelativeDir(Value(nullptr, "./foo"), &err,
+                                      source_root) == SourceDir("//base/foo/"));
   EXPECT_FALSE(err.has_error());
-  EXPECT_TRUE(base.ResolveRelativeDir(
-      Value(nullptr, "../foo"), &err, source_root) == SourceDir("//foo/"));
+  EXPECT_TRUE(base.ResolveRelativeDir(Value(nullptr, "../foo"), &err,
+                                      source_root) == SourceDir("//foo/"));
   EXPECT_FALSE(err.has_error());
 
-  // If the given relative path points outside the source root, we
-  // expect an absolute path.
+// If the given relative path points outside the source root, we
+// expect an absolute path.
 #if defined(OS_WIN)
-  EXPECT_TRUE(base.ResolveRelativeDir(
-          Value(nullptr, "../../foo"), &err, source_root) ==
+  EXPECT_TRUE(
+      base.ResolveRelativeDir(Value(nullptr, "../../foo"), &err, source_root) ==
       SourceDir("/C:/source/foo/"));
   EXPECT_FALSE(err.has_error());
-  EXPECT_TRUE(base.ResolveRelativeDir(
-          Value(nullptr, "//../foo"), &err, source_root) ==
+  EXPECT_TRUE(
+      base.ResolveRelativeDir(Value(nullptr, "//../foo"), &err, source_root) ==
       SourceDir("/C:/source/foo/"));
   EXPECT_FALSE(err.has_error());
-  EXPECT_TRUE(base.ResolveRelativeDir(
-          Value(nullptr, "//.."), &err, source_root) ==
-      SourceDir("/C:/source/"));
+  EXPECT_TRUE(base.ResolveRelativeDir(Value(nullptr, "//.."), &err,
+                                      source_root) == SourceDir("/C:/source/"));
   EXPECT_FALSE(err.has_error());
 #else
-  EXPECT_TRUE(base.ResolveRelativeDir(
-          Value(nullptr, "../../foo"), &err, source_root) ==
+  EXPECT_TRUE(
+      base.ResolveRelativeDir(Value(nullptr, "../../foo"), &err, source_root) ==
       SourceDir("/source/foo/"));
   EXPECT_FALSE(err.has_error());
-  EXPECT_TRUE(base.ResolveRelativeDir(
-          Value(nullptr, "//../foo"), &err, source_root) ==
+  EXPECT_TRUE(
+      base.ResolveRelativeDir(Value(nullptr, "//../foo"), &err, source_root) ==
       SourceDir("/source/foo/"));
   EXPECT_FALSE(err.has_error());
-  EXPECT_TRUE(base.ResolveRelativeDir(
-          Value(nullptr, "//.."), &err, source_root) ==
-      SourceDir("/source/"));
+  EXPECT_TRUE(base.ResolveRelativeDir(Value(nullptr, "//.."), &err,
+                                      source_root) == SourceDir("/source/"));
   EXPECT_FALSE(err.has_error());
 #endif
 
 #if defined(OS_WIN)
   // Canonicalize the existing backslashes to forward slashes and add a
   // leading slash if necessary.
-  EXPECT_TRUE(base.ResolveRelativeDir(
-      Value(nullptr, "\\C:\\foo"), &err) == SourceDir("/C:/foo/"));
+  EXPECT_TRUE(base.ResolveRelativeDir(Value(nullptr, "\\C:\\foo"), &err) ==
+              SourceDir("/C:/foo/"));
   EXPECT_FALSE(err.has_error());
-  EXPECT_TRUE(base.ResolveRelativeDir(
-      Value(nullptr, "C:\\foo"), &err) == SourceDir("/C:/foo/"));
+  EXPECT_TRUE(base.ResolveRelativeDir(Value(nullptr, "C:\\foo"), &err) ==
+              SourceDir("/C:/foo/"));
   EXPECT_FALSE(err.has_error());
 #endif
 }
diff --git a/tools/gn/source_file.cc b/tools/gn/source_file.cc
index d8d6c02..09be349 100644
--- a/tools/gn/source_file.cc
+++ b/tools/gn/source_file.cc
@@ -47,8 +47,7 @@
 
   DCHECK(value_.find('/') != std::string::npos);
   size_t last_slash = value_.rfind('/');
-  return std::string(&value_[last_slash + 1],
-                     value_.size() - last_slash - 1);
+  return std::string(&value_[last_slash + 1], value_.size() - last_slash - 1);
 }
 
 SourceDir SourceFile::GetDir() const {
diff --git a/tools/gn/source_file.h b/tools/gn/source_file.h
index a7a08e6..f033987 100644
--- a/tools/gn/source_file.h
+++ b/tools/gn/source_file.h
@@ -53,9 +53,7 @@
 
   // Returns true if this file starts with a single slash which indicates a
   // system-absolute path.
-  bool is_system_absolute() const {
-    return !is_source_absolute();
-  }
+  bool is_system_absolute() const { return !is_source_absolute(); }
 
   // Returns a source-absolute path starting with only one slash at the
   // beginning (normally source-absolute paths start with two slashes to mark
@@ -71,16 +69,12 @@
   bool operator==(const SourceFile& other) const {
     return value_ == other.value_;
   }
-  bool operator!=(const SourceFile& other) const {
-    return !operator==(other);
-  }
+  bool operator!=(const SourceFile& other) const { return !operator==(other); }
   bool operator<(const SourceFile& other) const {
     return value_ < other.value_;
   }
 
-  void swap(SourceFile& other) {
-    value_.swap(other.value_);
-  }
+  void swap(SourceFile& other) { value_.swap(other.value_); }
 
  private:
   friend class SourceDir;
@@ -92,7 +86,8 @@
 
 namespace std {
 
-template<> struct hash<SourceFile> {
+template <>
+struct hash<SourceFile> {
   std::size_t operator()(const SourceFile& v) const {
     hash<std::string> h;
     return h(v.value());
diff --git a/tools/gn/source_file_type.cc b/tools/gn/source_file_type.cc
index 328b2ab..48df7f8 100644
--- a/tools/gn/source_file_type.cc
+++ b/tools/gn/source_file_type.cc
@@ -31,4 +31,3 @@
 
   return SOURCE_UNKNOWN;
 }
-
diff --git a/tools/gn/source_file_unittest.cc b/tools/gn/source_file_unittest.cc
index aeecee4..ef50e9c 100644
--- a/tools/gn/source_file_unittest.cc
+++ b/tools/gn/source_file_unittest.cc
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "test/test.h"
 #include "tools/gn/source_file.h"
+#include "test/test.h"
 
 // The SourceFile object should normalize the input passed to the constructor.
 // The normalizer unit test checks for all the weird edge cases for normalizing
diff --git a/tools/gn/standard_out.cc b/tools/gn/standard_out.cc
index f508e8c..8e29f9f 100644
--- a/tools/gn/standard_out.cc
+++ b/tools/gn/standard_out.cc
@@ -75,8 +75,8 @@
 #endif  // !defined(OS_WIN)
 
 void OutputMarkdownDec(TextDecoration dec) {
-  // The markdown rendering turns "dim" text to italics and any
-  // other colored text to bold.
+// The markdown rendering turns "dim" text to italics and any
+// other colored text to bold.
 
 #if defined(OS_WIN)
   DWORD written = 0;
@@ -122,8 +122,7 @@
                                   FOREGROUND_BLUE | FOREGROUND_INTENSITY);
         break;
       case DECORATION_YELLOW:
-        ::SetConsoleTextAttribute(hstdout,
-                                  FOREGROUND_RED | FOREGROUND_GREEN);
+        ::SetConsoleTextAttribute(hstdout, FOREGROUND_RED | FOREGROUND_GREEN);
         break;
     }
   }
@@ -229,8 +228,7 @@
     return;
 
   // See if the colon is followed by a " [" and if so, dim the contents of [ ].
-  if (first_normal > 0 &&
-      line.size() > first_normal + 2 &&
+  if (first_normal > 0 && line.size() > first_normal + 2 &&
       line[first_normal + 1] == ' ' && line[first_normal + 2] == '[') {
     size_t begin_bracket = first_normal + 2;
     OutputString(": ");
@@ -332,4 +330,3 @@
   if (is_markdown && in_body)
     OutputString("```\n");
 }
-
diff --git a/tools/gn/string_utils.cc b/tools/gn/string_utils.cc
index 5e80681..89fc4b0 100644
--- a/tools/gn/string_utils.cc
+++ b/tools/gn/string_utils.cc
@@ -20,18 +20,18 @@
 
 // Constructs an Err indicating a range inside a string. We assume that the
 // token has quotes around it that are not counted by the offset.
-Err ErrInsideStringToken(const Token& token, size_t offset, size_t size,
+Err ErrInsideStringToken(const Token& token,
+                         size_t offset,
+                         size_t size,
                          const std::string& msg,
                          const std::string& help = std::string()) {
   // The "+1" is skipping over the " at the beginning of the token.
   int int_offset = static_cast<int>(offset);
-  Location begin_loc(token.location().file(),
-                     token.location().line_number(),
+  Location begin_loc(token.location().file(), token.location().line_number(),
                      token.location().column_number() + int_offset + 1,
                      token.location().byte() + int_offset + 1);
   Location end_loc(
-      token.location().file(),
-      token.location().line_number(),
+      token.location().file(), token.location().line_number(),
       token.location().column_number() + int_offset + 1 +
           static_cast<int>(size),
       token.location().byte() + int_offset + 1 + static_cast<int>(size));
@@ -89,7 +89,8 @@
     return false;
   }
   if (!(node->AsIdentifier() || node->AsAccessor())) {
-    *err = ErrInsideStringToken(token, begin_offset, end_offset - begin_offset,
+    *err = ErrInsideStringToken(
+        token, begin_offset, end_offset - begin_offset,
         "Invalid string interpolation.",
         "The thing inside the ${} must be an identifier ${foo},\n"
         "a scope access ${foo.bar}, or a list access ${foo[0]}.");
@@ -116,8 +117,7 @@
                                   size_t end_offset,
                                   std::string* output,
                                   Err* err) {
-  base::StringPiece identifier(&input[begin_offset],
-                               end_offset - begin_offset);
+  base::StringPiece identifier(&input[begin_offset], end_offset - begin_offset);
   const Value* value = scope->GetValue(identifier, true);
   if (!value) {
     // We assume the input points inside the token.
@@ -142,7 +142,8 @@
 // result of the interpolation to |*output|.
 bool AppendStringInterpolation(Scope* scope,
                                const Token& token,
-                               const char* input, size_t size,
+                               const char* input,
+                               size_t size,
                                size_t* i,
                                std::string* output,
                                Err* err) {
@@ -172,8 +173,8 @@
     // simple identifier. Avoid all the complicated parsing of accessors
     // in this case.
     if (!has_non_ident_chars) {
-      return AppendInterpolatedIdentifier(scope, token, input, begin_offset,
-                                          *i, output, err);
+      return AppendInterpolatedIdentifier(scope, token, input, begin_offset, *i,
+                                          output, err);
     }
     return AppendInterpolatedExpression(scope, token, input, begin_offset, *i,
                                         output, err);
@@ -182,10 +183,9 @@
   // Simple identifier.
   // The first char of an identifier is more restricted.
   if (!Tokenizer::IsIdentifierFirstChar(input[*i])) {
-    *err = ErrInsideStringToken(
-        token, dollars_index, *i - dollars_index + 1,
-        "$ not followed by an identifier char.",
-        "It you want a literal $ use \"\\$\".");
+    *err = ErrInsideStringToken(token, dollars_index, *i - dollars_index + 1,
+                                "$ not followed by an identifier char.",
+                                "It you want a literal $ use \"\\$\".");
     return false;
   }
   size_t begin_offset = *i;
@@ -210,7 +210,8 @@
 // char with the given hex value to |*output|.
 bool AppendHexByte(Scope* scope,
                    const Token& token,
-                   const char* input, size_t size,
+                   const char* input,
+                   size_t size,
                    size_t* i,
                    std::string* output,
                    Err* err) {
@@ -241,7 +242,7 @@
                          Value* result,
                          Err* err) {
   DCHECK(literal.type() == Token::STRING);
-  DCHECK(literal.value().size() > 1);  // Should include quotes.
+  DCHECK(literal.value().size() > 1);       // Should include quotes.
   DCHECK(result->type() == Value::STRING);  // Should be already set.
 
   // The token includes the surrounding quotes, so strip those off.
@@ -268,7 +269,8 @@
     } else if (input[i] == '$') {
       i++;
       if (i == size) {
-        *err = ErrInsideStringToken(literal, i - 1, 1, "$ at end of string.",
+        *err = ErrInsideStringToken(
+            literal, i - 1, 1, "$ at end of string.",
             "I was expecting an identifier, 0xFF, or {...} after the $.");
         return false;
       }
@@ -276,7 +278,7 @@
         if (!AppendHexByte(scope, literal, input, size, &i, &output, err))
           return false;
       } else if (!AppendStringInterpolation(scope, literal, input, size, &i,
-                                     &output, err))
+                                            &output, err))
         return false;
     } else {
       output.push_back(input[i]);
diff --git a/tools/gn/string_utils_unittest.cc b/tools/gn/string_utils_unittest.cc
index 77d8f42..198fac1 100644
--- a/tools/gn/string_utils_unittest.cc
+++ b/tools/gn/string_utils_unittest.cc
@@ -72,7 +72,10 @@
   EXPECT_TRUE(CheckExpansionCase("$onelist", "[1]", true));
 
   // Hex values
-  EXPECT_TRUE(CheckExpansionCase("$0x0AA", "\x0A""A", true));
+  EXPECT_TRUE(CheckExpansionCase("$0x0AA",
+                                 "\x0A"
+                                 "A",
+                                 true));
   EXPECT_TRUE(CheckExpansionCase("$0x0a$0xfF", "\x0A\xFF", true));
 
   // Errors
diff --git a/tools/gn/substitution_list.cc b/tools/gn/substitution_list.cc
index a0fa00f..b588dad 100644
--- a/tools/gn/substitution_list.cc
+++ b/tools/gn/substitution_list.cc
@@ -47,10 +47,9 @@
   return true;
 }
 
-SubstitutionList SubstitutionList::MakeForTest(
-    const char* a,
-    const char* b,
-    const char* c) {
+SubstitutionList SubstitutionList::MakeForTest(const char* a,
+                                               const char* b,
+                                               const char* c) {
   std::vector<std::string> input_strings;
   input_strings.push_back(a);
   if (b)
diff --git a/tools/gn/substitution_list.h b/tools/gn/substitution_list.h
index eaf8a61..45123cb 100644
--- a/tools/gn/substitution_list.h
+++ b/tools/gn/substitution_list.h
@@ -23,10 +23,9 @@
              Err* err);
 
   // Makes a SubstitutionList from the given hardcoded patterns.
-  static SubstitutionList MakeForTest(
-      const char* a,
-      const char* b = nullptr,
-      const char* c = nullptr);
+  static SubstitutionList MakeForTest(const char* a,
+                                      const char* b = nullptr,
+                                      const char* c = nullptr);
 
   const std::vector<SubstitutionPattern>& list() const { return list_; }
 
diff --git a/tools/gn/substitution_pattern.cc b/tools/gn/substitution_pattern.cc
index 756200c..9b5e815 100644
--- a/tools/gn/substitution_pattern.cc
+++ b/tools/gn/substitution_pattern.cc
@@ -12,20 +12,15 @@
 #include "tools/gn/filesystem_utils.h"
 #include "tools/gn/value.h"
 
-SubstitutionPattern::Subrange::Subrange()
-    : type(SUBSTITUTION_LITERAL) {
-}
+SubstitutionPattern::Subrange::Subrange() : type(SUBSTITUTION_LITERAL) {}
 
 SubstitutionPattern::Subrange::Subrange(SubstitutionType t,
                                         const std::string& l)
-    : type(t),
-      literal(l) {
-}
+    : type(t), literal(l) {}
 
 SubstitutionPattern::Subrange::~Subrange() = default;
 
-SubstitutionPattern::SubstitutionPattern() : origin_(nullptr) {
-}
+SubstitutionPattern::SubstitutionPattern() : origin_(nullptr) {}
 
 SubstitutionPattern::SubstitutionPattern(const SubstitutionPattern& other) =
     default;
@@ -59,8 +54,8 @@
 
     // Find which specific pattern this corresponds to.
     bool found_match = false;
-    for (size_t i = SUBSTITUTION_FIRST_PATTERN;
-         i < SUBSTITUTION_NUM_TYPES; i++) {
+    for (size_t i = SUBSTITUTION_FIRST_PATTERN; i < SUBSTITUTION_NUM_TYPES;
+         i++) {
       const char* cur_pattern = kSubstitutionNames[i];
       size_t cur_len = strlen(cur_pattern);
       if (str.compare(next, cur_len, cur_pattern) == 0) {
@@ -128,19 +123,18 @@
 
   if (ranges_[0].type == SUBSTITUTION_LITERAL) {
     // If the first thing is a literal, it must start with the output dir.
-    if (!EnsureStringIsInOutputDir(
-            build_settings->build_dir(),
-            ranges_[0].literal, origin_, err))
+    if (!EnsureStringIsInOutputDir(build_settings->build_dir(),
+                                   ranges_[0].literal, origin_, err))
       return false;
   } else {
     // Otherwise, the first subrange must be a pattern that expands to
     // something in the output directory.
     if (!SubstitutionIsInOutputDir(ranges_[0].type)) {
-      *err = Err(origin_,
-          "File is not inside output directory.",
-          "The given file should be in the output directory. Normally you\n"
-          "would specify\n\"$target_out_dir/foo\" or "
-          "\"{{source_gen_dir}}/foo\".");
+      *err =
+          Err(origin_, "File is not inside output directory.",
+              "The given file should be in the output directory. Normally you\n"
+              "would specify\n\"$target_out_dir/foo\" or "
+              "\"{{source_gen_dir}}/foo\".");
       return false;
     }
   }
diff --git a/tools/gn/substitution_pattern.h b/tools/gn/substitution_pattern.h
index 5389806..2f01e6b 100644
--- a/tools/gn/substitution_pattern.h
+++ b/tools/gn/substitution_pattern.h
@@ -56,8 +56,7 @@
   // Checks whether this pattern resolves to something in the output directory
   // for the given build settings. If not, returns false and fills in the given
   // error.
-  bool IsInOutputDir(const BuildSettings* build_settings,
-                     Err* err) const;
+  bool IsInOutputDir(const BuildSettings* build_settings, Err* err) const;
 
   // Returns a vector listing the substitutions used by this pattern, not
   // counting SUBSTITUTION_LITERAL.
diff --git a/tools/gn/substitution_pattern_unittest.cc b/tools/gn/substitution_pattern_unittest.cc
index 453aaa4..e7abc16 100644
--- a/tools/gn/substitution_pattern_unittest.cc
+++ b/tools/gn/substitution_pattern_unittest.cc
@@ -2,9 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "tools/gn/substitution_pattern.h"
 #include "test/test.h"
 #include "tools/gn/err.h"
-#include "tools/gn/substitution_pattern.h"
 
 TEST(SubstitutionPattern, ParseLiteral) {
   SubstitutionPattern pattern;
diff --git a/tools/gn/substitution_type.cc b/tools/gn/substitution_type.cc
index 14bdcdc..8c0fbb4 100644
--- a/tools/gn/substitution_type.cc
+++ b/tools/gn/substitution_type.cc
@@ -116,8 +116,7 @@
     "rspfile",  // SUBSTITUTION_RSP_FILE_NAME
 };
 
-SubstitutionBits::SubstitutionBits() : used() {
-}
+SubstitutionBits::SubstitutionBits() : used() {}
 
 void SubstitutionBits::MergeFrom(const SubstitutionBits& other) {
   for (size_t i = 0; i < SUBSTITUTION_NUM_TYPES; i++)
@@ -161,8 +160,7 @@
 }
 
 bool IsValidSourceSubstitution(SubstitutionType type) {
-  return type == SUBSTITUTION_LITERAL ||
-         type == SUBSTITUTION_SOURCE ||
+  return type == SUBSTITUTION_LITERAL || type == SUBSTITUTION_SOURCE ||
          type == SUBSTITUTION_SOURCE_NAME_PART ||
          type == SUBSTITUTION_SOURCE_FILE_PART ||
          type == SUBSTITUTION_SOURCE_DIR ||
@@ -173,15 +171,12 @@
 }
 
 bool IsValidScriptArgsSubstitution(SubstitutionType type) {
-  return IsValidSourceSubstitution(type) ||
-      type == SUBSTITUTION_RSP_FILE_NAME;
+  return IsValidSourceSubstitution(type) || type == SUBSTITUTION_RSP_FILE_NAME;
 }
 
 bool IsValidToolSubstitution(SubstitutionType type) {
-  return type == SUBSTITUTION_LITERAL ||
-         type == SUBSTITUTION_OUTPUT ||
-         type == SUBSTITUTION_LABEL ||
-         type == SUBSTITUTION_LABEL_NAME ||
+  return type == SUBSTITUTION_LITERAL || type == SUBSTITUTION_OUTPUT ||
+         type == SUBSTITUTION_LABEL || type == SUBSTITUTION_LABEL_NAME ||
          type == SUBSTITUTION_ROOT_GEN_DIR ||
          type == SUBSTITUTION_ROOT_OUT_DIR ||
          type == SUBSTITUTION_TARGET_GEN_DIR ||
@@ -190,16 +185,11 @@
 }
 
 bool IsValidCompilerSubstitution(SubstitutionType type) {
-  return IsValidToolSubstitution(type) ||
-         IsValidSourceSubstitution(type) ||
-         type == SUBSTITUTION_SOURCE ||
-         type == SUBSTITUTION_ASMFLAGS ||
-         type == SUBSTITUTION_CFLAGS ||
-         type == SUBSTITUTION_CFLAGS_C ||
-         type == SUBSTITUTION_CFLAGS_CC ||
-         type == SUBSTITUTION_CFLAGS_OBJC ||
-         type == SUBSTITUTION_CFLAGS_OBJCC ||
-         type == SUBSTITUTION_DEFINES ||
+  return IsValidToolSubstitution(type) || IsValidSourceSubstitution(type) ||
+         type == SUBSTITUTION_SOURCE || type == SUBSTITUTION_ASMFLAGS ||
+         type == SUBSTITUTION_CFLAGS || type == SUBSTITUTION_CFLAGS_C ||
+         type == SUBSTITUTION_CFLAGS_CC || type == SUBSTITUTION_CFLAGS_OBJC ||
+         type == SUBSTITUTION_CFLAGS_OBJCC || type == SUBSTITUTION_DEFINES ||
          type == SUBSTITUTION_INCLUDE_DIRS;
 }
 
@@ -210,14 +200,11 @@
 }
 
 bool IsValidLinkerSubstitution(SubstitutionType type) {
-  return IsValidToolSubstitution(type) ||
-         type == SUBSTITUTION_LINKER_INPUTS ||
+  return IsValidToolSubstitution(type) || type == SUBSTITUTION_LINKER_INPUTS ||
          type == SUBSTITUTION_LINKER_INPUTS_NEWLINE ||
-         type == SUBSTITUTION_LDFLAGS ||
-         type == SUBSTITUTION_LIBS ||
+         type == SUBSTITUTION_LDFLAGS || type == SUBSTITUTION_LIBS ||
          type == SUBSTITUTION_OUTPUT_DIR ||
-         type == SUBSTITUTION_OUTPUT_EXTENSION ||
-         type == SUBSTITUTION_SOLIBS;
+         type == SUBSTITUTION_OUTPUT_EXTENSION || type == SUBSTITUTION_SOLIBS;
 }
 
 bool IsValidLinkerOutputsSubstitution(SubstitutionType type) {
@@ -228,17 +215,14 @@
 }
 
 bool IsValidALinkSubstitution(SubstitutionType type) {
-  return IsValidToolSubstitution(type) ||
-         type == SUBSTITUTION_LINKER_INPUTS ||
+  return IsValidToolSubstitution(type) || type == SUBSTITUTION_LINKER_INPUTS ||
          type == SUBSTITUTION_LINKER_INPUTS_NEWLINE ||
-         type == SUBSTITUTION_ARFLAGS ||
-         type == SUBSTITUTION_OUTPUT_DIR ||
+         type == SUBSTITUTION_ARFLAGS || type == SUBSTITUTION_OUTPUT_DIR ||
          type == SUBSTITUTION_OUTPUT_EXTENSION;
 }
 
 bool IsValidCopySubstitution(SubstitutionType type) {
-  return IsValidToolSubstitution(type) ||
-         type == SUBSTITUTION_SOURCE;
+  return IsValidToolSubstitution(type) || type == SUBSTITUTION_SOURCE;
 }
 
 bool IsValidCompileXCassetsSubstitution(SubstitutionType type) {
@@ -254,9 +238,9 @@
   for (SubstitutionType type : types) {
     if (!is_valid_subst(type)) {
       *err = Err(origin, "Invalid substitution type.",
-          "The substitution " + std::string(kSubstitutionNames[type]) +
-          " isn't valid for something\n"
-          "operating on a source file such as this.");
+                 "The substitution " + std::string(kSubstitutionNames[type]) +
+                     " isn't valid for something\n"
+                     "operating on a source file such as this.");
       return false;
     }
   }
diff --git a/tools/gn/substitution_type.h b/tools/gn/substitution_type.h
index bb3c803..7363e18 100644
--- a/tools/gn/substitution_type.h
+++ b/tools/gn/substitution_type.h
@@ -135,10 +135,9 @@
 // Validates that each substitution type in the vector passes the given
 // is_valid_subst predicate. Returns true on success. On failure, fills in the
 // error object with an appropriate message and returns false.
-bool EnsureValidSubstitutions(
-    const std::vector<SubstitutionType>& types,
-    bool (*is_valid_subst)(SubstitutionType),
-    const ParseNode* origin,
-    Err* err);
+bool EnsureValidSubstitutions(const std::vector<SubstitutionType>& types,
+                              bool (*is_valid_subst)(SubstitutionType),
+                              const ParseNode* origin,
+                              Err* err);
 
 #endif  // TOOLS_GN_SUBSTITUTION_TYPE_H_
diff --git a/tools/gn/substitution_writer.cc b/tools/gn/substitution_writer.cc
index 19a4436..96a12b1 100644
--- a/tools/gn/substitution_writer.cc
+++ b/tools/gn/substitution_writer.cc
@@ -172,29 +172,25 @@
 }
 
 // static
-void SubstitutionWriter::GetListAsSourceFiles(
-    const SubstitutionList& list,
-    std::vector<SourceFile>* output) {
+void SubstitutionWriter::GetListAsSourceFiles(const SubstitutionList& list,
+                                              std::vector<SourceFile>* output) {
   for (const auto& pattern : list.list()) {
     CHECK(pattern.ranges().size() == 1 &&
           pattern.ranges()[0].type == SUBSTITUTION_LITERAL)
-        << "The substitution pattern \""
-        << pattern.AsString()
+        << "The substitution pattern \"" << pattern.AsString()
         << "\" was expected to be a literal with no {{substitutions}}.";
     const std::string& literal = pattern.ranges()[0].literal;
     CHECK(literal.size() >= 1 && literal[0] == '/')
-        << "The result of the pattern \""
-        << pattern.AsString()
+        << "The result of the pattern \"" << pattern.AsString()
         << "\" was not an absolute path.";
     output->push_back(SourceFile(literal));
   }
 }
 
 // static
-void SubstitutionWriter::GetListAsOutputFiles(
-    const Settings* settings,
-    const SubstitutionList& list,
-    std::vector<OutputFile>* output) {
+void SubstitutionWriter::GetListAsOutputFiles(const Settings* settings,
+                                              const SubstitutionList& list,
+                                              std::vector<OutputFile>* output) {
   std::vector<SourceFile> output_as_sources;
   GetListAsSourceFiles(list, &output_as_sources);
   for (const auto& file : output_as_sources)
@@ -203,15 +199,14 @@
 
 // static
 SourceFile SubstitutionWriter::ApplyPatternToSource(
-      const Target* target,
-      const Settings* settings,
-      const SubstitutionPattern& pattern,
-      const SourceFile& source) {
-  std::string result_value = ApplyPatternToSourceAsString(
-      target, settings, pattern, source);
+    const Target* target,
+    const Settings* settings,
+    const SubstitutionPattern& pattern,
+    const SourceFile& source) {
+  std::string result_value =
+      ApplyPatternToSourceAsString(target, settings, pattern, source);
   CHECK(!result_value.empty() && result_value[0] == '/')
-      << "The result of the pattern \""
-      << pattern.AsString()
+      << "The result of the pattern \"" << pattern.AsString()
       << "\" was not a path beginning in \"/\" or \"//\".";
   return SourceFile(SourceFile::SWAP_IN, &result_value);
 }
@@ -227,9 +222,9 @@
     if (subrange.type == SUBSTITUTION_LITERAL) {
       result_value.append(subrange.literal);
     } else {
-      result_value.append(
-          GetSourceSubstitution(target, settings, source, subrange.type,
-                                OUTPUT_ABSOLUTE, SourceDir()));
+      result_value.append(GetSourceSubstitution(target, settings, source,
+                                                subrange.type, OUTPUT_ABSOLUTE,
+                                                SourceDir()));
     }
   }
   return result_value;
@@ -241,18 +236,17 @@
     const Settings* settings,
     const SubstitutionPattern& pattern,
     const SourceFile& source) {
-  SourceFile result_as_source = ApplyPatternToSource(
-      target, settings, pattern, source);
+  SourceFile result_as_source =
+      ApplyPatternToSource(target, settings, pattern, source);
   return OutputFile(settings->build_settings(), result_as_source);
 }
 
 // static
-void SubstitutionWriter::ApplyListToSource(
-    const Target* target,
-    const Settings* settings,
-    const SubstitutionList& list,
-    const SourceFile& source,
-    std::vector<SourceFile>* output) {
+void SubstitutionWriter::ApplyListToSource(const Target* target,
+                                           const Settings* settings,
+                                           const SubstitutionList& list,
+                                           const SourceFile& source,
+                                           std::vector<SourceFile>* output) {
   for (const auto& item : list.list())
     output->push_back(ApplyPatternToSource(target, settings, item, source));
 }
@@ -265,8 +259,8 @@
     const SourceFile& source,
     std::vector<std::string>* output) {
   for (const auto& item : list.list())
-    output->push_back(ApplyPatternToSourceAsString(
-        target, settings, item, source));
+    output->push_back(
+        ApplyPatternToSourceAsString(target, settings, item, source));
 }
 
 // static
@@ -277,8 +271,8 @@
     const SourceFile& source,
     std::vector<OutputFile>* output) {
   for (const auto& item : list.list())
-    output->push_back(ApplyPatternToSourceAsOutputFile(
-        target, settings, item, source));
+    output->push_back(
+        ApplyPatternToSourceAsOutputFile(target, settings, item, source));
 }
 
 // static
@@ -332,12 +326,11 @@
     // other context (like process_file_template).
     if (type != SUBSTITUTION_SOURCE && type != SUBSTITUTION_RSP_FILE_NAME) {
       out << "  " << kSubstitutionNinjaNames[type] << " = ";
-        EscapeStringToStream(
-            out,
-            GetSourceSubstitution(target, settings, source, type,
-                                  OUTPUT_RELATIVE,
-                                  settings->build_settings()->build_dir()),
-            escape_options);
+      EscapeStringToStream(
+          out,
+          GetSourceSubstitution(target, settings, source, type, OUTPUT_RELATIVE,
+                                settings->build_settings()->build_dir()),
+          escape_options);
       out << std::endl;
     }
   }
@@ -374,9 +367,9 @@
     case SUBSTITUTION_SOURCE_ROOT_RELATIVE_DIR:
       if (source.is_system_absolute())
         return DirectoryWithNoLastSlash(source.GetDir());
-      return RebasePath(
-          DirectoryWithNoLastSlash(source.GetDir()), SourceDir("//"),
-          settings->build_settings()->root_path_utf8());
+      return RebasePath(DirectoryWithNoLastSlash(source.GetDir()),
+                        SourceDir("//"),
+                        settings->build_settings()->root_path_utf8());
 
     case SUBSTITUTION_SOURCE_GEN_DIR:
       to_rebase = DirectoryWithNoLastSlash(GetSubBuildDirAsSourceDir(
@@ -391,17 +384,15 @@
     case SUBSTITUTION_SOURCE_TARGET_RELATIVE:
       if (target) {
         return RebasePath(source.value(), target->label().dir(),
-            settings->build_settings()->root_path_utf8());
+                          settings->build_settings()->root_path_utf8());
       }
-      NOTREACHED()
-          << "Cannot use substitution " << kSubstitutionNames[type]
-          << " without target";
+      NOTREACHED() << "Cannot use substitution " << kSubstitutionNames[type]
+                   << " without target";
       return std::string();
 
     default:
-      NOTREACHED()
-          << "Unsupported substitution for this function: "
-          << kSubstitutionNames[type];
+      NOTREACHED() << "Unsupported substitution for this function: "
+                   << kSubstitutionNames[type];
       return std::string();
   }
 
@@ -443,29 +434,27 @@
 }
 
 // static
-bool SubstitutionWriter::GetTargetSubstitution(
-    const Target* target,
-    SubstitutionType type,
-    std::string* result) {
+bool SubstitutionWriter::GetTargetSubstitution(const Target* target,
+                                               SubstitutionType type,
+                                               std::string* result) {
   switch (type) {
     case SUBSTITUTION_LABEL:
       // Only include the toolchain for non-default toolchains.
-      *result = target->label().GetUserVisibleName(
-          !target->settings()->is_default());
+      *result =
+          target->label().GetUserVisibleName(!target->settings()->is_default());
       break;
     case SUBSTITUTION_LABEL_NAME:
       *result = target->label().name();
       break;
     case SUBSTITUTION_ROOT_GEN_DIR:
       SetDirOrDotWithNoSlash(
-          GetBuildDirAsOutputFile(BuildDirContext(target),
-                                  BuildDirType::GEN).value(),
+          GetBuildDirAsOutputFile(BuildDirContext(target), BuildDirType::GEN)
+              .value(),
           result);
       break;
     case SUBSTITUTION_ROOT_OUT_DIR:
       SetDirOrDotWithNoSlash(
-          target->settings()->toolchain_output_subdir().value(),
-          result);
+          target->settings()->toolchain_output_subdir().value(), result);
       break;
     case SUBSTITUTION_TARGET_GEN_DIR:
       SetDirOrDotWithNoSlash(
@@ -487,9 +476,8 @@
 }
 
 // static
-std::string SubstitutionWriter::GetTargetSubstitution(
-    const Target* target,
-    SubstitutionType type) {
+std::string SubstitutionWriter::GetTargetSubstitution(const Target* target,
+                                                      SubstitutionType type) {
   std::string result;
   GetTargetSubstitution(target, type, &result);
   return result;
@@ -565,10 +553,9 @@
 }
 
 // static
-std::string SubstitutionWriter::GetLinkerSubstitution(
-    const Target* target,
-    const Tool* tool,
-    SubstitutionType type) {
+std::string SubstitutionWriter::GetLinkerSubstitution(const Target* target,
+                                                      const Tool* tool,
+                                                      SubstitutionType type) {
   // First try the common tool ones.
   std::string result;
   if (GetTargetSubstitution(target, type, &result))
@@ -582,12 +569,13 @@
       // path it wants), or the tool's default (which will contain further
       // expansions).
       if (target->output_dir().is_null()) {
-        return ApplyPatternToLinkerAsOutputFile(
-            target, tool, tool->default_output_dir()).value();
+        return ApplyPatternToLinkerAsOutputFile(target, tool,
+                                                tool->default_output_dir())
+            .value();
       }
-      SetDirOrDotWithNoSlash(RebasePath(
-              target->output_dir().value(),
-              target->settings()->build_settings()->build_dir()),
+      SetDirOrDotWithNoSlash(
+          RebasePath(target->output_dir().value(),
+                     target->settings()->build_settings()->build_dir()),
           &result);
       return result;
 
diff --git a/tools/gn/substitution_writer.h b/tools/gn/substitution_writer.h
index 92f09c4..d5cb1c3 100644
--- a/tools/gn/substitution_writer.h
+++ b/tools/gn/substitution_writer.h
@@ -59,10 +59,9 @@
 
   // Writes the pattern to the given stream with no special handling, and with
   // Ninja variables replacing the patterns.
-  static void WriteWithNinjaVariables(
-      const SubstitutionPattern& pattern,
-      const EscapeOptions& escape_options,
-      std::ostream& out);
+  static void WriteWithNinjaVariables(const SubstitutionPattern& pattern,
+                                      const EscapeOptions& escape_options,
+                                      std::ostream& out);
 
   // NOP substitutions ---------------------------------------------------------
 
@@ -70,13 +69,11 @@
   // no substitutions (it will assert if there are). This is used for cases
   // like actions where the outputs are explicit, but the list is stored as
   // a SubstitutionList.
-  static void GetListAsSourceFiles(
-      const SubstitutionList& list,
-      std::vector<SourceFile>* output);
-  static void GetListAsOutputFiles(
-      const Settings* settings,
-      const SubstitutionList& list,
-      std::vector<OutputFile>* output);
+  static void GetListAsSourceFiles(const SubstitutionList& list,
+                                   std::vector<SourceFile>* output);
+  static void GetListAsOutputFiles(const Settings* settings,
+                                   const SubstitutionList& list,
+                                   std::vector<OutputFile>* output);
 
   // Source substitutions -----------------------------------------------------
 
@@ -87,11 +84,10 @@
   // first (see for example IsFileInOuputDir).
   //
   // The target can be null (see class comment above).
-  static SourceFile ApplyPatternToSource(
-      const Target* target,
-      const Settings* settings,
-      const SubstitutionPattern& pattern,
-      const SourceFile& source);
+  static SourceFile ApplyPatternToSource(const Target* target,
+                                         const Settings* settings,
+                                         const SubstitutionPattern& pattern,
+                                         const SourceFile& source);
   static std::string ApplyPatternToSourceAsString(
       const Target* target,
       const Settings* settings,
@@ -109,41 +105,36 @@
   // SourceFiles or OutputFiles.
   //
   // The target can be null (see class comment above).
-  static void ApplyListToSource(
-      const Target* target,
-      const Settings* settings,
-      const SubstitutionList& list,
-      const SourceFile& source,
-      std::vector<SourceFile>* output);
-  static void ApplyListToSourceAsString(
-      const Target* target,
-      const Settings* settings,
-      const SubstitutionList& list,
-      const SourceFile& source,
-      std::vector<std::string>* output);
-  static void ApplyListToSourceAsOutputFile(
-      const Target* target,
-      const Settings* settings,
-      const SubstitutionList& list,
-      const SourceFile& source,
-      std::vector<OutputFile>* output);
+  static void ApplyListToSource(const Target* target,
+                                const Settings* settings,
+                                const SubstitutionList& list,
+                                const SourceFile& source,
+                                std::vector<SourceFile>* output);
+  static void ApplyListToSourceAsString(const Target* target,
+                                        const Settings* settings,
+                                        const SubstitutionList& list,
+                                        const SourceFile& source,
+                                        std::vector<std::string>* output);
+  static void ApplyListToSourceAsOutputFile(const Target* target,
+                                            const Settings* settings,
+                                            const SubstitutionList& list,
+                                            const SourceFile& source,
+                                            std::vector<OutputFile>* output);
 
   // Like ApplyListToSource but applies the list to all sources and replaces
   // rather than appends the output (this produces the complete output).
   //
   // The target can be null (see class comment above).
-  static void ApplyListToSources(
-      const Target* target,
-      const Settings* settings,
-      const SubstitutionList& list,
-      const std::vector<SourceFile>& sources,
-      std::vector<SourceFile>* output);
-  static void ApplyListToSourcesAsString(
-      const Target* target,
-      const Settings* settings,
-      const SubstitutionList& list,
-      const std::vector<SourceFile>& sources,
-      std::vector<std::string>* output);
+  static void ApplyListToSources(const Target* target,
+                                 const Settings* settings,
+                                 const SubstitutionList& list,
+                                 const std::vector<SourceFile>& sources,
+                                 std::vector<SourceFile>* output);
+  static void ApplyListToSourcesAsString(const Target* target,
+                                         const Settings* settings,
+                                         const SubstitutionList& list,
+                                         const std::vector<SourceFile>& sources,
+                                         std::vector<std::string>* output);
   static void ApplyListToSourcesAsOutputFile(
       const Target* target,
       const Settings* settings,
@@ -173,13 +164,12 @@
   // to, otherwise it is ignored.
   //
   // The target can be null (see class comment above).
-  static std::string GetSourceSubstitution(
-      const Target* target,
-      const Settings* settings,
-      const SourceFile& source,
-      SubstitutionType type,
-      OutputStyle output_style,
-      const SourceDir& relative_to);
+  static std::string GetSourceSubstitution(const Target* target,
+                                           const Settings* settings,
+                                           const SourceFile& source,
+                                           SubstitutionType type,
+                                           OutputStyle output_style,
+                                           const SourceDir& relative_to);
 
   // Target substitutions ------------------------------------------------------
   //
@@ -189,23 +179,20 @@
       const Target* target,
       const Tool* tool,
       const SubstitutionPattern& pattern);
-  static void ApplyListToTargetAsOutputFile(
-      const Target* target,
-      const Tool* tool,
-      const SubstitutionList& list,
-      std::vector<OutputFile>* output);
+  static void ApplyListToTargetAsOutputFile(const Target* target,
+                                            const Tool* tool,
+                                            const SubstitutionList& list,
+                                            std::vector<OutputFile>* output);
 
   // This function is slightly different than the other substitution getters
   // since it can handle failure (since it is designed to be used by the
   // compiler and linker ones which will fall through if it's not a common tool
   // one).
-  static bool GetTargetSubstitution(
-      const Target* target,
-      SubstitutionType type,
-      std::string* result);
-  static std::string GetTargetSubstitution(
-      const Target* target,
-      SubstitutionType type);
+  static bool GetTargetSubstitution(const Target* target,
+                                    SubstitutionType type,
+                                    std::string* result);
+  static std::string GetTargetSubstitution(const Target* target,
+                                           SubstitutionType type);
 
   // Compiler substitutions ----------------------------------------------------
   //
@@ -216,19 +203,17 @@
       const Target* target,
       const SourceFile& source,
       const SubstitutionPattern& pattern);
-  static void ApplyListToCompilerAsOutputFile(
-      const Target* target,
-      const SourceFile& source,
-      const SubstitutionList& list,
-      std::vector<OutputFile>* output);
+  static void ApplyListToCompilerAsOutputFile(const Target* target,
+                                              const SourceFile& source,
+                                              const SubstitutionList& list,
+                                              std::vector<OutputFile>* output);
 
   // Like GetSourceSubstitution but for strings based on the target or
   // toolchain. This type of result will always be relative to the build
   // directory.
-  static std::string GetCompilerSubstitution(
-      const Target* target,
-      const SourceFile& source,
-      SubstitutionType type);
+  static std::string GetCompilerSubstitution(const Target* target,
+                                             const SourceFile& source,
+                                             SubstitutionType type);
 
   // Linker substitutions ------------------------------------------------------
 
@@ -236,19 +221,17 @@
       const Target* target,
       const Tool* tool,
       const SubstitutionPattern& pattern);
-  static void ApplyListToLinkerAsOutputFile(
-      const Target* target,
-      const Tool* tool,
-      const SubstitutionList& list,
-      std::vector<OutputFile>* output);
+  static void ApplyListToLinkerAsOutputFile(const Target* target,
+                                            const Tool* tool,
+                                            const SubstitutionList& list,
+                                            std::vector<OutputFile>* output);
 
   // Like GetSourceSubstitution but for strings based on the target or
   // toolchain. This type of result will always be relative to the build
   // directory.
-  static std::string GetLinkerSubstitution(
-      const Target* target,
-      const Tool* tool,
-      SubstitutionType type);
+  static std::string GetLinkerSubstitution(const Target* target,
+                                           const Tool* tool,
+                                           SubstitutionType type);
 };
 
 #endif  // TOOLS_GN_SUBSTITUTION_WRITER_H_
diff --git a/tools/gn/substitution_writer_unittest.cc b/tools/gn/substitution_writer_unittest.cc
index 4528436..0da10ad 100644
--- a/tools/gn/substitution_writer_unittest.cc
+++ b/tools/gn/substitution_writer_unittest.cc
@@ -17,9 +17,8 @@
 TEST(SubstitutionWriter, GetListAs) {
   TestWithScope setup;
 
-  SubstitutionList list = SubstitutionList::MakeForTest(
-      "//foo/bar/a.cc",
-      "//foo/bar/b.cc");
+  SubstitutionList list =
+      SubstitutionList::MakeForTest("//foo/bar/a.cc", "//foo/bar/b.cc");
 
   std::vector<SourceFile> sources;
   SubstitutionWriter::GetListAsSourceFiles(list, &sources);
@@ -97,9 +96,7 @@
   std::ostringstream out;
   SubstitutionWriter::WriteWithNinjaVariables(pattern, options, out);
 
-  EXPECT_EQ(
-      "-i ${in} --out=bar\"${source_name_part}\".o",
-      out.str());
+  EXPECT_EQ("-i ${in} --out=bar\"${source_name_part}\".o", out.str());
 }
 
 TEST(SubstitutionWriter, SourceSubstitutions) {
@@ -111,25 +108,18 @@
   target.SetToolchain(setup.toolchain());
   ASSERT_TRUE(target.OnResolved(&err));
 
-  // Call to get substitutions relative to the build dir.
-  #define GetRelSubst(str, what) \
-      SubstitutionWriter::GetSourceSubstitution( \
-          &target, \
-          setup.settings(), \
-          SourceFile(str), \
-          what, \
-          SubstitutionWriter::OUTPUT_RELATIVE, \
-          setup.settings()->build_settings()->build_dir())
+// Call to get substitutions relative to the build dir.
+#define GetRelSubst(str, what)                          \
+  SubstitutionWriter::GetSourceSubstitution(            \
+      &target, setup.settings(), SourceFile(str), what, \
+      SubstitutionWriter::OUTPUT_RELATIVE,              \
+      setup.settings()->build_settings()->build_dir())
 
-  // Call to get absolute directory substitutions.
-  #define GetAbsSubst(str, what) \
-      SubstitutionWriter::GetSourceSubstitution( \
-          &target, \
-          setup.settings(), \
-          SourceFile(str), \
-          what, \
-          SubstitutionWriter::OUTPUT_ABSOLUTE, \
-          SourceDir())
+// Call to get absolute directory substitutions.
+#define GetAbsSubst(str, what)                          \
+  SubstitutionWriter::GetSourceSubstitution(            \
+      &target, setup.settings(), SourceFile(str), what, \
+      SubstitutionWriter::OUTPUT_ABSOLUTE, SourceDir())
 
   // Try all possible templates with a normal looking string.
   EXPECT_EQ("../../foo/bar/baz.txt",
@@ -184,13 +174,13 @@
   EXPECT_EQ(".",
             GetRelSubst("//baz.txt", SUBSTITUTION_SOURCE_ROOT_RELATIVE_DIR));
 
-  EXPECT_EQ("baz.txt",
-      GetRelSubst("//foo/bar/baz.txt", SUBSTITUTION_SOURCE_TARGET_RELATIVE));
-  EXPECT_EQ("baz.txt",
-      GetAbsSubst("//foo/bar/baz.txt", SUBSTITUTION_SOURCE_TARGET_RELATIVE));
+  EXPECT_EQ("baz.txt", GetRelSubst("//foo/bar/baz.txt",
+                                   SUBSTITUTION_SOURCE_TARGET_RELATIVE));
+  EXPECT_EQ("baz.txt", GetAbsSubst("//foo/bar/baz.txt",
+                                   SUBSTITUTION_SOURCE_TARGET_RELATIVE));
 
-  #undef GetAbsSubst
-  #undef GetRelSubst
+#undef GetAbsSubst
+#undef GetRelSubst
 }
 
 TEST(SubstitutionWriter, TargetSubstitutions) {
@@ -243,14 +233,12 @@
 
   // The compiler substitution is just source + target combined. So test one
   // of each of those classes of things to make sure this is hooked up.
-  EXPECT_EQ("file",
-            SubstitutionWriter::GetCompilerSubstitution(
-                &target, SourceFile("//foo/bar/file.txt"),
-                SUBSTITUTION_SOURCE_NAME_PART));
-  EXPECT_EQ("gen/foo/bar",
-            SubstitutionWriter::GetCompilerSubstitution(
-                &target, SourceFile("//foo/bar/file.txt"),
-                SUBSTITUTION_TARGET_GEN_DIR));
+  EXPECT_EQ("file", SubstitutionWriter::GetCompilerSubstitution(
+                        &target, SourceFile("//foo/bar/file.txt"),
+                        SUBSTITUTION_SOURCE_NAME_PART));
+  EXPECT_EQ("gen/foo/bar", SubstitutionWriter::GetCompilerSubstitution(
+                               &target, SourceFile("//foo/bar/file.txt"),
+                               SUBSTITUTION_TARGET_GEN_DIR));
 }
 
 TEST(SubstitutionWriter, LinkerSubstitutions) {
@@ -266,12 +254,10 @@
 
   // The compiler substitution is just target + OUTPUT_EXTENSION combined. So
   // test one target one plus the output extension.
-  EXPECT_EQ(".so",
-            SubstitutionWriter::GetLinkerSubstitution(
-                &target, tool, SUBSTITUTION_OUTPUT_EXTENSION));
-  EXPECT_EQ("gen/foo/bar",
-            SubstitutionWriter::GetLinkerSubstitution(
-                &target, tool, SUBSTITUTION_TARGET_GEN_DIR));
+  EXPECT_EQ(".so", SubstitutionWriter::GetLinkerSubstitution(
+                       &target, tool, SUBSTITUTION_OUTPUT_EXTENSION));
+  EXPECT_EQ("gen/foo/bar", SubstitutionWriter::GetLinkerSubstitution(
+                               &target, tool, SUBSTITUTION_TARGET_GEN_DIR));
 
   // Test that we handle paths that end up in the root build dir properly
   // (no leading "./" or "/").
@@ -285,13 +271,11 @@
 
   // Output extensions can be overridden.
   target.set_output_extension("extension");
-  EXPECT_EQ(".extension",
-            SubstitutionWriter::GetLinkerSubstitution(
-                &target, tool, SUBSTITUTION_OUTPUT_EXTENSION));
+  EXPECT_EQ(".extension", SubstitutionWriter::GetLinkerSubstitution(
+                              &target, tool, SUBSTITUTION_OUTPUT_EXTENSION));
   target.set_output_extension("");
-  EXPECT_EQ("",
-            SubstitutionWriter::GetLinkerSubstitution(
-                &target, tool, SUBSTITUTION_OUTPUT_EXTENSION));
+  EXPECT_EQ("", SubstitutionWriter::GetLinkerSubstitution(
+                    &target, tool, SUBSTITUTION_OUTPUT_EXTENSION));
 
   // Output directory is tested in a separate test below.
 }
@@ -320,18 +304,20 @@
   ASSERT_TRUE(output_name.Parse("{{output_dir}}/{{target_output_name}}.exe",
                                 nullptr, &err));
   EXPECT_EQ("./baz/baz.exe",
-            SubstitutionWriter::ApplyPatternToLinkerAsOutputFile(
-                &target, &tool, output_name).value());
+            SubstitutionWriter::ApplyPatternToLinkerAsOutputFile(&target, &tool,
+                                                                 output_name)
+                .value());
 
   // Override the output name to the root build dir.
   target.set_output_dir(SourceDir("//out/Debug/"));
-  EXPECT_EQ("./baz.exe",
-            SubstitutionWriter::ApplyPatternToLinkerAsOutputFile(
-                &target, &tool, output_name).value());
+  EXPECT_EQ("./baz.exe", SubstitutionWriter::ApplyPatternToLinkerAsOutputFile(
+                             &target, &tool, output_name)
+                             .value());
 
   // Override the output name to a new subdirectory.
   target.set_output_dir(SourceDir("//out/Debug/foo/bar"));
   EXPECT_EQ("foo/bar/baz.exe",
-            SubstitutionWriter::ApplyPatternToLinkerAsOutputFile(
-                &target, &tool, output_name).value());
+            SubstitutionWriter::ApplyPatternToLinkerAsOutputFile(&target, &tool,
+                                                                 output_name)
+                .value());
 }
diff --git a/tools/gn/switches.cc b/tools/gn/switches.cc
index 05c2a5b..3d77642 100644
--- a/tools/gn/switches.cc
+++ b/tools/gn/switches.cc
@@ -7,8 +7,7 @@
 namespace switches {
 
 const char kArgs[] = "args";
-const char kArgs_HelpShort[] =
-    "--args: Specifies build arguments overrides.";
+const char kArgs_HelpShort[] = "--args: Specifies build arguments overrides.";
 const char kArgs_Help[] =
     R"(--args: Specifies build arguments overrides.
 
@@ -39,21 +38,20 @@
   gn desc out/Default --args="some_list=[1, false, \"foo\"]"
 )";
 
-#define COLOR_HELP_LONG \
-    "--[no]color: Forces colored output on or off.\n"\
-    "\n"\
-    "  Normally GN will try to detect whether it is outputting to a terminal\n"\
-    "  and will enable or disable color accordingly. Use of these switches\n"\
-    "  will override the default.\n"\
-    "\n"\
-    "Examples\n"\
-    "\n"\
-    "  gn gen out/Default --color\n"\
-    "\n"\
-    "  gn gen out/Default --nocolor\n"
+#define COLOR_HELP_LONG                                                       \
+  "--[no]color: Forces colored output on or off.\n"                           \
+  "\n"                                                                        \
+  "  Normally GN will try to detect whether it is outputting to a terminal\n" \
+  "  and will enable or disable color accordingly. Use of these switches\n"   \
+  "  will override the default.\n"                                            \
+  "\n"                                                                        \
+  "Examples\n"                                                                \
+  "\n"                                                                        \
+  "  gn gen out/Default --color\n"                                            \
+  "\n"                                                                        \
+  "  gn gen out/Default --nocolor\n"
 const char kColor[] = "color";
-const char kColor_HelpShort[] =
-    "--color: Force colored output.";
+const char kColor_HelpShort[] = "--color: Force colored output.";
 const char kColor_Help[] = COLOR_HELP_LONG;
 
 const char kDotfile[] = "dotfile";
@@ -101,8 +99,7 @@
     "--markdown: Write help output in the Markdown format.\n";
 
 const char kNoColor[] = "nocolor";
-const char kNoColor_HelpShort[] =
-    "--nocolor: Force non-colored output.";
+const char kNoColor_HelpShort[] = "--nocolor: Force non-colored output.";
 const char kNoColor_Help[] = COLOR_HELP_LONG;
 
 const char kScriptExecutable[] = "script-executable";
@@ -127,8 +124,7 @@
 )";
 
 const char kRoot[] = "root";
-const char kRoot_HelpShort[] =
-    "--root: Explicitly specify source root.";
+const char kRoot_HelpShort[] = "--root: Explicitly specify source root.";
 const char kRoot_Help[] =
     R"(--root: Explicitly specify source root.
 
@@ -229,8 +225,7 @@
 )";
 
 const char kVerbose[] = "v";
-const char kVerbose_HelpShort[] =
-    "-v: Verbose logging.";
+const char kVerbose_HelpShort[] = "-v: Verbose logging.";
 const char kVerbose_Help[] =
     R"(-v: Verbose logging.
 
@@ -250,18 +245,13 @@
 
 // -----------------------------------------------------------------------------
 
-SwitchInfo::SwitchInfo()
-    : short_help(""),
-      long_help("") {
-}
+SwitchInfo::SwitchInfo() : short_help(""), long_help("") {}
 
 SwitchInfo::SwitchInfo(const char* short_help, const char* long_help)
-    : short_help(short_help),
-      long_help(long_help) {
-}
+    : short_help(short_help), long_help(long_help) {}
 
 #define INSERT_VARIABLE(var) \
-    info_map[k##var] = SwitchInfo(k##var##_HelpShort, k##var##_Help);
+  info_map[k##var] = SwitchInfo(k##var##_HelpShort, k##var##_Help);
 
 const SwitchInfoMap& GetSwitches() {
   static SwitchInfoMap info_map;
diff --git a/tools/gn/switches.h b/tools/gn/switches.h
index effaa25..1dc9828 100644
--- a/tools/gn/switches.h
+++ b/tools/gn/switches.h
@@ -13,8 +13,7 @@
 
 struct SwitchInfo {
   SwitchInfo();
-  SwitchInfo(const char* short_help,
-             const char* long_help);
+  SwitchInfo(const char* short_help, const char* long_help);
 
   const char* short_help;
   const char* long_help;
@@ -92,14 +91,14 @@
 // but it's documented in the individual commands it applies to rather than
 // globally.
 extern const char kAllToolchains[];
-#define ALL_TOOLCHAINS_SWITCH_HELP \
-  "  --all-toolchains\n" \
-  "      Normally only inputs in the default toolchain will be included.\n" \
-  "      This switch will turn on matching all toolchains.\n" \
-  "\n" \
-  "      For example, a file is in a target might be compiled twice:\n" \
+#define ALL_TOOLCHAINS_SWITCH_HELP                                             \
+  "  --all-toolchains\n"                                                       \
+  "      Normally only inputs in the default toolchain will be included.\n"    \
+  "      This switch will turn on matching all toolchains.\n"                  \
+  "\n"                                                                         \
+  "      For example, a file is in a target might be compiled twice:\n"        \
   "      once in the default toolchain and once in a secondary one. Without\n" \
-  "      this flag, only the default toolchain one will be matched by\n" \
+  "      this flag, only the default toolchain one will be matched by\n"       \
   "      wildcards. With this flag, both will be matched.\n"
 
 }  // namespace switches
diff --git a/tools/gn/target.cc b/tools/gn/target.cc
index d0714a8..9fc2770 100644
--- a/tools/gn/target.cc
+++ b/tools/gn/target.cc
@@ -45,14 +45,17 @@
 }
 
 Err MakeTestOnlyError(const Target* from, const Target* to) {
-  return Err(from->defined_from(), "Test-only dependency not allowed.",
-      from->label().GetUserVisibleName(false) + "\n"
-      "which is NOT marked testonly can't depend on\n" +
-      to->label().GetUserVisibleName(false) + "\n"
-      "which is marked testonly. Only targets with \"testonly = true\"\n"
-      "can depend on other test-only targets.\n"
-      "\n"
-      "Either mark it test-only or don't do this dependency.");
+  return Err(
+      from->defined_from(), "Test-only dependency not allowed.",
+      from->label().GetUserVisibleName(false) +
+          "\n"
+          "which is NOT marked testonly can't depend on\n" +
+          to->label().GetUserVisibleName(false) +
+          "\n"
+          "which is marked testonly. Only targets with \"testonly = true\"\n"
+          "can depend on other test-only targets.\n"
+          "\n"
+          "Either mark it test-only or don't do this dependency.");
 }
 
 // Set check_private_deps to true for the first invocation since a target
@@ -393,10 +396,8 @@
 }
 
 bool Target::IsBinary() const {
-  return output_type_ == EXECUTABLE ||
-         output_type_ == SHARED_LIBRARY ||
-         output_type_ == LOADABLE_MODULE ||
-         output_type_ == STATIC_LIBRARY ||
+  return output_type_ == EXECUTABLE || output_type_ == SHARED_LIBRARY ||
+         output_type_ == LOADABLE_MODULE || output_type_ == STATIC_LIBRARY ||
          output_type_ == SOURCE_SET;
 }
 
@@ -405,32 +406,29 @@
 }
 
 bool Target::IsFinal() const {
-  return output_type_ == EXECUTABLE ||
-         output_type_ == SHARED_LIBRARY ||
-         output_type_ == LOADABLE_MODULE ||
-         output_type_ == ACTION ||
-         output_type_ == ACTION_FOREACH ||
-         output_type_ == COPY_FILES ||
+  return output_type_ == EXECUTABLE || output_type_ == SHARED_LIBRARY ||
+         output_type_ == LOADABLE_MODULE || output_type_ == ACTION ||
+         output_type_ == ACTION_FOREACH || output_type_ == COPY_FILES ||
          output_type_ == CREATE_BUNDLE ||
          (output_type_ == STATIC_LIBRARY && complete_static_lib_);
 }
 
 DepsIteratorRange Target::GetDeps(DepsIterationType type) const {
   if (type == DEPS_LINKED) {
-    return DepsIteratorRange(DepsIterator(
-        &public_deps_, &private_deps_, nullptr));
+    return DepsIteratorRange(
+        DepsIterator(&public_deps_, &private_deps_, nullptr));
   }
   // All deps.
-  return DepsIteratorRange(DepsIterator(
-      &public_deps_, &private_deps_, &data_deps_));
+  return DepsIteratorRange(
+      DepsIterator(&public_deps_, &private_deps_, &data_deps_));
 }
 
 std::string Target::GetComputedOutputName() const {
   DCHECK(toolchain_)
       << "Toolchain must be specified before getting the computed output name.";
 
-  const std::string& name = output_name_.empty() ? label().name()
-                                                 : output_name_;
+  const std::string& name =
+      output_name_.empty() ? label().name() : output_name_;
 
   std::string result;
   const Tool* tool = toolchain_->GetToolForTargetFinalOutput(this);
@@ -457,18 +455,20 @@
 
   // Tool not specified for this target type.
   if (err) {
-    *err = Err(defined_from(), "This target uses an undefined tool.",
-        base::StringPrintf(
-            "The target %s\n"
-            "of type \"%s\"\n"
-            "uses toolchain %s\n"
-            "which doesn't have the tool \"%s\" defined.\n\n"
-            "Alas, I can not continue.",
-            label().GetUserVisibleName(false).c_str(),
-            GetStringForOutputType(output_type_),
-            label().GetToolchainLabel().GetUserVisibleName(false).c_str(),
-            Toolchain::ToolTypeToName(
-                toolchain->GetToolTypeForTargetFinalOutput(this)).c_str()));
+    *err =
+        Err(defined_from(), "This target uses an undefined tool.",
+            base::StringPrintf(
+                "The target %s\n"
+                "of type \"%s\"\n"
+                "uses toolchain %s\n"
+                "which doesn't have the tool \"%s\" defined.\n\n"
+                "Alas, I can not continue.",
+                label().GetUserVisibleName(false).c_str(),
+                GetStringForOutputType(output_type_),
+                label().GetToolchainLabel().GetUserVisibleName(false).c_str(),
+                Toolchain::ToolTypeToName(
+                    toolchain->GetToolTypeForTargetFinalOutput(this))
+                    .c_str()));
   }
   return false;
 }
@@ -496,8 +496,8 @@
     return false;  // Tool does not apply for this toolchain.file.
 
   // Figure out what output(s) this compiler produces.
-  SubstitutionWriter::ApplyListToCompilerAsOutputFile(
-      this, source, tool->outputs(), outputs);
+  SubstitutionWriter::ApplyListToCompilerAsOutputFile(this, source,
+                                                      tool->outputs(), outputs);
   return !outputs->empty();
 }
 
@@ -518,8 +518,7 @@
 void Target::PullDependentTargetLibsFrom(const Target* dep, bool is_public) {
   // Direct dependent libraries.
   if (dep->output_type() == STATIC_LIBRARY ||
-      dep->output_type() == SHARED_LIBRARY ||
-      dep->output_type() == SOURCE_SET)
+      dep->output_type() == SHARED_LIBRARY || dep->output_type() == SOURCE_SET)
     inherited_libraries_.Append(dep, is_public);
 
   if (dep->output_type() == SHARED_LIBRARY) {
@@ -542,8 +541,8 @@
     // Static libraries and source sets aren't inherited across shared
     // library boundaries because they will be linked into the shared
     // library.
-    inherited_libraries_.AppendPublicSharedLibraries(
-        dep->inherited_libraries(), is_public);
+    inherited_libraries_.AppendPublicSharedLibraries(dep->inherited_libraries(),
+                                                     is_public);
   } else if (!dep->IsFinal()) {
     // The current target isn't linked, so propogate linked deps and
     // libraries up the dependency tree.
@@ -757,18 +756,21 @@
       // Already have a precompiled header values, the settings must match.
       if (config_values_.precompiled_header() != cur.precompiled_header() ||
           config_values_.precompiled_source() != cur.precompiled_source()) {
-        *err = Err(defined_from(),
-            "Precompiled header setting conflict.",
-            "The target " + label().GetUserVisibleName(false) + "\n"
-            "has conflicting precompiled header settings.\n"
-            "\n"
-            "From " + pch_header_settings_from->GetUserVisibleName(false) +
-            "\n  header: " + config_values_.precompiled_header() +
-            "\n  source: " + config_values_.precompiled_source().value() +
-            "\n\n"
-            "From " + config->label().GetUserVisibleName(false) +
-            "\n  header: " + cur.precompiled_header() +
-            "\n  source: " + cur.precompiled_source().value());
+        *err = Err(
+            defined_from(), "Precompiled header setting conflict.",
+            "The target " + label().GetUserVisibleName(false) +
+                "\n"
+                "has conflicting precompiled header settings.\n"
+                "\n"
+                "From " +
+                pch_header_settings_from->GetUserVisibleName(false) +
+                "\n  header: " + config_values_.precompiled_header() +
+                "\n  source: " + config_values_.precompiled_source().value() +
+                "\n\n"
+                "From " +
+                config->label().GetUserVisibleName(false) +
+                "\n  header: " + cur.precompiled_header() +
+                "\n  source: " + cur.precompiled_source().value());
         return false;
       }
     } else {
@@ -817,12 +819,11 @@
 
   if (!RecursiveCheckAssertNoDeps(this, false, assert_no_deps_, &visited,
                                   &failure_path_str, &failure_pattern)) {
-    *err = Err(defined_from(), "assert_no_deps failed.",
+    *err = Err(
+        defined_from(), "assert_no_deps failed.",
         label().GetUserVisibleName(false) +
-        " has an assert_no_deps entry:\n  " +
-        failure_pattern->Describe() +
-        "\nwhich fails for the dependency path:\n" +
-        failure_path_str);
+            " has an assert_no_deps entry:\n  " + failure_pattern->Describe() +
+            "\nwhich fails for the dependency path:\n" + failure_path_str);
     return false;
   }
   return true;
diff --git a/tools/gn/target.h b/tools/gn/target.h
index ed8abd5..8754b61 100644
--- a/tools/gn/target.h
+++ b/tools/gn/target.h
@@ -48,7 +48,7 @@
   };
 
   enum DepsIterationType {
-    DEPS_ALL,  // Iterates through all public, private, and data deps.
+    DEPS_ALL,     // Iterates through all public, private, and data deps.
     DEPS_LINKED,  // Iterates through all non-data dependencies.
   };
 
@@ -118,9 +118,7 @@
     output_extension_ = extension;
     output_extension_set_ = true;
   }
-  bool output_extension_set() const {
-    return output_extension_set_;
-  }
+  bool output_extension_set() const { return output_extension_set_; }
 
   const FileList& sources() const { return sources_; }
   FileList& sources() { return sources_; }
@@ -212,9 +210,7 @@
   const UniqueVector<LabelConfigPair>& public_configs() const {
     return public_configs_;
   }
-  UniqueVector<LabelConfigPair>& public_configs() {
-    return public_configs_;
-  }
+  UniqueVector<LabelConfigPair>& public_configs() { return public_configs_; }
 
   // Dependencies that can include files from this target.
   const std::set<Label>& allow_circular_includes_from() const {
@@ -284,9 +280,7 @@
   // These are only known once the target is resolved and will be empty before
   // that. This is a cache of the files to prevent every target that depends on
   // a given library from recomputing the same pattern.
-  const OutputFile& link_output_file() const {
-    return link_output_file_;
-  }
+  const OutputFile& link_output_file() const { return link_output_file_; }
   const OutputFile& dependency_output_file() const {
     return dependency_output_file_;
   }
diff --git a/tools/gn/target_generator.cc b/tools/gn/target_generator.cc
index ab85729..4bc693c 100644
--- a/tools/gn/target_generator.cc
+++ b/tools/gn/target_generator.cc
@@ -35,8 +35,7 @@
     : target_(target),
       scope_(scope),
       function_call_(function_call),
-      err_(err) {
-}
+      err_(err) {}
 
 TargetGenerator::~TargetGenerator() = default;
 
@@ -75,9 +74,8 @@
                                      Err* err) {
   // Name is the argument to the function.
   if (args.size() != 1u || args[0].type() != Value::STRING) {
-    *err = Err(function_call,
-        "Target generator requires one string argument.",
-        "Otherwise I'm not sure what to call this target.");
+    *err = Err(function_call, "Target generator requires one string argument.",
+               "Otherwise I'm not sure what to call this target.");
     return;
   }
 
@@ -96,8 +94,8 @@
 
   // Create and call out to the proper generator.
   if (output_type == functions::kBundleData) {
-    BundleDataTargetGenerator generator(
-        target.get(), scope, function_call, err);
+    BundleDataTargetGenerator generator(target.get(), scope, function_call,
+                                        err);
     generator.Run();
   } else if (output_type == functions::kCreateBundle) {
     CreateBundleTargetGenerator generator(target.get(), scope, function_call,
@@ -287,18 +285,19 @@
   if (!allow_substitutions) {
     // Verify no substitutions were actually used.
     if (!outputs.required_types().empty()) {
-      *err_ = Err(*value, "Source expansions not allowed here.",
-          "The outputs of this target used source {{expansions}} but this "
-          "target type\ndoesn't support them. Just express the outputs "
-          "literally.");
+      *err_ =
+          Err(*value, "Source expansions not allowed here.",
+              "The outputs of this target used source {{expansions}} but this "
+              "target type\ndoesn't support them. Just express the outputs "
+              "literally.");
       return false;
     }
   }
 
   // Check the substitutions used are valid for this purpose.
   if (!EnsureValidSubstitutions(outputs.required_types(),
-                                &IsValidSourceSubstitution,
-                                value->origin(), err_))
+                                &IsValidSourceSubstitution, value->origin(),
+                                err_))
     return false;
 
   // Validate that outputs are in the output dir.
@@ -332,19 +331,19 @@
 
   if (pattern.ranges()[0].type == SUBSTITUTION_LITERAL) {
     // If the first thing is a literal, it must start with the output dir.
-    if (!EnsureStringIsInOutputDir(
-            GetBuildSettings()->build_dir(),
-            pattern.ranges()[0].literal, original_value.origin(), err_))
+    if (!EnsureStringIsInOutputDir(GetBuildSettings()->build_dir(),
+                                   pattern.ranges()[0].literal,
+                                   original_value.origin(), err_))
       return false;
   } else {
     // Otherwise, the first subrange must be a pattern that expands to
     // something in the output directory.
     if (!SubstitutionIsInOutputDir(pattern.ranges()[0].type)) {
-      *err_ = Err(original_value,
-          "File is not inside output directory.",
-          "The given file should be in the output directory. Normally you\n"
-          "would specify\n\"$target_out_dir/foo\" or "
-          "\"{{source_gen_dir}}/foo\".");
+      *err_ =
+          Err(original_value, "File is not inside output directory.",
+              "The given file should be in the output directory. Normally you\n"
+              "would specify\n\"$target_out_dir/foo\" or "
+              "\"{{source_gen_dir}}/foo\".");
       return false;
     }
   }
@@ -383,7 +382,7 @@
   if (err_->has_error())
     return false;
   if (!EnsureStringIsInOutputDir(GetBuildSettings()->build_dir(),
-          source_file.value(), value->origin(), err_))
+                                 source_file.value(), value->origin(), err_))
     return false;
   OutputFile output_file(GetBuildSettings(), source_file);
   target_->set_write_runtime_deps_output(output_file);
diff --git a/tools/gn/target_unittest.cc b/tools/gn/target_unittest.cc
index 88cad09..a04c911 100644
--- a/tools/gn/target_unittest.cc
+++ b/tools/gn/target_unittest.cc
@@ -28,8 +28,8 @@
   ASSERT_TRUE(found != unknown.end()) << file.value();
   EXPECT_TRUE(target == found->second)
       << "Target doesn't match. Expected\n  "
-      << target->label().GetUserVisibleName(false)
-      << "\nBut got\n  " << found->second->label().GetUserVisibleName(false);
+      << target->label().GetUserVisibleName(false) << "\nBut got\n  "
+      << found->second->label().GetUserVisibleName(false);
 }
 
 }  // namespace
@@ -599,18 +599,18 @@
 
   const char kLinkPattern[] =
       "{{root_out_dir}}/{{target_output_name}}{{output_extension}}";
-  SubstitutionPattern link_output = SubstitutionPattern::MakeForTest(
-      kLinkPattern);
+  SubstitutionPattern link_output =
+      SubstitutionPattern::MakeForTest(kLinkPattern);
   solink_tool->set_link_output(link_output);
 
   const char kDependPattern[] =
       "{{root_out_dir}}/{{target_output_name}}{{output_extension}}.TOC";
-  SubstitutionPattern depend_output = SubstitutionPattern::MakeForTest(
-      kDependPattern);
+  SubstitutionPattern depend_output =
+      SubstitutionPattern::MakeForTest(kDependPattern);
   solink_tool->set_depend_output(depend_output);
 
-  solink_tool->set_outputs(SubstitutionList::MakeForTest(
-      kLinkPattern, kDependPattern));
+  solink_tool->set_outputs(
+      SubstitutionList::MakeForTest(kLinkPattern, kDependPattern));
 
   toolchain.SetTool(Toolchain::TYPE_SOLINK, std::move(solink_tool));
 
@@ -644,8 +644,7 @@
       "{{root_out_dir}}/{{target_output_name}}{{output_extension}}.lib";
   const char kDllPattern[] =
       "{{root_out_dir}}/{{target_output_name}}{{output_extension}}";
-  const char kPdbPattern[] =
-      "{{root_out_dir}}/{{target_output_name}}.pdb";
+  const char kPdbPattern[] = "{{root_out_dir}}/{{target_output_name}}.pdb";
   SubstitutionPattern pdb_pattern =
       SubstitutionPattern::MakeForTest(kPdbPattern);
 
@@ -653,8 +652,8 @@
       SubstitutionList::MakeForTest(kLibPattern, kDllPattern, kPdbPattern));
 
   // Say we only want the DLL and symbol file treaded as runtime outputs.
-  solink_tool->set_runtime_outputs(SubstitutionList::MakeForTest(
-      kDllPattern, kPdbPattern));
+  solink_tool->set_runtime_outputs(
+      SubstitutionList::MakeForTest(kDllPattern, kPdbPattern));
 
   toolchain.SetTool(Toolchain::TYPE_SOLINK, std::move(solink_tool));
 
@@ -935,9 +934,9 @@
   // B depends on A and has an assert_no_deps for a random dir.
   TestTarget b(setup, "//b", Target::SHARED_LIBRARY);
   b.private_deps().push_back(LabelTargetPair(&a));
-  b.assert_no_deps().push_back(LabelPattern(
-      LabelPattern::RECURSIVE_DIRECTORY, SourceDir("//disallowed/"),
-      std::string(), Label()));
+  b.assert_no_deps().push_back(LabelPattern(LabelPattern::RECURSIVE_DIRECTORY,
+                                            SourceDir("//disallowed/"),
+                                            std::string(), Label()));
   ASSERT_TRUE(b.OnResolved(&err));
 
   LabelPattern disallow_a(LabelPattern::RECURSIVE_DIRECTORY, SourceDir("//a/"),
diff --git a/tools/gn/template.cc b/tools/gn/template.cc
index ad28680..2b40fb3 100644
--- a/tools/gn/template.cc
+++ b/tools/gn/template.cc
@@ -16,9 +16,7 @@
 #include "tools/gn/variables.h"
 
 Template::Template(const Scope* scope, const FunctionCallNode* def)
-    : closure_(scope->MakeClosure()),
-      definition_(def) {
-}
+    : closure_(scope->MakeClosure()), definition_(def) {}
 
 Template::Template(std::unique_ptr<Scope> scope, const FunctionCallNode* def)
     : closure_(std::move(scope)), definition_(def) {}
@@ -39,8 +37,8 @@
   // First run the invocation's block. Need to allocate the scope on the heap
   // so we can pass ownership to the template.
   std::unique_ptr<Scope> invocation_scope = std::make_unique<Scope>(scope);
-  if (!FillTargetBlockScope(scope, invocation, template_name,
-                            block, args, invocation_scope.get(), err))
+  if (!FillTargetBlockScope(scope, invocation, template_name, block, args,
+                            invocation_scope.get(), err))
     return Value();
 
   {
@@ -86,13 +84,11 @@
   template_scope.set_source_dir(scope->GetSourceDir());
 
   const base::StringPiece target_name(variables::kTargetName);
-  template_scope.SetValue(target_name,
-                          Value(invocation, args[0].string_value()),
-                          invocation);
+  template_scope.SetValue(
+      target_name, Value(invocation, args[0].string_value()), invocation);
 
   // Actually run the template code.
-  Value result =
-      definition_->block()->Execute(&template_scope, err);
+  Value result = definition_->block()->Execute(&template_scope, err);
   if (err->has_error()) {
     // If there was an error, append the caller location so the error message
     // displays a stack trace of how it got here.
@@ -108,8 +104,8 @@
   // to overwrite the value of "invoker" and free the Scope owned by the
   // value. So we need to look it up again and don't do anything if it doesn't
   // exist.
-  invoker_value = template_scope.GetMutableValue(
-      variables::kInvoker, Scope::SEARCH_NESTED, false);
+  invoker_value = template_scope.GetMutableValue(variables::kInvoker,
+                                                 Scope::SEARCH_NESTED, false);
   if (invoker_value && invoker_value->type() == Value::SCOPE) {
     if (!invoker_value->scope_value()->CheckForUnusedVars(err))
       return Value();
diff --git a/tools/gn/test_with_scope.cc b/tools/gn/test_with_scope.cc
index c834e7c..7063acd 100644
--- a/tools/gn/test_with_scope.cc
+++ b/tools/gn/test_with_scope.cc
@@ -127,8 +127,10 @@
 
   // SOLINK
   std::unique_ptr<Tool> solink_tool = std::make_unique<Tool>();
-  SetCommandForTool("ld -shared -o {{target_output_name}}.so {{inputs}} "
-      "{{ldflags}} {{libs}}", solink_tool.get());
+  SetCommandForTool(
+      "ld -shared -o {{target_output_name}}.so {{inputs}} "
+      "{{ldflags}} {{libs}}",
+      solink_tool.get());
   solink_tool->set_lib_switch("-l");
   solink_tool->set_lib_dir_switch("-L");
   solink_tool->set_output_prefix("lib");
@@ -139,8 +141,10 @@
 
   // SOLINK_MODULE
   std::unique_ptr<Tool> solink_module_tool = std::make_unique<Tool>();
-  SetCommandForTool("ld -bundle -o {{target_output_name}}.so {{inputs}} "
-      "{{ldflags}} {{libs}}", solink_module_tool.get());
+  SetCommandForTool(
+      "ld -bundle -o {{target_output_name}}.so {{inputs}} "
+      "{{ldflags}} {{libs}}",
+      solink_module_tool.get());
   solink_module_tool->set_lib_switch("-l");
   solink_module_tool->set_lib_dir_switch("-L");
   solink_module_tool->set_output_prefix("lib");
@@ -152,12 +156,14 @@
 
   // LINK
   std::unique_ptr<Tool> link_tool = std::make_unique<Tool>();
-  SetCommandForTool("ld -o {{target_output_name}} {{source}} "
-      "{{ldflags}} {{libs}}", link_tool.get());
+  SetCommandForTool(
+      "ld -o {{target_output_name}} {{source}} "
+      "{{ldflags}} {{libs}}",
+      link_tool.get());
   link_tool->set_lib_switch("-l");
   link_tool->set_lib_dir_switch("-L");
-  link_tool->set_outputs(SubstitutionList::MakeForTest(
-      "{{root_out_dir}}/{{target_output_name}}"));
+  link_tool->set_outputs(
+      SubstitutionList::MakeForTest("{{root_out_dir}}/{{target_output_name}}"));
   toolchain->SetTool(Toolchain::TYPE_LINK, std::move(link_tool));
 
   // STAMP
@@ -190,8 +196,8 @@
   Err err;
   SubstitutionPattern command;
   command.Parse(cmd, nullptr, &err);
-  CHECK(!err.has_error())
-      << "Couldn't parse \"" << cmd << "\", " << "got " << err.message();
+  CHECK(!err.has_error()) << "Couldn't parse \"" << cmd << "\", "
+                          << "got " << err.message();
   tool->set_command(command);
 }
 
diff --git a/tools/gn/token.cc b/tools/gn/token.cc
index 6721619..3c016fd 100644
--- a/tools/gn/token.cc
+++ b/tools/gn/token.cc
@@ -6,16 +6,10 @@
 
 #include "base/logging.h"
 
-Token::Token() : type_(INVALID), value_() {
-}
+Token::Token() : type_(INVALID), value_() {}
 
-Token::Token(const Location& location,
-             Type t,
-             const base::StringPiece& v)
-    : type_(t),
-      value_(v),
-      location_(location) {
-}
+Token::Token(const Location& location, Type t, const base::StringPiece& v)
+    : type_(t), value_(v), location_(location) {}
 
 Token::Token(const Token& other) = default;
 
diff --git a/tools/gn/token.h b/tools/gn/token.h
index 24c4e9c..126201c 100644
--- a/tools/gn/token.h
+++ b/tools/gn/token.h
@@ -12,8 +12,8 @@
  public:
   enum Type {
     INVALID,
-    INTEGER,    // 123
-    STRING,     // "blah"
+    INTEGER,     // 123
+    STRING,      // "blah"
     TRUE_TOKEN,  // Not "TRUE" to avoid collisions with #define in windows.h.
     FALSE_TOKEN,
 
@@ -43,13 +43,13 @@
 
     IF,
     ELSE,
-    IDENTIFIER, // foo
-    COMMA,  // ,
+    IDENTIFIER,            // foo
+    COMMA,                 // ,
     UNCLASSIFIED_COMMENT,  // #...\n, of unknown style (will be converted
                            // to one below)
-    LINE_COMMENT,      // #...\n on a line alone.
-    SUFFIX_COMMENT,    // #...\n on a line following other code.
-    BLOCK_COMMENT,     // #...\n line comment, but free-standing.
+    LINE_COMMENT,          // #...\n on a line alone.
+    SUFFIX_COMMENT,        // #...\n on a line following other code.
+    BLOCK_COMMENT,         // #...\n line comment, but free-standing.
 
     UNCLASSIFIED_OPERATOR,
 
@@ -67,8 +67,7 @@
   LocationRange range() const {
     return LocationRange(
         location_,
-        Location(location_.file(),
-                 location_.line_number(),
+        Location(location_.file(), location_.line_number(),
                  location_.column_number() + static_cast<int>(value_.size()),
                  location_.byte() + static_cast<int>(value_.size())));
   }
diff --git a/tools/gn/tokenizer.cc b/tools/gn/tokenizer.cc
index 306f626..b596c74 100644
--- a/tools/gn/tokenizer.cc
+++ b/tools/gn/tokenizer.cc
@@ -11,8 +11,8 @@
 namespace {
 
 bool CouldBeTwoCharOperatorBegin(char c) {
-  return c == '<' || c == '>' || c == '!' || c == '=' || c == '-' ||
-         c == '+' || c == '|' || c == '&';
+  return c == '<' || c == '>' || c == '!' || c == '=' || c == '-' || c == '+' ||
+         c == '|' || c == '&';
 }
 
 bool CouldBeTwoCharOperatorEnd(char c) {
@@ -20,8 +20,8 @@
 }
 
 bool CouldBeOneCharOperator(char c) {
-  return c == '=' || c == '<' || c == '>' || c == '+' || c == '!' ||
-         c == ':' || c == '|' || c == '&' || c == '-';
+  return c == '=' || c == '<' || c == '>' || c == '+' || c == '!' || c == ':' ||
+         c == '|' || c == '&' || c == '-';
 }
 
 bool CouldBeOperator(char c) {
@@ -74,8 +74,7 @@
       err_(err),
       cur_(0),
       line_number_(1),
-      column_number_(1) {
-}
+      column_number_(1) {}
 
 Tokenizer::~Tokenizer() = default;
 
@@ -129,7 +128,7 @@
                location.column_number())) {
         type = Token::LINE_COMMENT;
         if (!at_end())  // Could be EOF.
-          Advance();  // The current \n.
+          Advance();    // The current \n.
         // If this comment is separated from the next syntax element, then we
         // want to tag it as a block comment. This will become a standalone
         // statement at the parser level to keep this comment separate, rather
@@ -258,10 +257,9 @@
         // Require the char after a number to be some kind of space, scope,
         // or operator.
         char c = cur_char();
-        if (!IsCurrentWhitespace() && !CouldBeOperator(c) &&
-            !IsScoperChar(c) && c != ',') {
-          *err_ = Err(GetCurrentLocation(),
-                      "This is not a valid number.",
+        if (!IsCurrentWhitespace() && !CouldBeOperator(c) && !IsScoperChar(c) &&
+            c != ',') {
+          *err_ = Err(GetCurrentLocation(), "This is not a valid number.",
                       "Learn to count.");
           // Highlight the number.
           err_->AppendRange(LocationRange(location, GetCurrentLocation()));
@@ -382,8 +380,8 @@
 }
 
 Location Tokenizer::GetCurrentLocation() const {
-  return Location(
-      input_file_, line_number_, column_number_, static_cast<int>(cur_));
+  return Location(input_file_, line_number_, column_number_,
+                  static_cast<int>(cur_));
 }
 
 Err Tokenizer::GetErrorForInvalidToken(const Location& location) const {
@@ -393,10 +391,11 @@
     help = "Semicolons are not needed, delete this one.";
   } else if (cur_char() == '\t') {
     // Tab.
-    help = "You got a tab character in here. Tabs are evil. "
-           "Convert to spaces.";
+    help =
+        "You got a tab character in here. Tabs are evil. "
+        "Convert to spaces.";
   } else if (cur_char() == '/' && cur_ + 1 < input_.size() &&
-      (input_[cur_ + 1] == '/' || input_[cur_ + 1] == '*')) {
+             (input_[cur_ + 1] == '/' || input_[cur_ + 1] == '*')) {
     // Different types of comments.
     help = "Comments should start with # instead";
   } else if (cur_char() == '\'') {
diff --git a/tools/gn/tokenizer_unittest.cc b/tools/gn/tokenizer_unittest.cc
index 7c6c980..124031d 100644
--- a/tools/gn/tokenizer_unittest.cc
+++ b/tools/gn/tokenizer_unittest.cc
@@ -16,7 +16,7 @@
   const char* value;
 };
 
-template<size_t len>
+template <size_t len>
 bool CheckTokenizer(const char* input, const TokenExpectation (&expect)[len]) {
   InputFile input_file(SourceFile("/test"));
   input_file.SetContents(input);
@@ -53,84 +53,69 @@
 }
 
 TEST(Tokenizer, Identifier) {
-  TokenExpectation one_ident[] = {
-    { Token::IDENTIFIER, "foo" }
-  };
+  TokenExpectation one_ident[] = {{Token::IDENTIFIER, "foo"}};
   EXPECT_TRUE(CheckTokenizer("  foo ", one_ident));
 }
 
 TEST(Tokenizer, Integer) {
-  TokenExpectation integers[] = {
-    { Token::INTEGER, "123" },
-    { Token::INTEGER, "-123" }
-  };
+  TokenExpectation integers[] = {{Token::INTEGER, "123"},
+                                 {Token::INTEGER, "-123"}};
   EXPECT_TRUE(CheckTokenizer("  123 -123 ", integers));
 }
 
 TEST(Tokenizer, IntegerNoSpace) {
-  TokenExpectation integers[] = {
-    { Token::INTEGER, "123" },
-    { Token::INTEGER, "-123" }
-  };
+  TokenExpectation integers[] = {{Token::INTEGER, "123"},
+                                 {Token::INTEGER, "-123"}};
   EXPECT_TRUE(CheckTokenizer("  123-123 ", integers));
 }
 
 TEST(Tokenizer, String) {
-  TokenExpectation strings[] = {
-    { Token::STRING, "\"foo\"" },
-    { Token::STRING, "\"bar\\\"baz\"" },
-    { Token::STRING, "\"asdf\\\\\"" }
-  };
-  EXPECT_TRUE(CheckTokenizer("  \"foo\" \"bar\\\"baz\" \"asdf\\\\\" ",
-              strings));
+  TokenExpectation strings[] = {{Token::STRING, "\"foo\""},
+                                {Token::STRING, "\"bar\\\"baz\""},
+                                {Token::STRING, "\"asdf\\\\\""}};
+  EXPECT_TRUE(
+      CheckTokenizer("  \"foo\" \"bar\\\"baz\" \"asdf\\\\\" ", strings));
 }
 
 TEST(Tokenizer, Operator) {
   TokenExpectation operators[] = {
-    { Token::MINUS, "-" },
-    { Token::PLUS, "+" },
-    { Token::EQUAL, "=" },
-    { Token::PLUS_EQUALS, "+=" },
-    { Token::MINUS_EQUALS, "-=" },
-    { Token::NOT_EQUAL, "!=" },
-    { Token::EQUAL_EQUAL, "==" },
-    { Token::LESS_THAN, "<" },
-    { Token::GREATER_THAN, ">" },
-    { Token::LESS_EQUAL, "<=" },
-    { Token::GREATER_EQUAL, ">=" },
-    { Token::BANG, "!" },
-    { Token::BOOLEAN_OR, "||" },
-    { Token::BOOLEAN_AND, "&&" },
-    { Token::DOT, "." },
-    { Token::COMMA, "," },
+      {Token::MINUS, "-"},
+      {Token::PLUS, "+"},
+      {Token::EQUAL, "="},
+      {Token::PLUS_EQUALS, "+="},
+      {Token::MINUS_EQUALS, "-="},
+      {Token::NOT_EQUAL, "!="},
+      {Token::EQUAL_EQUAL, "=="},
+      {Token::LESS_THAN, "<"},
+      {Token::GREATER_THAN, ">"},
+      {Token::LESS_EQUAL, "<="},
+      {Token::GREATER_EQUAL, ">="},
+      {Token::BANG, "!"},
+      {Token::BOOLEAN_OR, "||"},
+      {Token::BOOLEAN_AND, "&&"},
+      {Token::DOT, "."},
+      {Token::COMMA, ","},
   };
-  EXPECT_TRUE(CheckTokenizer("- + = += -= != ==  < > <= >= ! || && . ,",
-              operators));
+  EXPECT_TRUE(
+      CheckTokenizer("- + = += -= != ==  < > <= >= ! || && . ,", operators));
 }
 
 TEST(Tokenizer, Scoper) {
   TokenExpectation scopers[] = {
-    { Token::LEFT_BRACE, "{" },
-    { Token::LEFT_BRACKET, "[" },
-    { Token::RIGHT_BRACKET, "]" },
-    { Token::RIGHT_BRACE, "}" },
-    { Token::LEFT_PAREN, "(" },
-    { Token::RIGHT_PAREN, ")" },
+      {Token::LEFT_BRACE, "{"},    {Token::LEFT_BRACKET, "["},
+      {Token::RIGHT_BRACKET, "]"}, {Token::RIGHT_BRACE, "}"},
+      {Token::LEFT_PAREN, "("},    {Token::RIGHT_PAREN, ")"},
   };
   EXPECT_TRUE(CheckTokenizer("{[ ]} ()", scopers));
 }
 
 TEST(Tokenizer, FunctionCall) {
   TokenExpectation fn[] = {
-    { Token::IDENTIFIER, "fun" },
-    { Token::LEFT_PAREN, "(" },
-    { Token::STRING, "\"foo\"" },
-    { Token::RIGHT_PAREN, ")" },
-    { Token::LEFT_BRACE, "{" },
-    { Token::IDENTIFIER, "foo" },
-    { Token::EQUAL, "=" },
-    { Token::INTEGER, "12" },
-    { Token::RIGHT_BRACE, "}" },
+      {Token::IDENTIFIER, "fun"}, {Token::LEFT_PAREN, "("},
+      {Token::STRING, "\"foo\""}, {Token::RIGHT_PAREN, ")"},
+      {Token::LEFT_BRACE, "{"},   {Token::IDENTIFIER, "foo"},
+      {Token::EQUAL, "="},        {Token::INTEGER, "12"},
+      {Token::RIGHT_BRACE, "}"},
   };
   EXPECT_TRUE(CheckTokenizer("fun(\"foo\") {\nfoo = 12}", fn));
 }
@@ -167,27 +152,27 @@
 
 TEST(Tokenizer, Comments) {
   TokenExpectation fn[] = {
-    { Token::LINE_COMMENT, "# Stuff" },
-    { Token::IDENTIFIER, "fun" },
-    { Token::LEFT_PAREN, "(" },
-    { Token::STRING, "\"foo\"" },
-    { Token::RIGHT_PAREN, ")" },
-    { Token::LEFT_BRACE, "{" },
-    { Token::SUFFIX_COMMENT, "# Things" },
-    { Token::LINE_COMMENT, "#Wee" },
-    { Token::IDENTIFIER, "foo" },
-    { Token::EQUAL, "=" },
-    { Token::INTEGER, "12" },
-    { Token::SUFFIX_COMMENT, "#Zip" },
-    { Token::RIGHT_BRACE, "}" },
+      {Token::LINE_COMMENT, "# Stuff"},
+      {Token::IDENTIFIER, "fun"},
+      {Token::LEFT_PAREN, "("},
+      {Token::STRING, "\"foo\""},
+      {Token::RIGHT_PAREN, ")"},
+      {Token::LEFT_BRACE, "{"},
+      {Token::SUFFIX_COMMENT, "# Things"},
+      {Token::LINE_COMMENT, "#Wee"},
+      {Token::IDENTIFIER, "foo"},
+      {Token::EQUAL, "="},
+      {Token::INTEGER, "12"},
+      {Token::SUFFIX_COMMENT, "#Zip"},
+      {Token::RIGHT_BRACE, "}"},
   };
-  EXPECT_TRUE(CheckTokenizer(
-      "# Stuff\n"
-      "fun(\"foo\") {  # Things\n"
-      "#Wee\n"
-      "foo = 12 #Zip\n"
-      "}",
-      fn));
+  EXPECT_TRUE(
+      CheckTokenizer("# Stuff\n"
+                     "fun(\"foo\") {  # Things\n"
+                     "#Wee\n"
+                     "foo = 12 #Zip\n"
+                     "}",
+                     fn));
 }
 
 TEST(Tokenizer, CommentsContinued) {
@@ -195,30 +180,22 @@
   // considered separate. In the second test, they are, so "B" is a
   // continuation of "A" (another SUFFIX comment).
   TokenExpectation fn1[] = {
-    { Token::IDENTIFIER, "fun" },
-    { Token::LEFT_PAREN, "(" },
-    { Token::STRING, "\"foo\"" },
-    { Token::RIGHT_PAREN, ")" },
-    { Token::LEFT_BRACE, "{" },
-    { Token::SUFFIX_COMMENT, "# A" },
-    { Token::LINE_COMMENT, "# B" },
-    { Token::RIGHT_BRACE, "}" },
+      {Token::IDENTIFIER, "fun"},   {Token::LEFT_PAREN, "("},
+      {Token::STRING, "\"foo\""},   {Token::RIGHT_PAREN, ")"},
+      {Token::LEFT_BRACE, "{"},     {Token::SUFFIX_COMMENT, "# A"},
+      {Token::LINE_COMMENT, "# B"}, {Token::RIGHT_BRACE, "}"},
   };
-  EXPECT_TRUE(CheckTokenizer(
-      "fun(\"foo\") {  # A\n"
-      "  # B\n"
-      "}",
-      fn1));
+  EXPECT_TRUE(
+      CheckTokenizer("fun(\"foo\") {  # A\n"
+                     "  # B\n"
+                     "}",
+                     fn1));
 
   TokenExpectation fn2[] = {
-    { Token::IDENTIFIER, "fun" },
-    { Token::LEFT_PAREN, "(" },
-    { Token::STRING, "\"foo\"" },
-    { Token::RIGHT_PAREN, ")" },
-    { Token::LEFT_BRACE, "{" },
-    { Token::SUFFIX_COMMENT, "# A" },
-    { Token::SUFFIX_COMMENT, "# B" },
-    { Token::RIGHT_BRACE, "}" },
+      {Token::IDENTIFIER, "fun"},     {Token::LEFT_PAREN, "("},
+      {Token::STRING, "\"foo\""},     {Token::RIGHT_PAREN, ")"},
+      {Token::LEFT_BRACE, "{"},       {Token::SUFFIX_COMMENT, "# A"},
+      {Token::SUFFIX_COMMENT, "# B"}, {Token::RIGHT_BRACE, "}"},
   };
   EXPECT_TRUE(CheckTokenizer(
       "fun(\"foo\") {  # A\n"
diff --git a/tools/gn/tool.cc b/tools/gn/tool.cc
index 31fb668..b066fba 100644
--- a/tools/gn/tool.cc
+++ b/tools/gn/tool.cc
@@ -9,8 +9,7 @@
       depsformat_(DEPS_GCC),
       precompiled_header_type_(PCH_NONE),
       restat_(false),
-      complete_(false) {
-}
+      complete_(false) {}
 
 Tool::~Tool() = default;
 
diff --git a/tools/gn/tool.h b/tools/gn/tool.h
index f44af2e..d2d0b7c 100644
--- a/tools/gn/tool.h
+++ b/tools/gn/tool.h
@@ -19,16 +19,9 @@
 
 class Tool {
  public:
-  enum DepsFormat {
-    DEPS_GCC = 0,
-    DEPS_MSVC = 1
-  };
+  enum DepsFormat { DEPS_GCC = 0, DEPS_MSVC = 1 };
 
-  enum PrecompiledHeaderType {
-    PCH_NONE = 0,
-    PCH_GCC = 1,
-    PCH_MSVC = 2
-  };
+  enum PrecompiledHeaderType { PCH_NONE = 0, PCH_GCC = 1, PCH_MSVC = 2 };
 
   Tool();
   ~Tool();
@@ -42,9 +35,7 @@
   // SetComplete(), at which point no other changes can be made.
 
   // Command to run.
-  const SubstitutionPattern& command() const {
-    return command_;
-  }
+  const SubstitutionPattern& command() const { return command_; }
   void set_command(SubstitutionPattern cmd) {
     DCHECK(!complete_);
     command_ = std::move(cmd);
@@ -69,17 +60,13 @@
   }
 
   // Dependency file (if supported).
-  const SubstitutionPattern& depfile() const {
-    return depfile_;
-  }
+  const SubstitutionPattern& depfile() const { return depfile_; }
   void set_depfile(SubstitutionPattern df) {
     DCHECK(!complete_);
     depfile_ = std::move(df);
   }
 
-  DepsFormat depsformat() const {
-    return depsformat_;
-  }
+  DepsFormat depsformat() const { return depsformat_; }
   void set_depsformat(DepsFormat f) {
     DCHECK(!complete_);
     depsformat_ = f;
@@ -92,82 +79,62 @@
     precompiled_header_type_ = pch_type;
   }
 
-  const SubstitutionPattern& description() const {
-    return description_;
-  }
+  const SubstitutionPattern& description() const { return description_; }
   void set_description(SubstitutionPattern desc) {
     DCHECK(!complete_);
     description_ = std::move(desc);
   }
 
-  const std::string& lib_switch() const {
-    return lib_switch_;
-  }
+  const std::string& lib_switch() const { return lib_switch_; }
   void set_lib_switch(std::string s) {
     DCHECK(!complete_);
     lib_switch_ = std::move(s);
   }
 
-  const std::string& lib_dir_switch() const {
-    return lib_dir_switch_;
-  }
+  const std::string& lib_dir_switch() const { return lib_dir_switch_; }
   void set_lib_dir_switch(std::string s) {
     DCHECK(!complete_);
     lib_dir_switch_ = std::move(s);
   }
 
-  const SubstitutionList& outputs() const {
-    return outputs_;
-  }
+  const SubstitutionList& outputs() const { return outputs_; }
   void set_outputs(SubstitutionList out) {
     DCHECK(!complete_);
     outputs_ = std::move(out);
   }
 
   // Should match files in the outputs() if nonempty.
-  const SubstitutionPattern& link_output() const {
-    return link_output_;
-  }
+  const SubstitutionPattern& link_output() const { return link_output_; }
   void set_link_output(SubstitutionPattern link_out) {
     DCHECK(!complete_);
     link_output_ = std::move(link_out);
   }
 
-  const SubstitutionPattern& depend_output() const {
-    return depend_output_;
-  }
+  const SubstitutionPattern& depend_output() const { return depend_output_; }
   void set_depend_output(SubstitutionPattern dep_out) {
     DCHECK(!complete_);
     depend_output_ = std::move(dep_out);
   }
 
-  const SubstitutionList& runtime_outputs() const {
-    return runtime_outputs_;
-  }
+  const SubstitutionList& runtime_outputs() const { return runtime_outputs_; }
   void set_runtime_outputs(SubstitutionList run_out) {
     DCHECK(!complete_);
     runtime_outputs_ = std::move(run_out);
   }
 
-  const std::string& output_prefix() const {
-    return output_prefix_;
-  }
+  const std::string& output_prefix() const { return output_prefix_; }
   void set_output_prefix(std::string s) {
     DCHECK(!complete_);
     output_prefix_ = std::move(s);
   }
 
-  bool restat() const {
-    return restat_;
-  }
+  bool restat() const { return restat_; }
   void set_restat(bool r) {
     DCHECK(!complete_);
     restat_ = r;
   }
 
-  const SubstitutionPattern& rspfile() const {
-    return rspfile_;
-  }
+  const SubstitutionPattern& rspfile() const { return rspfile_; }
   void set_rspfile(SubstitutionPattern rsp) {
     DCHECK(!complete_);
     rspfile_ = std::move(rsp);
diff --git a/tools/gn/toolchain.cc b/tools/gn/toolchain.cc
index 879acd9..0a8f1c5 100644
--- a/tools/gn/toolchain.cc
+++ b/tools/gn/toolchain.cc
@@ -45,42 +45,72 @@
 
 // static
 Toolchain::ToolType Toolchain::ToolNameToType(const base::StringPiece& str) {
-  if (str == kToolCc) return TYPE_CC;
-  if (str == kToolCxx) return TYPE_CXX;
-  if (str == kToolObjC) return TYPE_OBJC;
-  if (str == kToolObjCxx) return TYPE_OBJCXX;
-  if (str == kToolRc) return TYPE_RC;
-  if (str == kToolAsm) return TYPE_ASM;
-  if (str == kToolAlink) return TYPE_ALINK;
-  if (str == kToolSolink) return TYPE_SOLINK;
-  if (str == kToolSolinkModule) return TYPE_SOLINK_MODULE;
-  if (str == kToolLink) return TYPE_LINK;
-  if (str == kToolStamp) return TYPE_STAMP;
-  if (str == kToolCopy) return TYPE_COPY;
-  if (str == kToolCopyBundleData) return TYPE_COPY_BUNDLE_DATA;
-  if (str == kToolCompileXCAssets) return TYPE_COMPILE_XCASSETS;
-  if (str == kToolAction) return TYPE_ACTION;
+  if (str == kToolCc)
+    return TYPE_CC;
+  if (str == kToolCxx)
+    return TYPE_CXX;
+  if (str == kToolObjC)
+    return TYPE_OBJC;
+  if (str == kToolObjCxx)
+    return TYPE_OBJCXX;
+  if (str == kToolRc)
+    return TYPE_RC;
+  if (str == kToolAsm)
+    return TYPE_ASM;
+  if (str == kToolAlink)
+    return TYPE_ALINK;
+  if (str == kToolSolink)
+    return TYPE_SOLINK;
+  if (str == kToolSolinkModule)
+    return TYPE_SOLINK_MODULE;
+  if (str == kToolLink)
+    return TYPE_LINK;
+  if (str == kToolStamp)
+    return TYPE_STAMP;
+  if (str == kToolCopy)
+    return TYPE_COPY;
+  if (str == kToolCopyBundleData)
+    return TYPE_COPY_BUNDLE_DATA;
+  if (str == kToolCompileXCAssets)
+    return TYPE_COMPILE_XCASSETS;
+  if (str == kToolAction)
+    return TYPE_ACTION;
   return TYPE_NONE;
 }
 
 // static
 std::string Toolchain::ToolTypeToName(ToolType type) {
   switch (type) {
-    case TYPE_CC: return kToolCc;
-    case TYPE_CXX: return kToolCxx;
-    case TYPE_OBJC: return kToolObjC;
-    case TYPE_OBJCXX: return kToolObjCxx;
-    case TYPE_RC: return kToolRc;
-    case TYPE_ASM: return kToolAsm;
-    case TYPE_ALINK: return kToolAlink;
-    case TYPE_SOLINK: return kToolSolink;
-    case TYPE_SOLINK_MODULE: return kToolSolinkModule;
-    case TYPE_LINK: return kToolLink;
-    case TYPE_STAMP: return kToolStamp;
-    case TYPE_COPY: return kToolCopy;
-    case TYPE_COPY_BUNDLE_DATA: return kToolCopyBundleData;
-    case TYPE_COMPILE_XCASSETS: return kToolCompileXCAssets;
-    case TYPE_ACTION: return kToolAction;
+    case TYPE_CC:
+      return kToolCc;
+    case TYPE_CXX:
+      return kToolCxx;
+    case TYPE_OBJC:
+      return kToolObjC;
+    case TYPE_OBJCXX:
+      return kToolObjCxx;
+    case TYPE_RC:
+      return kToolRc;
+    case TYPE_ASM:
+      return kToolAsm;
+    case TYPE_ALINK:
+      return kToolAlink;
+    case TYPE_SOLINK:
+      return kToolSolink;
+    case TYPE_SOLINK_MODULE:
+      return kToolSolinkModule;
+    case TYPE_LINK:
+      return kToolLink;
+    case TYPE_STAMP:
+      return kToolStamp;
+    case TYPE_COPY:
+      return kToolCopy;
+    case TYPE_COPY_BUNDLE_DATA:
+      return kToolCopyBundleData;
+    case TYPE_COMPILE_XCASSETS:
+      return kToolCompileXCAssets;
+    case TYPE_ACTION:
+      return kToolAction;
     default:
       NOTREACHED();
       return std::string();
diff --git a/tools/gn/trace.cc b/tools/gn/trace.cc
index f290613..63a8bf7 100644
--- a/tools/gn/trace.cc
+++ b/tools/gn/trace.cc
@@ -26,9 +26,7 @@
 
 class TraceLog {
  public:
-  TraceLog() {
-    events_.reserve(16384);
-  }
+  TraceLog() { events_.reserve(16384); }
   // Trace items leaked intentionally.
 
   void Add(TraceItem* item) {
@@ -65,8 +63,7 @@
   return a.total_duration > b.total_duration;
 }
 
-void SummarizeParses(std::vector<const TraceItem*>& loads,
-                     std::ostream& out) {
+void SummarizeParses(std::vector<const TraceItem*>& loads, std::ostream& out) {
   out << "File parse times: (time in ms, name)\n";
 
   std::sort(loads.begin(), loads.end(), &DurationGreater);
@@ -116,10 +113,7 @@
 TraceItem::TraceItem(Type type,
                      const std::string& name,
                      base::PlatformThreadId thread_id)
-    : type_(type),
-      name_(name),
-      thread_id_(thread_id) {
-}
+    : type_(type), name_(name), thread_id_(thread_id) {}
 
 TraceItem::~TraceItem() = default;
 
@@ -234,8 +228,8 @@
       check_headers_time += cur->delta().InMillisecondsF();
 
     out << "Header check time: (total time in ms, files checked)\n";
-    out << base::StringPrintf(" %8.2f  %d\n",
-                              check_headers_time, headers_checked);
+    out << base::StringPrintf(" %8.2f  %d\n", check_headers_time,
+                              headers_checked);
   }
 
   return out.str();
@@ -334,6 +328,5 @@
   out << "]}";
 
   std::string out_str = out.str();
-  base::WriteFile(file_name, out_str.data(),
-                       static_cast<int>(out_str.size()));
+  base::WriteFile(file_name, out_str.data(), static_cast<int>(out_str.size()));
 }
diff --git a/tools/gn/trace.h b/tools/gn/trace.h
index d211641..3b91aaa 100644
--- a/tools/gn/trace.h
+++ b/tools/gn/trace.h
@@ -16,7 +16,7 @@
 namespace base {
 class CommandLine;
 class FilePath;
-}
+}  // namespace base
 
 class TraceItem {
  public:
diff --git a/tools/gn/unique_vector.h b/tools/gn/unique_vector.h
index 7288762..25b4f5b 100644
--- a/tools/gn/unique_vector.h
+++ b/tools/gn/unique_vector.h
@@ -23,40 +23,31 @@
 //
 // It also caches the hash value which allows us to query and then insert
 // without recomputing the hash.
-template<typename T>
+template <typename T>
 class UniquifyRef {
  public:
   UniquifyRef()
       : value_(nullptr),
         vect_(nullptr),
         index_(static_cast<size_t>(-1)),
-        hash_val_(0) {
-  }
+        hash_val_(0) {}
 
   // Initialize with a pointer to a value.
   explicit UniquifyRef(const T* v)
-      : value_(v),
-        vect_(nullptr),
-        index_(static_cast<size_t>(-1)) {
+      : value_(v), vect_(nullptr), index_(static_cast<size_t>(-1)) {
     FillHashValue();
   }
 
   // Initialize with an array + index.
   UniquifyRef(const std::vector<T>* v, size_t i)
-      : value_(nullptr),
-        vect_(v),
-        index_(i) {
+      : value_(nullptr), vect_(v), index_(i) {
     FillHashValue();
   }
 
   // Initialize with an array + index and a known hash value to prevent
   // re-hashing.
   UniquifyRef(const std::vector<T>* v, size_t i, size_t hash_value)
-      : value_(nullptr),
-        vect_(v),
-        index_(i),
-        hash_val_(hash_value) {
-  }
+      : value_(nullptr), vect_(v), index_(i), hash_val_(hash_value) {}
 
   const T& value() const { return value_ ? *value_ : (*vect_)[index_]; }
   size_t hash_val() const { return hash_val_; }
@@ -78,13 +69,13 @@
   size_t hash_val_;
 };
 
-template<typename T> inline bool operator==(const UniquifyRef<T>& a,
-                                            const UniquifyRef<T>& b) {
+template <typename T>
+inline bool operator==(const UniquifyRef<T>& a, const UniquifyRef<T>& b) {
   return a.value() == b.value();
 }
 
-template<typename T> inline bool operator<(const UniquifyRef<T>& a,
-                                           const UniquifyRef<T>& b) {
+template <typename T>
+inline bool operator<(const UniquifyRef<T>& a, const UniquifyRef<T>& b) {
   return a.value() < b.value();
 }
 
@@ -92,7 +83,8 @@
 
 namespace std {
 
-template<typename T> struct hash< internal::UniquifyRef<T> > {
+template <typename T>
+struct hash<internal::UniquifyRef<T>> {
   std::size_t operator()(const internal::UniquifyRef<T>& v) const {
     return v.hash_val();
   }
@@ -103,7 +95,7 @@
 // An ordered set optimized for GN's usage. Such sets are used to store lists
 // of configs and libraries, and are appended to but not randomly inserted
 // into.
-template<typename T>
+template <typename T>
 class UniqueVector {
  public:
   typedef std::vector<T> Vector;
@@ -113,7 +105,10 @@
   const Vector& vector() const { return vector_; }
   size_t size() const { return vector_.size(); }
   bool empty() const { return vector_.empty(); }
-  void clear() { vector_.clear(); set_.clear(); }
+  void clear() {
+    vector_.clear();
+    set_.clear();
+  }
   void reserve(size_t s) { vector_.reserve(s); }
 
   const T& operator[](size_t index) const { return vector_[index]; }
@@ -151,7 +146,8 @@
   }
 
   // Appends a range of items from an iterator.
-  template<typename iter> void Append(const iter& begin, const iter& end) {
+  template <typename iter>
+  void Append(const iter& begin, const iter& end) {
     for (iter i = begin; i != end; ++i)
       push_back(*i);
   }
diff --git a/tools/gn/value.cc b/tools/gn/value.cc
index f92c885..04db7ee 100644
--- a/tools/gn/value.cc
+++ b/tools/gn/value.cc
@@ -12,32 +12,22 @@
 #include "tools/gn/scope.h"
 
 Value::Value()
-    : type_(NONE),
-      boolean_value_(false),
-      int_value_(0),
-      origin_(nullptr) {
-}
+    : type_(NONE), boolean_value_(false), int_value_(0), origin_(nullptr) {}
 
 Value::Value(const ParseNode* origin, Type t)
-    : type_(t),
-      boolean_value_(false),
-      int_value_(0),
-      origin_(origin) {
-}
+    : type_(t), boolean_value_(false), int_value_(0), origin_(origin) {}
 
 Value::Value(const ParseNode* origin, bool bool_val)
     : type_(BOOLEAN),
       boolean_value_(bool_val),
       int_value_(0),
-      origin_(origin) {
-}
+      origin_(origin) {}
 
 Value::Value(const ParseNode* origin, int64_t int_val)
     : type_(INTEGER),
       boolean_value_(false),
       int_value_(int_val),
-      origin_(origin) {
-}
+      origin_(origin) {}
 
 Value::Value(const ParseNode* origin, std::string str_val)
     : type_(STRING),
@@ -51,8 +41,7 @@
       string_value_(str_val),
       boolean_value_(false),
       int_value_(0),
-      origin_(origin) {
-}
+      origin_(origin) {}
 
 Value::Value(const ParseNode* origin, std::unique_ptr<Scope> scope)
     : type_(SCOPE),
@@ -181,10 +170,9 @@
   if (type_ == t)
     return true;
 
-  *err = Err(origin(),
-             std::string("This is not a ") + DescribeType(t) + ".",
+  *err = Err(origin(), std::string("This is not a ") + DescribeType(t) + ".",
              std::string("Instead I see a ") + DescribeType(type_) + " = " +
-             ToString(true));
+                 ToString(true));
   return false;
 }
 
diff --git a/tools/gn/value_extractors.cc b/tools/gn/value_extractors.cc
index ff009ce..6eb09ac 100644
--- a/tools/gn/value_extractors.cc
+++ b/tools/gn/value_extractors.cc
@@ -17,7 +17,7 @@
 namespace {
 
 // Sets the error and returns false on failure.
-template<typename T, class Converter>
+template <typename T, class Converter>
 bool ListValueExtractor(const Value& value,
                         std::vector<T>* dest,
                         Err* err,
@@ -35,7 +35,7 @@
 
 // Like the above version but extracts to a UniqueVector and sets the error if
 // there are duplicates.
-template<typename T, class Converter>
+template <typename T, class Converter>
 bool ListValueUniqueExtractor(const Value& value,
                               UniqueVector<T>* dest,
                               Err* err,
@@ -52,8 +52,8 @@
       // Already in the list, throw error.
       *err = Err(item, "Duplicate item in list");
       size_t previous_index = dest->IndexOf(new_one);
-      err->AppendSubErr(Err(input_list[previous_index],
-                            "This was the previous definition."));
+      err->AppendSubErr(
+          Err(input_list[previous_index], "This was the previous definition."));
       return false;
     }
   }
@@ -63,9 +63,7 @@
 struct RelativeFileConverter {
   RelativeFileConverter(const BuildSettings* build_settings_in,
                         const SourceDir& current_dir_in)
-      : build_settings(build_settings_in),
-        current_dir(current_dir_in) {
-  }
+      : build_settings(build_settings_in), current_dir(current_dir_in) {}
   bool operator()(const Value& v, SourceFile* out, Err* err) const {
     *out = current_dir.ResolveRelativeFile(v, err,
                                            build_settings->root_path_utf8());
@@ -78,9 +76,7 @@
 struct LibFileConverter {
   LibFileConverter(const BuildSettings* build_settings_in,
                    const SourceDir& current_dir_in)
-      : build_settings(build_settings_in),
-        current_dir(current_dir_in) {
-  }
+      : build_settings(build_settings_in), current_dir(current_dir_in) {}
   bool operator()(const Value& v, LibFile* out, Err* err) const {
     if (!v.VerifyTypeIs(Value::STRING, err))
       return false;
@@ -99,9 +95,7 @@
 struct RelativeDirConverter {
   RelativeDirConverter(const BuildSettings* build_settings_in,
                        const SourceDir& current_dir_in)
-      : build_settings(build_settings_in),
-        current_dir(current_dir_in) {
-  }
+      : build_settings(build_settings_in), current_dir(current_dir_in) {}
   bool operator()(const Value& v, SourceDir* out, Err* err) const {
     *out = current_dir.ResolveRelativeDir(v, err,
                                           build_settings->root_path_utf8());
@@ -112,11 +106,11 @@
 };
 
 // Fills in a label.
-template<typename T> struct LabelResolver {
+template <typename T>
+struct LabelResolver {
   LabelResolver(const SourceDir& current_dir_in,
                 const Label& current_toolchain_in)
-      : current_dir(current_dir_in),
-        current_toolchain(current_toolchain_in) {}
+      : current_dir(current_dir_in), current_toolchain(current_toolchain_in) {}
   bool operator()(const Value& v, Label* out, Err* err) const {
     if (!v.VerifyTypeIs(Value::STRING, err))
       return false;
@@ -128,11 +122,11 @@
 };
 
 // Fills the label part of a LabelPtrPair, leaving the pointer null.
-template<typename T> struct LabelPtrResolver {
+template <typename T>
+struct LabelPtrResolver {
   LabelPtrResolver(const SourceDir& current_dir_in,
                    const Label& current_toolchain_in)
-      : current_dir(current_dir_in),
-        current_toolchain(current_toolchain_in) {}
+      : current_dir(current_dir_in), current_toolchain(current_toolchain_in) {}
   bool operator()(const Value& v, LabelPtrPair<T>* out, Err* err) const {
     if (!v.VerifyTypeIs(Value::STRING, err))
       return false;
@@ -146,8 +140,7 @@
 
 struct LabelPatternResolver {
   LabelPatternResolver(const SourceDir& current_dir_in)
-      : current_dir(current_dir_in) {
-  }
+      : current_dir(current_dir_in) {}
   bool operator()(const Value& v, LabelPattern* out, Err* err) const {
     *out = LabelPattern::GetPattern(current_dir, v, err);
     return !err->has_error();
@@ -204,9 +197,9 @@
                          const Label& current_toolchain,
                          LabelTargetVector* dest,
                          Err* err) {
-  return ListValueExtractor(value, dest, err,
-                            LabelPtrResolver<Target>(current_dir,
-                                                     current_toolchain));
+  return ListValueExtractor(
+      value, dest, err,
+      LabelPtrResolver<Target>(current_dir, current_toolchain));
 }
 
 bool ExtractListOfUniqueLabels(const Value& value,
@@ -214,9 +207,8 @@
                                const Label& current_toolchain,
                                UniqueVector<Label>* dest,
                                Err* err) {
-  return ListValueUniqueExtractor(value, dest, err,
-                                  LabelResolver<Config>(current_dir,
-                                                        current_toolchain));
+  return ListValueUniqueExtractor(
+      value, dest, err, LabelResolver<Config>(current_dir, current_toolchain));
 }
 
 bool ExtractListOfUniqueLabels(const Value& value,
@@ -224,9 +216,9 @@
                                const Label& current_toolchain,
                                UniqueVector<LabelConfigPair>* dest,
                                Err* err) {
-  return ListValueUniqueExtractor(value, dest, err,
-                                  LabelPtrResolver<Config>(current_dir,
-                                                           current_toolchain));
+  return ListValueUniqueExtractor(
+      value, dest, err,
+      LabelPtrResolver<Config>(current_dir, current_toolchain));
 }
 
 bool ExtractListOfUniqueLabels(const Value& value,
@@ -234,9 +226,9 @@
                                const Label& current_toolchain,
                                UniqueVector<LabelTargetPair>* dest,
                                Err* err) {
-  return ListValueUniqueExtractor(value, dest, err,
-                                  LabelPtrResolver<Target>(current_dir,
-                                                           current_toolchain));
+  return ListValueUniqueExtractor(
+      value, dest, err,
+      LabelPtrResolver<Target>(current_dir, current_toolchain));
 }
 
 bool ExtractRelativeFile(const BuildSettings* build_settings,
diff --git a/tools/gn/variables.cc b/tools/gn/variables.cc
index 42191e3..0b0190f 100644
--- a/tools/gn/variables.cc
+++ b/tools/gn/variables.cc
@@ -198,7 +198,7 @@
 const char kCurrentCpu[] = "current_cpu";
 const char kCurrentCpu_HelpShort[] =
     "current_cpu: [string] The processor architecture of the current "
-        "toolchain.";
+    "toolchain.";
 const char kCurrentCpu_Help[] =
     R"(current_cpu: The processor architecture of the current toolchain.
 
@@ -271,9 +271,9 @@
 
 const char kRootBuildDir[] = "root_build_dir";
 const char kRootBuildDir_HelpShort[] =
-  "root_build_dir: [string] Directory where build commands are run.";
+    "root_build_dir: [string] Directory where build commands are run.";
 const char kRootBuildDir_Help[] =
-  R"(root_build_dir: [string] Directory where build commands are run.
+    R"(root_build_dir: [string] Directory where build commands are run.
 
   This is the root build output directory which will be the current directory
   when executing all compilers and scripts.
@@ -421,8 +421,7 @@
   target's headers.
 
   See also "public_configs".
-)"
-    COMMON_ORDERING_HELP;
+)" COMMON_ORDERING_HELP;
 
 const char kAllowCircularIncludesFrom[] = "allow_circular_includes_from";
 const char kAllowCircularIncludesFrom_HelpShort[] =
@@ -512,8 +511,7 @@
   to other static libraries. Due to the nature of how arflags are typically
   used, you will normally want to apply them directly on static_library targets
   themselves.
-)"
-    COMMON_ORDERING_HELP;
+)" COMMON_ORDERING_HELP;
 
 const char kArgs[] = "args";
 const char kArgs_HelpShort[] =
@@ -602,7 +600,7 @@
 const char kBundleContentsDir[] = "bundle_contents_dir";
 const char kBundleContentsDir_HelpShort[] =
     "bundle_contents_dir: "
-        "Expansion of {{bundle_contents_dir}} in create_bundle.";
+    "Expansion of {{bundle_contents_dir}} in create_bundle.";
 const char kBundleContentsDir_Help[] =
     R"(bundle_contents_dir: Expansion of {{bundle_contents_dir}} in
                              create_bundle.
@@ -619,7 +617,7 @@
 const char kBundleResourcesDir[] = "bundle_resources_dir";
 const char kBundleResourcesDir_HelpShort[] =
     "bundle_resources_dir: "
-        "Expansion of {{bundle_resources_dir}} in create_bundle.";
+    "Expansion of {{bundle_resources_dir}} in create_bundle.";
 const char kBundleResourcesDir_Help[] =
     R"(bundle_resources_dir: Expansion of {{bundle_resources_dir}} in
                              create_bundle.
@@ -669,7 +667,7 @@
 const char kBundleExecutableDir[] = "bundle_executable_dir";
 const char kBundleExecutableDir_HelpShort[] =
     "bundle_executable_dir: "
-        "Expansion of {{bundle_executable_dir}} in create_bundle";
+    "Expansion of {{bundle_executable_dir}} in create_bundle";
 const char kBundleExecutableDir_Help[] =
     R"(bundle_executable_dir: Expansion of {{bundle_executable_dir}} in
                               create_bundle.
@@ -686,7 +684,7 @@
 const char kBundlePlugInsDir[] = "bundle_plugins_dir";
 const char kBundlePlugInsDir_HelpShort[] =
     "bundle_plugins_dir: "
-        "Expansion of {{bundle_plugins_dir}} in create_bundle.";
+    "Expansion of {{bundle_plugins_dir}} in create_bundle.";
 const char kBundlePlugInsDir_Help[] =
     R"(bundle_plugins_dir: Expansion of {{bundle_plugins_dir}} in create_bundle.
 
@@ -716,8 +714,7 @@
   "cflags".
 
   See also "asmflags" for flags for assembly-language files.
-)"
-    COMMON_ORDERING_HELP;
+)" COMMON_ORDERING_HELP;
 const char* kCflags_Help = kCommonCflagsHelp;
 
 const char kAsmflags[] = "asmflags";
@@ -730,8 +727,7 @@
 
   "asmflags" are passed to any invocation of a tool that takes an .asm or .S
   file as input.
-)"
-    COMMON_ORDERING_HELP;
+)" COMMON_ORDERING_HELP;
 
 const char kCflagsC[] = "cflags_c";
 const char kCflagsC_HelpShort[] =
@@ -915,9 +911,8 @@
      listed as a sub-config that it is only used in that context. (Note that
      it's possible to fix this and de-dupe, but it's not normally relevant and
      complicates the implementation.)
-)"
-    COMMON_ORDERING_HELP
-R"(
+)" COMMON_ORDERING_HELP
+    R"(
 Example
 
   # Configs on a target.
@@ -1016,9 +1011,8 @@
 
   These strings will be passed to the C/C++ compiler as #defines. The strings
   may or may not include an "=" to assign a value.
-)"
-    COMMON_ORDERING_HELP
-R"(
+)" COMMON_ORDERING_HELP
+    R"(
 Example
 
   defines = [ "AWESOME_FEATURE", "LOG_LEVEL=3" ]
@@ -1173,9 +1167,8 @@
 
   The directories in this list will be added to the include path for the files
   in the affected target.
-)"
-    COMMON_ORDERING_HELP
-R"(
+)" COMMON_ORDERING_HELP
+    R"(
 Example
 
   include_dirs = [ "src/include", "//third_party/foo" ]
@@ -1263,22 +1256,21 @@
   static libraries will be a no-op. If you want to apply ldflags to dependent
   targets, put them in a config and set it in the all_dependent_configs or
   public_configs.
-)"
-    COMMON_ORDERING_HELP;
+)" COMMON_ORDERING_HELP;
 
-#define COMMON_LIB_INHERITANCE_HELP \
-    "\n" \
-    "  libs and lib_dirs work differently than other flags in two respects.\n" \
-    "  First, then are inherited across static library boundaries until a\n" \
-    "  shared library or executable target is reached. Second, they are\n" \
-    "  uniquified so each one is only passed once (the first instance of it\n" \
-    "  will be the one used).\n"
+#define COMMON_LIB_INHERITANCE_HELP                                          \
+  "\n"                                                                       \
+  "  libs and lib_dirs work differently than other flags in two respects.\n" \
+  "  First, then are inherited across static library boundaries until a\n"   \
+  "  shared library or executable target is reached. Second, they are\n"     \
+  "  uniquified so each one is only passed once (the first instance of it\n" \
+  "  will be the one used).\n"
 
-#define LIBS_AND_LIB_DIRS_ORDERING_HELP \
-    "\n" \
-    "  For \"libs\" and \"lib_dirs\" only, the values propagated from\n" \
-    "  dependencies (as described above) are applied last assuming they\n" \
-    "  are not already in the list.\n"
+#define LIBS_AND_LIB_DIRS_ORDERING_HELP                                  \
+  "\n"                                                                   \
+  "  For \"libs\" and \"lib_dirs\" only, the values propagated from\n"   \
+  "  dependencies (as described above) are applied last assuming they\n" \
+  "  are not already in the list.\n"
 
 const char kLibDirs[] = "lib_dirs";
 const char kLibDirs_HelpShort[] =
@@ -1291,11 +1283,9 @@
   Specifies additional directories passed to the linker for searching for the
   required libraries. If an item is not an absolute path, it will be treated as
   being relative to the current build file.
-)"
-    COMMON_LIB_INHERITANCE_HELP
-    COMMON_ORDERING_HELP
-    LIBS_AND_LIB_DIRS_ORDERING_HELP
-R"(
+)" COMMON_LIB_INHERITANCE_HELP COMMON_ORDERING_HELP
+        LIBS_AND_LIB_DIRS_ORDERING_HELP
+    R"(
 Example
 
   lib_dirs = [ "/usr/lib/foo", "lib/doom_melon" ]
@@ -1311,9 +1301,8 @@
 
   These libraries will be linked into the final binary (executable or shared
   library) containing the current target.
-)"
-    COMMON_LIB_INHERITANCE_HELP
-R"(
+)" COMMON_LIB_INHERITANCE_HELP
+    R"(
 Types of libs
 
   There are several different things that can be expressed in libs:
@@ -1338,10 +1327,8 @@
       "-framework" will be prepended instead of the lib_switch, and the
       ".framework" suffix will be trimmed. This is to support the way Mac links
       framework dependencies.
-)"
-    COMMON_ORDERING_HELP
-    LIBS_AND_LIB_DIRS_ORDERING_HELP
-R"(
+)" COMMON_ORDERING_HELP LIBS_AND_LIB_DIRS_ORDERING_HELP
+    R"(
 Examples
 
   On Windows:
@@ -1705,8 +1692,7 @@
   target's headers.
 
   See also "all_dependent_configs".
-)"
-    COMMON_ORDERING_HELP;
+)" COMMON_ORDERING_HELP;
 
 const char kPublicDeps[] = "public_deps";
 const char kPublicDeps_HelpShort[] =
@@ -1761,7 +1747,7 @@
 const char kResponseFileContents_HelpShort[] =
     "response_file_contents: [string list] Contents of .rsp file for actions.";
 const char kResponseFileContents_Help[] =
-   R"*(response_file_contents: Contents of a response file for actions.
+    R"*(response_file_contents: Contents of a response file for actions.
 
   Sometimes the arguments passed to a script can be too long for the system's
   command-line capabilities. This is especially the case on Windows where the
@@ -1798,8 +1784,7 @@
 )*";
 
 const char kScript[] = "script";
-const char kScript_HelpShort[] =
-    "script: [file name] Script file for actions.";
+const char kScript_HelpShort[] = "script: [file name] Script file for actions.";
 const char kScript_Help[] =
     R"(script: Script file for actions.
 
@@ -1984,18 +1969,13 @@
 
 // -----------------------------------------------------------------------------
 
-VariableInfo::VariableInfo()
-    : help_short(""),
-      help("") {
-}
+VariableInfo::VariableInfo() : help_short(""), help("") {}
 
 VariableInfo::VariableInfo(const char* in_help_short, const char* in_help)
-    : help_short(in_help_short),
-      help(in_help) {
-}
+    : help_short(in_help_short), help(in_help) {}
 
 #define INSERT_VARIABLE(var) \
-    info_map[k##var] = VariableInfo(k##var##_HelpShort, k##var##_Help);
+  info_map[k##var] = VariableInfo(k##var##_HelpShort, k##var##_Help);
 
 const VariableInfoMap& GetBuiltinVariables() {
   static VariableInfoMap info_map;
diff --git a/tools/gn/variables.h b/tools/gn/variables.h
index 80615f9..080989b 100644
--- a/tools/gn/variables.h
+++ b/tools/gn/variables.h
@@ -311,8 +311,7 @@
 
 struct VariableInfo {
   VariableInfo();
-  VariableInfo(const char* in_help_short,
-               const char* in_help);
+  VariableInfo(const char* in_help_short, const char* in_help);
 
   const char* help_short;
   const char* help;
diff --git a/tools/gn/visibility.cc b/tools/gn/visibility.cc
index ec96824..75039e9 100644
--- a/tools/gn/visibility.cc
+++ b/tools/gn/visibility.cc
@@ -41,16 +41,14 @@
 
 void Visibility::SetPublic() {
   patterns_.clear();
-  patterns_.push_back(
-      LabelPattern(LabelPattern::RECURSIVE_DIRECTORY, SourceDir(),
-      std::string(), Label()));
+  patterns_.push_back(LabelPattern(LabelPattern::RECURSIVE_DIRECTORY,
+                                   SourceDir(), std::string(), Label()));
 }
 
 void Visibility::SetPrivate(const SourceDir& current_dir) {
   patterns_.clear();
-  patterns_.push_back(
-      LabelPattern(LabelPattern::DIRECTORY, current_dir, std::string(),
-      Label()));
+  patterns_.push_back(LabelPattern(LabelPattern::DIRECTORY, current_dir,
+                                   std::string(), Label()));
 }
 
 bool Visibility::CanSeeMe(const Label& label) const {
@@ -94,10 +92,14 @@
   if (!to->visibility().CanSeeMe(from->label())) {
     std::string to_label = to->label().GetUserVisibleName(false);
     *err = Err(from->defined_from(), "Dependency not allowed.",
-        "The item " + from->label().GetUserVisibleName(false) + "\n"
-        "can not depend on " + to_label + "\n"
-        "because it is not in " + to_label + "'s visibility list: " +
-                   to->visibility().Describe(0, true));
+               "The item " + from->label().GetUserVisibleName(false) +
+                   "\n"
+                   "can not depend on " +
+                   to_label +
+                   "\n"
+                   "because it is not in " +
+                   to_label +
+                   "'s visibility list: " + to->visibility().Describe(0, true));
     return false;
   }
   return true;
diff --git a/tools/gn/visibility_unittest.cc b/tools/gn/visibility_unittest.cc
index 83dfd0d..13873c5 100644
--- a/tools/gn/visibility_unittest.cc
+++ b/tools/gn/visibility_unittest.cc
@@ -2,12 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "tools/gn/visibility.h"
 #include "test/test.h"
 #include "tools/gn/err.h"
 #include "tools/gn/label.h"
 #include "tools/gn/scope.h"
 #include "tools/gn/value.h"
-#include "tools/gn/visibility.h"
 
 TEST(Visibility, CanSeeMe) {
   Value list(nullptr, Value::LIST);
diff --git a/tools/gn/visual_studio_utils.cc b/tools/gn/visual_studio_utils.cc
index 94a2883..00cd2a3 100644
--- a/tools/gn/visual_studio_utils.cc
+++ b/tools/gn/visual_studio_utils.cc
@@ -42,14 +42,13 @@
     switch (cflag[1]) {
       case 'F':
         AppendOption(cflag.size() > 3 && cflag[2] == 'I', forced_include_files,
-                     cflag.substr(3), ';')
-        break;
+                     cflag.substr(3), ';') break;
 
       case 'G':
         if (cflag[2] == 'S') {
           SetOption(cflag.size() == 3, buffer_security_check, "true")
-          SetOption(cflag.size() == 4 && cflag[3] == '-',
-                    buffer_security_check, "false")
+              SetOption(cflag.size() == 4 && cflag[3] == '-',
+                        buffer_security_check, "false")
         }
         break;
 
@@ -57,35 +56,29 @@
         switch (cflag[2]) {
           case 'D':
             SetOption(cflag.size() == 3, runtime_library, "MultiThreadedDLL")
-            SetOption(cflag.size() == 4 && cflag[3] == 'd', runtime_library,
-                      "MultiThreadedDebugDLL")
-            break;
+                SetOption(cflag.size() == 4 && cflag[3] == 'd', runtime_library,
+                          "MultiThreadedDebugDLL") break;
 
           case 'T':
             SetOption(cflag.size() == 3, runtime_library, "MultiThreaded")
-            SetOption(cflag.size() == 4 && cflag[3] == 'd', runtime_library,
-                      "MultiThreadedDebug")
-            break;
+                SetOption(cflag.size() == 4 && cflag[3] == 'd', runtime_library,
+                          "MultiThreadedDebug") break;
         }
         break;
 
       case 'O':
         switch (cflag[2]) {
           case '1':
-            SetOption(cflag.size() == 3, optimization, "MinSpace")
-            break;
+            SetOption(cflag.size() == 3, optimization, "MinSpace") break;
 
           case '2':
-            SetOption(cflag.size() == 3, optimization, "MaxSpeed")
-            break;
+            SetOption(cflag.size() == 3, optimization, "MaxSpeed") break;
 
           case 'd':
-            SetOption(cflag.size() == 3, optimization, "Disabled")
-            break;
+            SetOption(cflag.size() == 3, optimization, "Disabled") break;
 
           case 'x':
-            SetOption(cflag.size() == 3, optimization, "Full")
-              break;
+            SetOption(cflag.size() == 3, optimization, "Full") break;
         }
         break;
 
@@ -103,19 +96,16 @@
           case '3':
           case '4':
             SetOption(cflag.size() == 3, warning_level,
-                      std::string("Level") + cflag[2])
-            break;
+                      std::string("Level") + cflag[2]) break;
 
           case 'X':
-            SetOption(cflag.size() == 3, treat_warning_as_error, "true")
-            break;
+            SetOption(cflag.size() == 3, treat_warning_as_error, "true") break;
         }
         break;
 
       case 'w':
         AppendOption(cflag.size() > 3 && cflag[2] == 'd',
-                     disable_specific_warnings, cflag.substr(3), ';')
-        break;
+                     disable_specific_warnings, cflag.substr(3), ';') break;
     }
   }
 
@@ -125,12 +115,10 @@
 
 // Parses |ldflags| value and stores it in |options|.
 void ParseLinkerOption(const std::string& ldflag, LinkerOptions* options) {
-  const char kSubsytemPrefix[] ="/SUBSYSTEM:";
-  if (base::StartsWith(ldflag, kSubsytemPrefix,
-                       base::CompareCase::SENSITIVE)) {
+  const char kSubsytemPrefix[] = "/SUBSYSTEM:";
+  if (base::StartsWith(ldflag, kSubsytemPrefix, base::CompareCase::SENSITIVE)) {
     const std::string subsystem(
-        ldflag.begin() + std::string(kSubsytemPrefix).length(),
-        ldflag.end());
+        ldflag.begin() + std::string(kSubsytemPrefix).length(), ldflag.end());
     const std::vector<std::string> tokens = base::SplitString(
         subsystem, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
     if (!tokens.empty())
diff --git a/tools/gn/xcode_object.h b/tools/gn/xcode_object.h
index c695dbb..715090b 100644
--- a/tools/gn/xcode_object.h
+++ b/tools/gn/xcode_object.h
@@ -19,7 +19,8 @@
 // all features of Xcode project but instead just enough to implement a hybrid
 // mode where Xcode uses external scripts to perform the compilation steps.
 //
-// See https://chromium.googlesource.com/external/gyp/+/master/pylib/gyp/xcodeproj_file.py
+// See
+// https://chromium.googlesource.com/external/gyp/+/master/pylib/gyp/xcodeproj_file.py
 // for more information on Xcode project file format.
 
 enum class CompilerFlags {