diff --git a/BASE_VER b/BASE_VER
index 8b24d6c..d31a8f8 100644
--- a/BASE_VER
+++ b/BASE_VER
@@ -1 +1 @@
-1178914
+1179517
diff --git a/BUILD.gn b/BUILD.gn
index aa134d7..dbac328 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1293,6 +1293,7 @@
     "base/hash/*.h",
     "base/i18n/*.h",
     "base/json/*.h",
+    "base/macros/*.h",
     "base/memory/*.h",
     "base/message_loop/*.h",
     "base/metrics/*.h",
diff --git a/base/allocator/partition_alloc_features.cc b/base/allocator/partition_alloc_features.cc
index bd7e913..52c5148 100644
--- a/base/allocator/partition_alloc_features.cc
+++ b/base/allocator/partition_alloc_features.cc
@@ -106,8 +106,7 @@
 #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \
     BUILDFLAG(IS_CHROMEOS_ASH) ||                                      \
     (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) ||                  \
-    BUILDFLAG(ENABLE_BACKUP_REF_PTR_FEATURE_FLAG) ||                   \
-    (BUILDFLAG(USE_ASAN_BACKUP_REF_PTR) && BUILDFLAG(IS_LINUX))
+    BUILDFLAG(ENABLE_BACKUP_REF_PTR_FEATURE_FLAG)
              FEATURE_ENABLED_BY_DEFAULT
 #else
              FEATURE_DISABLED_BY_DEFAULT
diff --git a/base/allocator/partition_allocator/partition_alloc_base/compiler_specific.h b/base/allocator/partition_allocator/partition_alloc_base/compiler_specific.h
index 77ec1fe..8a8095c 100644
--- a/base/allocator/partition_allocator/partition_alloc_base/compiler_specific.h
+++ b/base/allocator/partition_allocator/partition_alloc_base/compiler_specific.h
@@ -230,4 +230,12 @@
 #define PA_GSL_POINTER
 #endif
 
+// Constexpr destructors were introduced in C++20. PartitionAlloc's minimum
+// supported C++ version is C++17.
+#if defined(__cpp_constexpr) && __cpp_constexpr >= 201907L
+#define PA_CONSTEXPR_DTOR constexpr
+#else
+#define PA_CONSTEXPR_DTOR
+#endif
+
 #endif  // BASE_ALLOCATOR_PARTITION_ALLOCATOR_PARTITION_ALLOC_BASE_COMPILER_SPECIFIC_H_
diff --git a/base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.cc b/base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.cc
new file mode 100644
index 0000000..33f3926
--- /dev/null
+++ b/base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.cc
@@ -0,0 +1,216 @@
+// Copyright 2023 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.h"
+
+#include "base/allocator/partition_allocator/partition_alloc_base/debug/debugging_buildflags.h"
+#include "base/allocator/partition_allocator/partition_alloc_base/strings/safe_sprintf.h"
+#include "build/build_config.h"
+
+#if !BUILDFLAG(IS_WIN)
+#include <unistd.h>
+#endif
+
+#include <cmath>
+#include <cstring>
+
+#if BUILDFLAG(PA_DCHECK_IS_ON)
+#include "base/allocator/partition_allocator/partition_alloc_base/check.h"
+#define PA_RAW_DCHECK PA_RAW_CHECK
+#else
+#define PA_RAW_DCHECK(x) \
+  do {                   \
+    if (x) {             \
+    }                    \
+  } while (0)
+#endif
+
+namespace partition_alloc::internal::base::strings {
+
+namespace {
+
+constexpr size_t kNumDigits10 = 5u;
+
+constexpr uint64_t Pow10(unsigned exp) {
+  uint64_t ret = 1;
+  for (unsigned i = 0; i < exp; ++i) {
+    ret *= 10U;
+  }
+  return ret;
+}
+
+constexpr uint64_t Log10(uint64_t value) {
+  uint64_t ret = 0;
+  while (value != 0u) {
+    value = value / 10u;
+    ++ret;
+  }
+  return ret;
+}
+
+constexpr uint64_t GetDigits10(unsigned num_digits10) {
+  return Pow10(num_digits10);
+}
+
+}  // namespace
+
+template <typename T>
+void CStringBuilder::PutInteger(T value) {
+  // We need an array of chars whose size is:
+  // - floor(log10(max value)) + 1 chars for the give value, and
+  // - 1 char for '-' (if negative)
+  // - 1 char for '\0'
+  char buffer[Log10(std::numeric_limits<T>::max()) + 3];
+  ssize_t n = base::strings::SafeSPrintf(buffer, "%d", value);
+  PA_RAW_DCHECK(n >= 0);
+  PA_RAW_DCHECK(static_cast<size_t>(n) < sizeof(buffer));
+  PutText(buffer, n);
+}
+
+CStringBuilder& CStringBuilder::operator<<(char ch) {
+  PutText(&ch, 1);
+  return *this;
+}
+
+CStringBuilder& CStringBuilder::operator<<(const char* text) {
+  PutText(text);
+  return *this;
+}
+
+CStringBuilder& CStringBuilder::operator<<(float value) {
+  PutFloatingPoint(value, kNumDigits10);
+  return *this;
+}
+
+CStringBuilder& CStringBuilder::operator<<(double value) {
+  PutFloatingPoint(value, kNumDigits10);
+  return *this;
+}
+
+CStringBuilder& CStringBuilder::operator<<(int value) {
+  PutInteger(value);
+  return *this;
+}
+
+CStringBuilder& CStringBuilder::operator<<(unsigned int value) {
+  PutInteger(value);
+  return *this;
+}
+
+CStringBuilder& CStringBuilder::operator<<(long value) {
+  PutInteger(value);
+  return *this;
+}
+
+CStringBuilder& CStringBuilder::operator<<(unsigned long value) {
+  PutInteger(value);
+  return *this;
+}
+
+CStringBuilder& CStringBuilder::operator<<(long long value) {
+  PutInteger(value);
+  return *this;
+}
+
+CStringBuilder& CStringBuilder::operator<<(unsigned long long value) {
+  PutInteger(value);
+  return *this;
+}
+
+CStringBuilder& CStringBuilder::operator<<(const void* value) {
+  if (!value) {
+    PutText("(nil)");
+  } else {
+    // We need an array of chars whose size is:
+    // - 2 chars per 1 byte(00-FF), totally sizeof(const void*) * 2 chars,
+    // - 2 chars for "0x",
+    // - 1 char for '\0',
+    char buffer[sizeof(const void*) * 2 + 2 + 1];
+    ssize_t n = base::strings::SafeSPrintf(buffer, "%p", value);
+    PA_RAW_DCHECK(n > 0);
+    PA_RAW_DCHECK(static_cast<size_t>(n) < sizeof(buffer));
+    PutText(buffer, n);
+  }
+  return *this;
+}
+
+CStringBuilder& CStringBuilder::operator<<(std::nullptr_t) {
+  PutText("nullptr");
+  return *this;
+}
+
+const char* CStringBuilder::c_str() {
+  PA_RAW_DCHECK(buffer_ <= ptr_ && ptr_ < buffer_ + kBufferSize);
+  if (*ptr_ != '\0') {
+    *ptr_ = '\0';
+  }
+  return buffer_;
+}
+
+void CStringBuilder::PutFloatingPoint(double value, unsigned num_digits10) {
+  switch (fpclassify(value)) {
+    case FP_INFINITE:
+      PutText(value < 0 ? "-inf" : "inf");
+      break;
+    case FP_NAN:
+      PutText("NaN");
+      break;
+    case FP_ZERO:
+      PutText("0");
+      break;
+    case FP_SUBNORMAL:
+      // Denormalized values are not supported.
+      PutNormalFloatingPoint(value > 0 ? std::numeric_limits<double>::min()
+                                       : -std::numeric_limits<double>::min(),
+                             num_digits10);
+      break;
+    case FP_NORMAL:
+    default:
+      PutNormalFloatingPoint(value, num_digits10);
+      break;
+  }
+}
+
+void CStringBuilder::PutNormalFloatingPoint(double value,
+                                            unsigned num_digits10) {
+  if (value < 0) {
+    PutText("-", 1);
+    value = -value;
+  }
+
+  int exponent = floor(log10(value));
+  double significand = value / pow(10, exponent);
+
+  char buffer[64];
+  ssize_t n = base::strings::SafeSPrintf(
+      buffer, "%d", lrint(significand * GetDigits10(num_digits10)));
+  PA_RAW_DCHECK(n > 0);
+  PA_RAW_DCHECK(static_cast<size_t>(n) < sizeof(buffer));
+  PutText(buffer, 1);
+  if (n > 1) {
+    PutText(".", 1);
+    PutText(buffer + 1, n - 1);
+  }
+  if (exponent != 0) {
+    n = base::strings::SafeSPrintf(buffer, "e%s%d", exponent > 0 ? "+" : "",
+                                   exponent);
+    PA_RAW_DCHECK(n > 0);
+    PA_RAW_DCHECK(static_cast<size_t>(n) < sizeof(buffer));
+    PutText(buffer, n);
+  }
+}
+
+void CStringBuilder::PutText(const char* text) {
+  PutText(text, strlen(text));
+}
+
+void CStringBuilder::PutText(const char* text, size_t length) {
+  PA_RAW_DCHECK(buffer_ <= ptr_ && ptr_ < buffer_ + kBufferSize);
+  while (ptr_ < buffer_ + kBufferSize - 1 && length > 0 && *text != '\0') {
+    *ptr_++ = *text++;
+    --length;
+  }
+}
+
+}  // namespace partition_alloc::internal::base::strings
diff --git a/base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.h b/base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.h
new file mode 100644
index 0000000..96acc68
--- /dev/null
+++ b/base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.h
@@ -0,0 +1,57 @@
+// Copyright 2023 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_PARTITION_ALLOC_BASE_STRINGS_CSTRING_BUILDER_H_
+#define BASE_ALLOCATOR_PARTITION_ALLOCATOR_PARTITION_ALLOC_BASE_STRINGS_CSTRING_BUILDER_H_
+
+#include "base/allocator/partition_allocator/partition_alloc_base/component_export.h"
+#include "build/build_config.h"
+
+#include <cstddef>
+
+#if !BUILDFLAG(IS_WIN)
+#include <unistd.h>
+#endif
+
+namespace partition_alloc::internal::base::strings {
+
+// Similar to std::ostringstream, but creates a C string, i.e. nul-terminated
+// char-type string, instead of std::string. To use inside memory allocation,
+// this method must not allocate any memory with malloc, aligned_malloc,
+// calloc, and so on.
+class PA_COMPONENT_EXPORT(PARTITION_ALLOC) CStringBuilder {
+ public:
+  static constexpr size_t kBufferSize = 1024u;
+
+  CStringBuilder() : ptr_(buffer_) {}
+
+  CStringBuilder& operator<<(char ch);
+  CStringBuilder& operator<<(const char* text);
+  CStringBuilder& operator<<(float value);
+  CStringBuilder& operator<<(double value);
+  CStringBuilder& operator<<(int value);
+  CStringBuilder& operator<<(unsigned int value);
+  CStringBuilder& operator<<(long value);
+  CStringBuilder& operator<<(unsigned long value);
+  CStringBuilder& operator<<(long long value);
+  CStringBuilder& operator<<(unsigned long long value);
+  CStringBuilder& operator<<(const void* value);
+  CStringBuilder& operator<<(std::nullptr_t);
+  const char* c_str();
+
+ private:
+  template <typename T>
+  void PutInteger(T value);
+  void PutFloatingPoint(double value, unsigned num_digits10);
+  void PutNormalFloatingPoint(double value, unsigned num_digits10);
+  void PutText(const char* text);
+  void PutText(const char* text, size_t length);
+
+  char buffer_[kBufferSize];
+  char* ptr_;
+};
+
+}  // namespace partition_alloc::internal::base::strings
+
+#endif  // BASE_ALLOCATOR_PARTITION_ALLOCATOR_PARTITION_ALLOC_BASE_STRINGS_CSTRING_BUILDER_H_
diff --git a/base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder_pa_unittest.cc b/base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder_pa_unittest.cc
new file mode 100644
index 0000000..1dbcaa9
--- /dev/null
+++ b/base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder_pa_unittest.cc
@@ -0,0 +1,145 @@
+// Copyright 2023 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.h"
+
+#include "build/build_config.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace partition_alloc::internal::base::strings {
+
+namespace {
+
+template <typename T>
+void FillBuffer(CStringBuilder& builder, T value, unsigned count) {
+  for (unsigned i = 0; i < count; ++i) {
+    builder << value;
+  }
+}
+
+}  // namespace
+
+TEST(CStringBuilderTestPA, String) {
+  CStringBuilder builder;
+  const char buffer[] = "Buffer\n";
+  builder << "Hello, World" << '\n' << buffer << '\n';
+  EXPECT_EQ("Hello, World\nBuffer\n\n", std::string(builder.c_str()));
+}
+
+TEST(CStringBuilderTestPA, Char) {
+  CStringBuilder builder;
+  builder << 'c' << 'h' << 'a' << ' ' << 'r' << '\\' << '\n';
+  EXPECT_EQ("cha r\\\n", std::string(builder.c_str()));
+  builder << '\0' << '\n';
+  EXPECT_EQ("cha r\\\n\n", std::string(builder.c_str()));
+}
+
+TEST(CStringBuilderTestPA, Integer) {
+  CStringBuilder builder1;
+  builder1 << std::numeric_limits<uint64_t>::max();
+  EXPECT_EQ("18446744073709551615", std::string(builder1.c_str()));
+
+  builder1 << " " << std::numeric_limits<int64_t>::min();
+  EXPECT_EQ("18446744073709551615 -9223372036854775808",
+            std::string(builder1.c_str()));
+
+  CStringBuilder builder2;
+  builder2 << std::numeric_limits<int64_t>::max();
+  EXPECT_EQ("9223372036854775807", std::string(builder2.c_str()));
+
+  CStringBuilder builder3;
+  builder3 << std::numeric_limits<int64_t>::min();
+  EXPECT_EQ("-9223372036854775808", std::string(builder3.c_str()));
+}
+
+TEST(CStringBuilderTestPA, FloatingPoint) {
+  CStringBuilder builder1;
+  builder1 << 3.1415926;
+  EXPECT_EQ("3.14159", std::string(builder1.c_str()));
+
+  CStringBuilder builder2;
+  builder2 << 0.0000725692;
+  EXPECT_EQ("7.25692e-5", std::string(builder2.c_str()));
+
+  // Zero
+  CStringBuilder builder3;
+  builder3 << 0.0;
+  EXPECT_EQ("0", std::string(builder3.c_str()));
+
+  // min()
+  CStringBuilder builder4;
+  builder4 << std::numeric_limits<double>::min();
+  EXPECT_EQ("2.22507e-308", std::string(builder4.c_str()));
+
+  // Subnormal value
+  CStringBuilder builder5;
+  builder5 << std::numeric_limits<double>::denorm_min();
+  // denorm_min() < min()
+  EXPECT_EQ("2.22507e-308", std::string(builder5.c_str()));
+
+  // Positive Infinity
+  CStringBuilder builder6;
+  builder6 << std::numeric_limits<double>::infinity();
+  EXPECT_EQ("inf", std::string(builder6.c_str()));
+
+  // Negative Infinity
+  CStringBuilder builder7;
+  builder7 << -std::numeric_limits<double>::infinity();
+  EXPECT_EQ("-inf", std::string(builder7.c_str()));
+
+  // max()
+  CStringBuilder builder8;
+  builder8 << std::numeric_limits<double>::max();
+  EXPECT_EQ("1.79769e+308", std::string(builder8.c_str()));
+
+  // NaN
+  CStringBuilder builder9;
+  builder9 << nan("");
+  EXPECT_EQ("NaN", std::string(builder9.c_str()));
+}
+
+TEST(CStringBuilderTestPA, FillBuffer) {
+  CStringBuilder builder1;
+  FillBuffer(builder1, ' ', CStringBuilder::kBufferSize * 2);
+  EXPECT_EQ(CStringBuilder::kBufferSize - 1, strlen(builder1.c_str()));
+
+  CStringBuilder builder2;
+  FillBuffer(builder2, 3.141592653, CStringBuilder::kBufferSize * 2);
+  EXPECT_EQ(CStringBuilder::kBufferSize - 1, strlen(builder2.c_str()));
+
+  CStringBuilder builder3;
+  FillBuffer(builder3, 3.14159f, CStringBuilder::kBufferSize * 2);
+  EXPECT_EQ(CStringBuilder::kBufferSize - 1, strlen(builder3.c_str()));
+
+  CStringBuilder builder4;
+  FillBuffer(builder4, 65535u, CStringBuilder::kBufferSize * 2);
+  EXPECT_EQ(CStringBuilder::kBufferSize - 1, strlen(builder4.c_str()));
+
+  CStringBuilder builder5;
+  FillBuffer(builder5, "Dummy Text", CStringBuilder::kBufferSize * 2);
+  EXPECT_EQ(CStringBuilder::kBufferSize - 1, strlen(builder5.c_str()));
+}
+
+TEST(CStringBuilderTestPA, Pointer) {
+  CStringBuilder builder1;
+  char* str = reinterpret_cast<char*>(0x80000000u);
+  void* ptr = str;
+  builder1 << ptr;
+  EXPECT_EQ("0x80000000", std::string(builder1.c_str()));
+
+  CStringBuilder builder2;
+  builder2 << reinterpret_cast<void*>(0xdeadbeafu);
+  EXPECT_EQ("0xDEADBEAF", std::string(builder2.c_str()));
+
+  // nullptr
+  CStringBuilder builder3;
+  builder3 << nullptr;
+  EXPECT_EQ("nullptr", std::string(builder3.c_str()));
+
+  CStringBuilder builder4;
+  builder4 << reinterpret_cast<unsigned*>(0);
+  EXPECT_EQ("(nil)", std::string(builder4.c_str()));
+}
+
+}  // namespace partition_alloc::internal::base::strings
diff --git a/base/allocator/partition_allocator/pointers/raw_ptr.h b/base/allocator/partition_allocator/pointers/raw_ptr.h
index e1bd29c..32950e5 100644
--- a/base/allocator/partition_allocator/pointers/raw_ptr.h
+++ b/base/allocator/partition_allocator/pointers/raw_ptr.h
@@ -377,13 +377,7 @@
     return *this;
   }
 
-// Constexpr destructors were introduced in C++20. PartitionAlloc's minimum
-// supported C++ version is C++17.
-#if defined(__cpp_constexpr) && __cpp_constexpr >= 201907L
-  PA_ALWAYS_INLINE constexpr ~raw_ptr() noexcept {
-#else
-  PA_ALWAYS_INLINE ~raw_ptr() noexcept {
-#endif
+  PA_ALWAYS_INLINE PA_CONSTEXPR_DTOR ~raw_ptr() noexcept {
     Impl::ReleaseWrappedPtr(wrapped_ptr_);
     // Work around external issues where raw_ptr is used after destruction.
     if constexpr (kZeroOnDestruct) {
@@ -547,6 +541,36 @@
   // possible, so use it only if absolutely necessary (e.g. for const_cast).
   PA_ALWAYS_INLINE constexpr T* get() const { return GetForExtraction(); }
 
+  // You may use |raw_ptr<T>::AsEphemeralRawAddr()| to obtain |T**| or |T*&|
+  // from |raw_ptr<T>|, as long as you follow these requirements:
+  // - DO NOT carry T**/T*& obtained via AsEphemeralRawAddr() out of
+  //   expression.
+  // - DO NOT use raw_ptr or T**/T*& multiple times within an expression.
+  //
+  // https://chromium.googlesource.com/chromium/src/+/main/base/memory/raw_ptr.md#in_out-arguments-need-to-be-refactored
+  class EphemeralRawAddr {
+   public:
+    EphemeralRawAddr(const EphemeralRawAddr&) = delete;
+    EphemeralRawAddr& operator=(const EphemeralRawAddr&) = delete;
+    void* operator new(size_t) = delete;
+    void* operator new(size_t, void*) = delete;
+    PA_ALWAYS_INLINE PA_CONSTEXPR_DTOR ~EphemeralRawAddr() { original = copy; }
+
+    PA_ALWAYS_INLINE constexpr T** operator&() && { return &copy; }
+    // NOLINTNEXTLINE(google-explicit-constructor)
+    PA_ALWAYS_INLINE constexpr operator T*&() && { return copy; }
+
+   private:
+    friend class raw_ptr;
+    PA_ALWAYS_INLINE constexpr explicit EphemeralRawAddr(raw_ptr& ptr)
+        : copy(ptr.get()), original(ptr) {}
+    T* copy;
+    raw_ptr& original;  // Original pointer.
+  };
+  PA_ALWAYS_INLINE PA_CONSTEXPR_DTOR EphemeralRawAddr AsEphemeralRawAddr() & {
+    return EphemeralRawAddr(*this);
+  }
+
   PA_ALWAYS_INLINE constexpr explicit operator bool() const {
     return !!wrapped_ptr_;
   }
diff --git a/base/allocator/partition_allocator/pointers/raw_ptr_unittest.cc b/base/allocator/partition_allocator/pointers/raw_ptr_unittest.cc
index 2cb0fc5..34f7058 100644
--- a/base/allocator/partition_allocator/pointers/raw_ptr_unittest.cc
+++ b/base/allocator/partition_allocator/pointers/raw_ptr_unittest.cc
@@ -7,6 +7,7 @@
 #include <climits>
 #include <cstddef>
 #include <cstdint>
+#include <memory>
 #include <string>
 #include <thread>
 #include <type_traits>
@@ -135,6 +136,9 @@
     [[maybe_unused]] Int* i2 = r;               // operator T*()
     [[maybe_unused]] IntBase* i3 = r;           // operator Convertible*()
 
+    [[maybe_unused]] Int** i4 = &r.AsEphemeralRawAddr();
+    [[maybe_unused]] Int*& i5 = r.AsEphemeralRawAddr();
+
     Int* array = new Int[3]();
     {
       raw_ptr<Int, base::RawPtrTraits::kAllowPtrArithmetic> ra(array);
@@ -1501,6 +1505,48 @@
   EXPECT_EQ(base::to_address(raw), base::to_address(miracle));
 }
 
+void InOutParamFuncWithPointer(int* in, int** out) {
+  *out = in;
+}
+
+TEST_F(RawPtrTest, EphemeralRawAddrPointerPointer) {
+  int v1 = 123;
+  int v2 = 456;
+  raw_ptr<int> ptr = &v1;
+  // Pointer pointer should point to a pointer other than one inside raw_ptr.
+  EXPECT_NE(&ptr.AsEphemeralRawAddr(),
+            reinterpret_cast<int**>(std::addressof(ptr)));
+  // But inner pointer should point to the same address.
+  EXPECT_EQ(*&ptr.AsEphemeralRawAddr(), &v1);
+
+  // Inner pointer can be rewritten via the pointer pointer.
+  *&ptr.AsEphemeralRawAddr() = &v2;
+  EXPECT_EQ(ptr.get(), &v2);
+  InOutParamFuncWithPointer(&v1, &ptr.AsEphemeralRawAddr());
+  EXPECT_EQ(ptr.get(), &v1);
+}
+
+void InOutParamFuncWithReference(int* in, int*& out) {
+  out = in;
+}
+
+TEST_F(RawPtrTest, EphemeralRawAddrPointerReference) {
+  int v1 = 123;
+  int v2 = 456;
+  raw_ptr<int> ptr = &v1;
+  // Pointer reference should refer to a pointer other than one inside raw_ptr.
+  EXPECT_NE(&static_cast<int*&>(ptr.AsEphemeralRawAddr()),
+            reinterpret_cast<int**>(std::addressof(ptr)));
+  // But inner pointer should point to the same address.
+  EXPECT_EQ(static_cast<int*&>(ptr.AsEphemeralRawAddr()), &v1);
+
+  // Inner pointer can be rewritten via the pointer pointer.
+  static_cast<int*&>(ptr.AsEphemeralRawAddr()) = &v2;
+  EXPECT_EQ(ptr.get(), &v2);
+  InOutParamFuncWithReference(&v1, ptr.AsEphemeralRawAddr());
+  EXPECT_EQ(ptr.get(), &v1);
+}
+
 }  // namespace
 
 namespace base::internal {
diff --git a/base/apple/bridging.h b/base/apple/bridging.h
index 56f791e..1a9284b 100644
--- a/base/apple/bridging.h
+++ b/base/apple/bridging.h
@@ -22,10 +22,6 @@
 #import <AppKit/AppKit.h>
 #endif
 
-#if !defined(__has_feature) || !__has_feature(objc_arc)
-#error "base/apple/bridging.h requires ARC."
-#endif
-
 // These functions convert pointers of bridged CFTypes to NSTypes and
 // vice-versa. They come in two flavors: those that transfer ownership
 // (`OwnershipCast`) and those that just convert the pointer (`PtrCast`).
diff --git a/base/macros/concat.h b/base/macros/concat.h
new file mode 100644
index 0000000..5909d4e
--- /dev/null
+++ b/base/macros/concat.h
@@ -0,0 +1,16 @@
+// Copyright 2023 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_MACROS_CONCAT_H_
+#define BASE_MACROS_CONCAT_H_
+
+// A macro that expands to the concatenation of its arguments. If the arguments
+// are themselves macros, they are first expanded (due to the indirection
+// through a second macro). This can be used to construct tokens.
+#define BASE_CONCAT(a, b) BASE_INTERNAL_CONCAT(a, b)
+
+// Implementation details: do not use directly.
+#define BASE_INTERNAL_CONCAT(a, b) a##b
+
+#endif  // BASE_MACROS_CONCAT_H_
diff --git a/base/macros/if.h b/base/macros/if.h
new file mode 100644
index 0000000..eca4041
--- /dev/null
+++ b/base/macros/if.h
@@ -0,0 +1,20 @@
+// Copyright 2023 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_MACROS_IF_H_
+#define BASE_MACROS_IF_H_
+
+#include "base/macros/concat.h"
+
+// Given a `_Cond` that evaluates to exactly 0 or 1, this macro evaluates to
+// either the `_Then` or `_Else` args. Unlike a real conditional expression,
+// this does not support conditions other than `0` and `1`.
+#define BASE_IF(_Cond, _Then, _Else) \
+  BASE_CONCAT(BASE_INTERNAL_IF_, _Cond)(_Then, _Else)
+
+// Implementation details: do not use directly.
+#define BASE_INTERNAL_IF_1(_Then, _Else) _Then
+#define BASE_INTERNAL_IF_0(_Then, _Else) _Else
+
+#endif  // BASE_MACROS_IF_H_
diff --git a/base/macros/uniquify.h b/base/macros/uniquify.h
new file mode 100644
index 0000000..4e72364
--- /dev/null
+++ b/base/macros/uniquify.h
@@ -0,0 +1,15 @@
+// Copyright 2023 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_MACROS_UNIQUIFY_H_
+#define BASE_MACROS_UNIQUIFY_H_
+
+#include "base/macros/concat.h"
+
+// A macro to create a "unique" token name beginning with `name` by appending
+// the current line number. This is generally used inside other macros that need
+// to create temporaries while minimizing the likelihood of name conflicts.
+#define BASE_UNIQUIFY(name) BASE_CONCAT(name, __LINE__)
+
+#endif  // BASE_MACROS_UNIQUIFY_H_
diff --git a/base/memory/raw_ptr.md b/base/memory/raw_ptr.md
index d86c70d..701d49b 100644
--- a/base/memory/raw_ptr.md
+++ b/base/memory/raw_ptr.md
@@ -378,6 +378,60 @@
 }
 ```
 
+
+In case you cannot refactor the in-out arguments (e.g. third party library), you
+may use `raw_ptr.AsEphemeralRawAddr()` to obtain *extremely* short-lived
+`T**` or `T*&`. You should not treat `T**` obtained via
+`raw_ptr.AsEphemeralRawAddr()` as a normal pointer pointer, and must follow
+these requirements.
+
+- Do NOT store `T**` or `T*&` anywhere, even as a local variable.
+  - It will become invalid very quickly and can cause dangling pointer issue
+- Do NOT use `raw_ptr<T>`, `T**` or `T*&` multiple times within an expression.
+  - The implementation assumes raw_ptr<T> is never accessed when `T**` or `T*&`
+    is alive.
+
+```cpp
+void GetSomeClassPtr(SomeClass** out_arg) {
+  *out_arg = ...;
+}
+void FillPtr(SomeClass*& out_arg) {
+  out_arg = ...;
+}
+void Foo() {
+  raw_ptr<SomeClass> ptr;
+  GetSomeClassPtr(&ptr.AsEphemeralRawAddr());
+  FillPtr(ptr.AsEphemeralRawAddr()); // Implicitly converted into |SomeClass*&|.
+}
+```
+
+Technically, `raw_ptr.AsEphemeralRawAddr()` generates a temporary instance of
+`raw_ptr<T>::EphemeralRawAddr`, which holds a temporary copy of `T*`.
+`T**` and `T*&` points to a copied version of the original pointer and
+any modification made via `T**` or `T*&` is written back on destruction of
+`EphemeralRawAddr` instance.
+C++ guarantees a temporary object returned by `raw_ptr.AsEphemeralRawAddr()`
+lives until completion of evaluation of "full-expression" (i.e. the outermost
+expression). This makes it possible to use `T**` and `T*&` within single
+expression like in-out param.
+
+```cpp
+struct EphemeralRawAddr {
+  EphemeralRawAddr(raw_ptr& ptr): copy(ptr.get()), original(ptr) {}
+  ~EphemeralRawAddr() {
+    original = copy;
+    copy = nullptr;
+  }
+
+  T** operator&() { return &copy; }
+  operator T*&() { return copy; }
+
+  T* copy;
+  raw_ptr& original;  // Original pointer.
+};
+```
+
+
 ### Modern |nullptr| is required
 
 As recommended by the Google C++ Style Guide,
diff --git a/base/profiler/stack_sampler.cc b/base/profiler/stack_sampler.cc
index f6c5cbf..de219ee 100644
--- a/base/profiler/stack_sampler.cc
+++ b/base/profiler/stack_sampler.cc
@@ -207,7 +207,7 @@
       module_cache_(module_cache),
       record_sample_callback_(std::move(record_sample_callback)),
       test_delegate_(test_delegate) {
-  DCHECK(unwinders_factory_);
+  CHECK(unwinders_factory_);
 }
 
 // static
diff --git a/base/sequence_checker.h b/base/sequence_checker.h
index d5b5e3d..017c340 100644
--- a/base/sequence_checker.h
+++ b/base/sequence_checker.h
@@ -7,6 +7,7 @@
 
 #include "base/base_export.h"
 #include "base/dcheck_is_on.h"
+#include "base/macros/uniquify.h"
 #include "base/sequence_checker_impl.h"
 
 // SequenceChecker is a helper class used to help verify that some methods of a
@@ -68,16 +69,10 @@
 //     SEQUENCE_CHECKER(my_sequence_checker_);
 //   }
 
-#define SEQUENCE_CHECKER_INTERNAL_CONCAT2(a, b) a##b
-#define SEQUENCE_CHECKER_INTERNAL_CONCAT(a, b) \
-  SEQUENCE_CHECKER_INTERNAL_CONCAT2(a, b)
-#define SEQUENCE_CHECKER_INTERNAL_UID(prefix) \
-  SEQUENCE_CHECKER_INTERNAL_CONCAT(prefix, __LINE__)
-
 #if DCHECK_IS_ON()
 #define SEQUENCE_CHECKER(name) base::SequenceChecker name
-#define DCHECK_CALLED_ON_VALID_SEQUENCE(name, ...)                   \
-  base::ScopedValidateSequenceChecker SEQUENCE_CHECKER_INTERNAL_UID( \
+#define DCHECK_CALLED_ON_VALID_SEQUENCE(name, ...)   \
+  base::ScopedValidateSequenceChecker BASE_UNIQUIFY( \
       scoped_validate_sequence_checker_)(name, ##__VA_ARGS__)
 #define DETACH_FROM_SEQUENCE(name) (name).DetachFromSequence()
 #else  // DCHECK_IS_ON()
diff --git a/base/task/lazy_thread_pool_task_runner.h b/base/task/lazy_thread_pool_task_runner.h
index 34d0de8..b75276a 100644
--- a/base/task/lazy_thread_pool_task_runner.h
+++ b/base/task/lazy_thread_pool_task_runner.h
@@ -10,6 +10,7 @@
 
 #include "base/base_export.h"
 #include "base/functional/callback.h"
+#include "base/macros/uniquify.h"
 #include "base/task/common/checked_lock.h"
 #include "base/task/sequenced_task_runner.h"
 #include "base/task/single_thread_task_runner.h"
@@ -83,21 +84,15 @@
     internal::LazyThreadPoolTaskRunner<SingleThreadTaskRunner, true>;
 #endif
 
-// Helper macros to generate a variable name by concatenation.
-#define LAZY_TASK_RUNNER_CONCATENATE_INTERNAL2(a, b) a##b
-#define LAZY_TASK_RUNNER_CONCATENATE_INTERNAL(a, b) \
-  LAZY_TASK_RUNNER_CONCATENATE_INTERNAL2(a, b)
-
 // Use the macros below to initialize a LazyThreadPoolTaskRunner. These macros
 // verify that their arguments are constexpr, which is important to prevent the
 // generation of a static initializer.
 
 // |traits| are TaskTraits used when creating the SequencedTaskRunner.
-#define LAZY_THREAD_POOL_SEQUENCED_TASK_RUNNER_INITIALIZER(traits)     \
-  base::LazyThreadPoolSequencedTaskRunner::CreateInternal(traits);     \
-  [[maybe_unused]] constexpr base::TaskTraits                          \
-      LAZY_TASK_RUNNER_CONCATENATE_INTERNAL(kVerifyTraitsAreConstexpr, \
-                                            __LINE__) = traits
+#define LAZY_THREAD_POOL_SEQUENCED_TASK_RUNNER_INITIALIZER(traits) \
+  base::LazyThreadPoolSequencedTaskRunner::CreateInternal(traits); \
+  [[maybe_unused]] constexpr base::TaskTraits BASE_UNIQUIFY(       \
+      kVerifyTraitsAreConstexpr) = traits
 
 // |traits| are TaskTraits used when creating the SingleThreadTaskRunner.
 // |thread_mode| specifies whether the SingleThreadTaskRunner can share its
@@ -106,12 +101,10 @@
                                                                thread_mode) \
   base::LazyThreadPoolSingleThreadTaskRunner::CreateInternal(traits,        \
                                                              thread_mode);  \
-  [[maybe_unused]] constexpr base::TaskTraits                               \
-      LAZY_TASK_RUNNER_CONCATENATE_INTERNAL(kVerifyTraitsAreConstexpr,      \
-                                            __LINE__) = traits;             \
+  [[maybe_unused]] constexpr base::TaskTraits BASE_UNIQUIFY(                \
+      kVerifyTraitsAreConstexpr) = traits;                                  \
   [[maybe_unused]] constexpr base::SingleThreadTaskRunnerThreadMode         \
-      LAZY_TASK_RUNNER_CONCATENATE_INTERNAL(kVerifyThreadModeIsConstexpr,   \
-                                            __LINE__) = thread_mode
+  BASE_UNIQUIFY(kVerifyThreadModeIsConstexpr) = thread_mode
 
 // |traits| are TaskTraits used when creating the COM STA
 // SingleThreadTaskRunner. |thread_mode| specifies whether the COM STA
@@ -119,12 +112,10 @@
 // SingleThreadTaskRunners.
 #define LAZY_COM_STA_TASK_RUNNER_INITIALIZER(traits, thread_mode)            \
   base::LazyThreadPoolCOMSTATaskRunner::CreateInternal(traits, thread_mode); \
-  [[maybe_unused]] constexpr base::TaskTraits                                \
-      LAZY_TASK_RUNNER_CONCATENATE_INTERNAL(kVerifyTraitsAreConstexpr,       \
-                                            __LINE__) = traits;              \
+  [[maybe_unused]] constexpr base::TaskTraits BASE_UNIQUIFY(                 \
+      kVerifyTraitsAreConstexpr) = traits;                                   \
   [[maybe_unused]] constexpr base::SingleThreadTaskRunnerThreadMode          \
-      LAZY_TASK_RUNNER_CONCATENATE_INTERNAL(kVerifyThreadModeIsConstexpr,    \
-                                            __LINE__) = thread_mode
+  BASE_UNIQUIFY(kVerifyThreadModeIsConstexpr) = thread_mode
 
 namespace internal {
 
diff --git a/base/test/perf_test_suite.cc b/base/test/perf_test_suite.cc
index cd152c5..5a6fd80 100644
--- a/base/test/perf_test_suite.cc
+++ b/base/test/perf_test_suite.cc
@@ -13,7 +13,6 @@
 #include "base/test/perf_log.h"
 #include "build/build_config.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/google_benchmark/src/include/benchmark/benchmark.h"
 
 #if BUILDFLAG(IS_FUCHSIA)
 #include "base/fuchsia/file_utils.h"
@@ -50,20 +49,8 @@
     RaiseProcessToHighPriority();
 }
 
-void PerfTestSuite::InitializeFromCommandLine(int argc, char** argv) {
-  TestSuite::InitializeFromCommandLine(argc, argv);
-  ::benchmark::Initialize(&argc, argv);
-}
-
-int PerfTestSuite::RunAllTests() {
-  const int result = TestSuite::RunAllTests();
-  ::benchmark::RunSpecifiedBenchmarks();
-  return result;
-}
-
 void PerfTestSuite::Shutdown() {
   TestSuite::Shutdown();
-  ::benchmark::Shutdown();
   FinalizePerfLog();
 }
 
diff --git a/base/test/perf_test_suite.h b/base/test/perf_test_suite.h
index 50d7d0f..930b75e 100644
--- a/base/test/perf_test_suite.h
+++ b/base/test/perf_test_suite.h
@@ -13,11 +13,7 @@
  public:
   PerfTestSuite(int argc, char** argv);
 
-  // TODO(crbug.com/1404759): Port all perf tests to Google Benchmark and
-  // eliminate gTest dependence from perf tests.
   void Initialize() override;
-  void InitializeFromCommandLine(int argc, char** argv) override;
-  int RunAllTests() override;
   void Shutdown() override;
 };
 
diff --git a/base/test/test_suite.cc b/base/test/test_suite.cc
index c2373e1..d74f677 100644
--- a/base/test/test_suite.cc
+++ b/base/test/test_suite.cc
@@ -6,10 +6,7 @@
 
 #include <signal.h>
 
-#include <algorithm>
 #include <memory>
-#include <string>
-#include <vector>
 
 #include "base/allocator/partition_allocator/partition_alloc_buildflags.h"
 #include "base/allocator/partition_allocator/tagging.h"
@@ -37,7 +34,6 @@
 #include "base/process/process.h"
 #include "base/process/process_handle.h"
 #include "base/strings/string_piece.h"
-#include "base/strings/utf_string_conversions.h"
 #include "base/task/thread_pool/thread_pool_instance.h"
 #include "base/test/gtest_xml_unittest_result_printer.h"
 #include "base/test/gtest_xml_util.h"
@@ -295,36 +291,6 @@
 #endif  // !BUILDFLAG(IS_ANDROID)
 }
 
-#if BUILDFLAG(IS_WIN)
-// Handlers for invalid parameter, pure call, and abort. They generate a
-// breakpoint to ensure that we get a call stack on these failures.
-// These functions should be written to be unique in order to avoid confusing
-// call stacks from /OPT:ICF function folding. Printing a unique message or
-// returning a unique value will do this. Note that for best results they need
-// to be unique from *all* functions in Chrome.
-void InvalidParameter(const wchar_t* expression,
-                      const wchar_t* function,
-                      const wchar_t* file,
-                      unsigned int line,
-                      uintptr_t reserved) {
-  // CRT printed message is sufficient.
-  __debugbreak();
-  _exit(1);
-}
-
-void PureCall() {
-  fprintf(stderr, "Pure-virtual function call. Terminating.\n");
-  __debugbreak();
-  _exit(1);
-}
-
-void AbortHandler(int signal) {
-  // Print EOL after the CRT abort message.
-  fprintf(stderr, "\n");
-  __debugbreak();
-}
-#endif
-
 }  // namespace
 
 int RunUnitTestsUsingBaseTestSuite(int argc, char** argv) {
@@ -334,20 +300,20 @@
 }
 
 TestSuite::TestSuite(int argc, char** argv) {
-  Construct(argc, argv);
+  PreInitialize();
+  InitializeFromCommandLine(argc, argv);
+  // Logging must be initialized before any thread has a chance to call logging
+  // functions.
+  InitializeLogging();
 }
 
 #if BUILDFLAG(IS_WIN)
 TestSuite::TestSuite(int argc, wchar_t** argv) {
-  std::vector<std::string> arg_strs;
-  arg_strs.reserve(argc);
-  std::vector<char*> arg_ptrs;
-  arg_ptrs.reserve(argc);
-  std::for_each(argv, argv + argc, [&](wchar_t* arg) {
-    arg_strs.push_back(WideToUTF8(arg));
-    arg_ptrs.push_back(arg_strs.back().data());
-  });
-  Construct(argc, arg_ptrs.data());
+  PreInitialize();
+  InitializeFromCommandLine(argc, argv);
+  // Logging must be initialized before any thread has a chance to call logging
+  // functions.
+  InitializeLogging();
 }
 #endif  // BUILDFLAG(IS_WIN)
 
@@ -356,6 +322,98 @@
     CommandLine::Reset();
 }
 
+void TestSuite::InitializeFromCommandLine(int argc, char** argv) {
+  initialized_command_line_ = CommandLine::Init(argc, argv);
+  testing::InitGoogleTest(&argc, argv);
+  testing::InitGoogleMock(&argc, argv);
+
+#if BUILDFLAG(IS_IOS)
+  InitIOSArgs(argc, argv);
+#endif
+}
+
+#if BUILDFLAG(IS_WIN)
+void TestSuite::InitializeFromCommandLine(int argc, wchar_t** argv) {
+  // Windows CommandLine::Init ignores argv anyway.
+  initialized_command_line_ = CommandLine::Init(argc, NULL);
+  testing::InitGoogleTest(&argc, argv);
+  testing::InitGoogleMock(&argc, argv);
+}
+#endif  // BUILDFLAG(IS_WIN)
+
+void TestSuite::PreInitialize() {
+  DCHECK(!is_initialized_);
+
+#if BUILDFLAG(IS_WIN)
+  base::debug::HandleHooks::PatchLoadedModules();
+#endif  // BUILDFLAG(IS_WIN)
+
+  // The default death_test_style of "fast" is a frequent source of subtle test
+  // flakiness. And on some platforms like macOS, use of system libraries after
+  // fork() but before exec() is unsafe. Using the threadsafe style by default
+  // alleviates these concerns.
+  //
+  // However, the threasafe style does not work reliably on Android, so that
+  // will keep the default of "fast". See https://crbug.com/815537,
+  // https://github.com/google/googletest/issues/1496, and
+  // https://github.com/google/googletest/issues/2093.
+  // TODO(danakj): Determine if all death tests should be skipped on Android
+  // (many already are, such as for DCHECK-death tests).
+#if !BUILDFLAG(IS_ANDROID)
+  testing::GTEST_FLAG(death_test_style) = "threadsafe";
+#endif
+
+#if BUILDFLAG(IS_WIN)
+  testing::GTEST_FLAG(catch_exceptions) = false;
+#endif
+  EnableTerminationOnHeapCorruption();
+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_AURA)
+  // When calling native char conversion functions (e.g wrctomb) we need to
+  // have the locale set. In the absence of such a call the "C" locale is the
+  // default. In the gtk code (below) gtk_init() implicitly sets a locale.
+  setlocale(LC_ALL, "");
+  // We still need number to string conversions to be locale insensitive.
+  setlocale(LC_NUMERIC, "C");
+#endif  // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_AURA)
+
+  // On Android, AtExitManager is created in
+  // testing/android/native_test_wrapper.cc before main() is called.
+#if !BUILDFLAG(IS_ANDROID)
+  at_exit_manager_ = std::make_unique<AtExitManager>();
+#endif
+
+  // Don't add additional code to this function.  Instead add it to
+  // Initialize().  See bug 6436.
+}
+
+void TestSuite::AddTestLauncherResultPrinter() {
+  // Only add the custom printer if requested.
+  if (!CommandLine::ForCurrentProcess()->HasSwitch(
+          switches::kTestLauncherOutput)) {
+    return;
+  }
+
+  FilePath output_path(CommandLine::ForCurrentProcess()->GetSwitchValuePath(
+      switches::kTestLauncherOutput));
+
+  // Do not add the result printer if output path already exists. It's an
+  // indicator there is a process printing to that file, and we're likely
+  // its child. Do not clobber the results in that case.
+  if (PathExists(output_path)) {
+    LOG(WARNING) << "Test launcher output path " << output_path.AsUTF8Unsafe()
+                 << " exists. Not adding test launcher result printer.";
+    return;
+  }
+
+  printer_ = new XmlUnitTestResultPrinter;
+  CHECK(printer_->Initialize(output_path))
+      << "Output path is " << output_path.AsUTF8Unsafe()
+      << " and PathExists(output_path) is " << PathExists(output_path);
+  testing::TestEventListeners& listeners =
+      testing::UnitTest::GetInstance()->listeners();
+  listeners.Append(printer_);
+}
+
 // Don't add additional code to this method.  Instead add it to
 // Initialize().  See bug 6436.
 int TestSuite::Run() {
@@ -400,7 +458,7 @@
     // is not needed.
 #endif
 
-  int result = RunAllTests();
+  int result = RUN_ALL_TESTS();
 
 #if BUILDFLAG(IS_APPLE)
   // This MUST happen before Shutdown() since Shutdown() tears down
@@ -414,16 +472,16 @@
   return result;
 }
 
-void TestSuite::DisableCheckForThreadAndProcessPriority() {
-  DCHECK(!is_initialized_);
-  check_for_thread_and_process_priority_ = false;
-}
-
 void TestSuite::DisableCheckForLeakedGlobals() {
   DCHECK(!is_initialized_);
   check_for_leaked_globals_ = false;
 }
 
+void TestSuite::DisableCheckForThreadAndProcessPriority() {
+  DCHECK(!is_initialized_);
+  check_for_thread_and_process_priority_ = false;
+}
+
 void TestSuite::UnitTestAssertHandler(const char* file,
                                       int line,
                                       const StringPiece summary,
@@ -457,6 +515,40 @@
   _exit(1);
 }
 
+#if BUILDFLAG(IS_WIN)
+namespace {
+
+// Handlers for invalid parameter, pure call, and abort. They generate a
+// breakpoint to ensure that we get a call stack on these failures.
+// These functions should be written to be unique in order to avoid confusing
+// call stacks from /OPT:ICF function folding. Printing a unique message or
+// returning a unique value will do this. Note that for best results they need
+// to be unique from *all* functions in Chrome.
+void InvalidParameter(const wchar_t* expression,
+                      const wchar_t* function,
+                      const wchar_t* file,
+                      unsigned int line,
+                      uintptr_t reserved) {
+  // CRT printed message is sufficient.
+  __debugbreak();
+  _exit(1);
+}
+
+void PureCall() {
+  fprintf(stderr, "Pure-virtual function call. Terminating.\n");
+  __debugbreak();
+  _exit(1);
+}
+
+void AbortHandler(int signal) {
+  // Print EOL after the CRT abort message.
+  fprintf(stderr, "\n");
+  __debugbreak();
+}
+
+}  // namespace
+#endif
+
 void TestSuite::SuppressErrorDialogs() {
 #if BUILDFLAG(IS_WIN)
   UINT new_flags =
@@ -590,104 +682,9 @@
   is_initialized_ = true;
 }
 
-void TestSuite::InitializeFromCommandLine(int argc, char** argv) {
-  initialized_command_line_ = CommandLine::Init(argc, argv);
-  testing::InitGoogleTest(&argc, argv);
-  testing::InitGoogleMock(&argc, argv);
-
-#if BUILDFLAG(IS_IOS)
-  InitIOSArgs(argc, argv);
-#endif
-}
-
-int TestSuite::RunAllTests() {
-  return RUN_ALL_TESTS();
-}
-
 void TestSuite::Shutdown() {
   DCHECK(is_initialized_);
   debug::StopProfiling();
 }
 
-void TestSuite::Construct(int argc, char** argv) {
-  PreInitialize();
-  InitializeFromCommandLine(argc, argv);
-  // Logging must be initialized before any thread has a chance to call logging
-  // functions.
-  InitializeLogging();
-}
-
-void TestSuite::PreInitialize() {
-  DCHECK(!is_initialized_);
-
-#if BUILDFLAG(IS_WIN)
-  base::debug::HandleHooks::PatchLoadedModules();
-#endif  // BUILDFLAG(IS_WIN)
-
-  // The default death_test_style of "fast" is a frequent source of subtle test
-  // flakiness. And on some platforms like macOS, use of system libraries after
-  // fork() but before exec() is unsafe. Using the threadsafe style by default
-  // alleviates these concerns.
-  //
-  // However, the threasafe style does not work reliably on Android, so that
-  // will keep the default of "fast". See https://crbug.com/815537,
-  // https://github.com/google/googletest/issues/1496, and
-  // https://github.com/google/googletest/issues/2093.
-  // TODO(danakj): Determine if all death tests should be skipped on Android
-  // (many already are, such as for DCHECK-death tests).
-#if !BUILDFLAG(IS_ANDROID)
-  testing::GTEST_FLAG(death_test_style) = "threadsafe";
-#endif
-
-#if BUILDFLAG(IS_WIN)
-  testing::GTEST_FLAG(catch_exceptions) = false;
-#endif
-  EnableTerminationOnHeapCorruption();
-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_AURA)
-  // When calling native char conversion functions (e.g wrctomb) we need to
-  // have the locale set. In the absence of such a call the "C" locale is the
-  // default. In the gtk code (below) gtk_init() implicitly sets a locale.
-  setlocale(LC_ALL, "");
-  // We still need number to string conversions to be locale insensitive.
-  setlocale(LC_NUMERIC, "C");
-#endif  // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_AURA)
-
-  // On Android, AtExitManager is created in
-  // testing/android/native_test_wrapper.cc before main() is called.
-#if !BUILDFLAG(IS_ANDROID)
-  at_exit_manager_ = std::make_unique<AtExitManager>();
-#endif
-
-  // Don't add additional code to this function.  Instead add it to
-  // Initialize().  See bug 6436.
-}
-
-void TestSuite::AddTestLauncherResultPrinter() {
-  // Only add the custom printer if requested.
-  if (!CommandLine::ForCurrentProcess()->HasSwitch(
-          switches::kTestLauncherOutput)) {
-    return;
-  }
-
-  FilePath output_path(CommandLine::ForCurrentProcess()->GetSwitchValuePath(
-      switches::kTestLauncherOutput));
-
-  // Do not add the result printer if output path already exists. It's an
-  // indicator there is a process printing to that file, and we're likely
-  // its child. Do not clobber the results in that case.
-  if (PathExists(output_path)) {
-    LOG(WARNING) << "Test launcher output path " << output_path.AsUTF8Unsafe()
-                 << " exists. Not adding test launcher result printer.";
-    return;
-  }
-
-  printer_ = new XmlUnitTestResultPrinter;
-  CHECK(printer_->Initialize(output_path))
-      << "Output path is " << output_path.AsUTF8Unsafe()
-      << " and PathExists(output_path) is " << PathExists(output_path);
-  testing::TestEventListeners& listeners =
-      testing::UnitTest::GetInstance()->listeners();
-  listeners.Append(printer_);
-}
-
 }  // namespace base
diff --git a/base/test/test_suite.h b/base/test/test_suite.h
index 7c31603..14fa882 100644
--- a/base/test/test_suite.h
+++ b/base/test/test_suite.h
@@ -73,11 +73,10 @@
   // Disable crash dialogs so that it doesn't gum up the buildbot
   virtual void SuppressErrorDialogs();
 
-  // Override these for custom test handling. Use these instead of putting
-  // complex code in your constructor/destructor.
+  // Override these for custom initialization and shutdown handling.  Use these
+  // instead of putting complex code in your constructor/destructor.
+
   virtual void Initialize();
-  virtual void InitializeFromCommandLine(int argc, char** argv);
-  virtual int RunAllTests();
   virtual void Shutdown();
 
   // Make sure that we setup an AtExitManager so Singleton objects will be
@@ -85,16 +84,16 @@
   std::unique_ptr<base::AtExitManager> at_exit_manager_;
 
  private:
-  // Implementation of the constructor. Factored to a helper so that the
-  // Windows-specific constructor can delegate to it after doing some string
-  // conversion.
-  void Construct(int argc, char** argv);
+  void AddTestLauncherResultPrinter();
+
+  void InitializeFromCommandLine(int argc, char** argv);
+#if BUILDFLAG(IS_WIN)
+  void InitializeFromCommandLine(int argc, wchar_t** argv);
+#endif  // BUILDFLAG(IS_WIN)
 
   // Basic initialization for the test suite happens here.
   void PreInitialize();
 
-  void AddTestLauncherResultPrinter();
-
 #if BUILDFLAG(ENABLE_BASE_TRACING)
   test::TraceToFile trace_to_file_;
 #endif  // BUILDFLAG(ENABLE_BASE_TRACING)
diff --git a/base/threading/scoped_thread_priority.h b/base/threading/scoped_thread_priority.h
index 7b29938..ade4dee 100644
--- a/base/threading/scoped_thread_priority.h
+++ b/base/threading/scoped_thread_priority.h
@@ -10,6 +10,7 @@
 #include "base/base_export.h"
 #include "base/compiler_specific.h"
 #include "base/location.h"
+#include "base/macros/uniquify.h"
 #include "base/memory/raw_ptr.h"
 #include "build/build_config.h"
 #include "third_party/abseil-cpp/absl/types/optional.h"
@@ -19,16 +20,6 @@
 class Location;
 enum class ThreadType : int;
 
-// INTERNAL_SCOPED_THREAD_PRIORITY_APPEND_LINE(name) produces an identifier by
-// appending the current line number to |name|. This is used to avoid name
-// collisions from variables defined inside a macro.
-#define INTERNAL_SCOPED_THREAD_PRIORITY_CONCAT(a, b) a##b
-// CONCAT1 provides extra level of indirection so that __LINE__ macro expands.
-#define INTERNAL_SCOPED_THREAD_PRIORITY_CONCAT1(a, b) \
-  INTERNAL_SCOPED_THREAD_PRIORITY_CONCAT(a, b)
-#define INTERNAL_SCOPED_THREAD_PRIORITY_APPEND_LINE(name) \
-  INTERNAL_SCOPED_THREAD_PRIORITY_CONCAT1(name, __LINE__)
-
 // All code that may load a DLL on a background thread must be surrounded by a
 // scope that starts with this macro.
 //
@@ -45,23 +36,19 @@
 // begin the initialization and will all be boosted for it). On Windows, loading
 // a DLL on a background thread can lead to a priority inversion on the loader
 // lock and cause huge janks.
-#define SCOPED_MAY_LOAD_LIBRARY_AT_BACKGROUND_PRIORITY()               \
-  static std::atomic_bool INTERNAL_SCOPED_THREAD_PRIORITY_APPEND_LINE( \
-      already_loaded){false};                                          \
-  base::internal::ScopedMayLoadLibraryAtBackgroundPriority             \
-      INTERNAL_SCOPED_THREAD_PRIORITY_APPEND_LINE(                     \
-          scoped_may_load_library_at_background_priority)(             \
-          FROM_HERE,                                                   \
-          &INTERNAL_SCOPED_THREAD_PRIORITY_APPEND_LINE(already_loaded));
+#define SCOPED_MAY_LOAD_LIBRARY_AT_BACKGROUND_PRIORITY()                  \
+  static std::atomic_bool BASE_UNIQUIFY(already_loaded){false};           \
+  base::internal::ScopedMayLoadLibraryAtBackgroundPriority BASE_UNIQUIFY( \
+      scoped_may_load_library_at_background_priority)(                    \
+      FROM_HERE, &BASE_UNIQUIFY(already_loaded));
 
 // Like SCOPED_MAY_LOAD_LIBRARY_AT_BACKGROUND_PRIORITY, but raises the thread
 // priority every time the scope is entered. Use this around code that may
 // conditionally load a DLL each time it is executed, or which repeatedly loads
 // and unloads DLLs.
-#define SCOPED_MAY_LOAD_LIBRARY_AT_BACKGROUND_PRIORITY_REPEATEDLY() \
-  base::internal::ScopedMayLoadLibraryAtBackgroundPriority          \
-      INTERNAL_SCOPED_THREAD_PRIORITY_APPEND_LINE(                  \
-          scoped_may_load_library_at_background_priority)(FROM_HERE, nullptr);
+#define SCOPED_MAY_LOAD_LIBRARY_AT_BACKGROUND_PRIORITY_REPEATEDLY()       \
+  base::internal::ScopedMayLoadLibraryAtBackgroundPriority BASE_UNIQUIFY( \
+      scoped_may_load_library_at_background_priority)(FROM_HERE, nullptr);
 
 // Boosts the current thread's priority to match the priority of threads of
 // |target_thread_type| in this scope.
diff --git a/base/threading/thread_checker.h b/base/threading/thread_checker.h
index 3c1ff49..e809f04 100644
--- a/base/threading/thread_checker.h
+++ b/base/threading/thread_checker.h
@@ -7,6 +7,7 @@
 
 #include "base/base_export.h"
 #include "base/dcheck_is_on.h"
+#include "base/macros/uniquify.h"
 #include "base/strings/string_piece.h"
 #include "base/thread_annotations.h"
 #include "base/threading/thread_checker_impl.h"
@@ -76,16 +77,10 @@
 //     THREAD_CHECKER(thread_checker_);
 //   }
 
-#define THREAD_CHECKER_INTERNAL_CONCAT2(a, b) a##b
-#define THREAD_CHECKER_INTERNAL_CONCAT(a, b) \
-  THREAD_CHECKER_INTERNAL_CONCAT2(a, b)
-#define THREAD_CHECKER_INTERNAL_UID(prefix) \
-  THREAD_CHECKER_INTERNAL_CONCAT(prefix, __LINE__)
-
 #if DCHECK_IS_ON()
 #define THREAD_CHECKER(name) base::ThreadChecker name
-#define DCHECK_CALLED_ON_VALID_THREAD(name, ...)                 \
-  base::ScopedValidateThreadChecker THREAD_CHECKER_INTERNAL_UID( \
+#define DCHECK_CALLED_ON_VALID_THREAD(name, ...)   \
+  base::ScopedValidateThreadChecker BASE_UNIQUIFY( \
       scoped_validate_thread_checker_)(name, ##__VA_ARGS__);
 #define DETACH_FROM_THREAD(name) (name).DetachFromThread()
 #else  // DCHECK_IS_ON()
diff --git a/base/threading/thread_collision_warner.h b/base/threading/thread_collision_warner.h
index a11ac77..c50bfee 100644
--- a/base/threading/thread_collision_warner.h
+++ b/base/threading/thread_collision_warner.h
@@ -8,6 +8,7 @@
 #include "base/atomicops.h"
 #include "base/base_export.h"
 #include "base/compiler_specific.h"
+#include "base/macros/uniquify.h"
 #include "base/memory/raw_ptr.h"
 
 // A helper class alongside macros to be used to verify assumptions about thread
@@ -98,28 +99,22 @@
 
 #if !defined(NDEBUG)
 
-#define DFAKE_UNIQUE_VARIABLE_CONCAT(a, b) a##b
-// CONCAT1 provides extra level of indirection so that __LINE__ macro expands.
-#define DFAKE_UNIQUE_VARIABLE_CONCAT1(a, b) DFAKE_UNIQUE_VARIABLE_CONCAT(a, b)
-#define DFAKE_UNIQUE_VARIABLE_NAME(a) DFAKE_UNIQUE_VARIABLE_CONCAT1(a, __LINE__)
-
 // Defines a class member that acts like a mutex. It is used only as a
 // verification tool.
 #define DFAKE_MUTEX(obj) \
      mutable base::ThreadCollisionWarner obj
 // Asserts the call is never called simultaneously in two threads. Used at
 // member function scope.
-#define DFAKE_SCOPED_LOCK(obj)                                         \
-  base::ThreadCollisionWarner::ScopedCheck DFAKE_UNIQUE_VARIABLE_NAME( \
-      s_check_)(&obj)
+#define DFAKE_SCOPED_LOCK(obj) \
+  base::ThreadCollisionWarner::ScopedCheck BASE_UNIQUIFY(s_check_)(&obj)
 // Asserts the call is never called simultaneously in two threads. Used at
 // member function scope. Same as DFAKE_SCOPED_LOCK but allows recursive locks.
-#define DFAKE_SCOPED_RECURSIVE_LOCK(obj)            \
-  base::ThreadCollisionWarner::ScopedRecursiveCheck \
-      DFAKE_UNIQUE_VARIABLE_NAME(sr_check)(&obj)
+#define DFAKE_SCOPED_RECURSIVE_LOCK(obj)                                     \
+  base::ThreadCollisionWarner::ScopedRecursiveCheck BASE_UNIQUIFY(sr_check)( \
+      &obj)
 // Asserts the code is always executed in the same thread.
 #define DFAKE_SCOPED_LOCK_THREAD_LOCKED(obj) \
-  base::ThreadCollisionWarner::Check DFAKE_UNIQUE_VARIABLE_NAME(check_)(&obj)
+  base::ThreadCollisionWarner::Check BASE_UNIQUIFY(check_)(&obj)
 
 #else
 
diff --git a/base/trace_event/typed_macros_internal.h b/base/trace_event/typed_macros_internal.h
index ff06c96..a208dd7 100644
--- a/base/trace_event/typed_macros_internal.h
+++ b/base/trace_event/typed_macros_internal.h
@@ -6,6 +6,7 @@
 #define BASE_TRACE_EVENT_TYPED_MACROS_INTERNAL_H_
 
 #include "base/base_export.h"
+#include "base/macros/uniquify.h"
 #include "base/time/time.h"
 #include "base/trace_event/trace_event.h"
 #include "base/trace_event/typed_macros_embedder_support.h"
@@ -22,10 +23,6 @@
 // library, these macros are either implemented by Perfetto or unneeded.
 
 #if !BUILDFLAG(USE_PERFETTO_CLIENT_LIBRARY)
-#define TRACING_INTERNAL_CONCAT2(a, b) a##b
-#define TRACING_INTERNAL_CONCAT(a, b) TRACING_INTERNAL_CONCAT2(a, b)
-#define TRACING_INTERNAL_UID(prefix) TRACING_INTERNAL_CONCAT(prefix, __LINE__)
-
 #define TRACING_INTERNAL_ADD_TRACE_EVENT(phase, category, name, ...)     \
   do {                                                                   \
     INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category);                    \
@@ -54,7 +51,7 @@
                                          [](perfetto::EventContext) {});      \
       }                                                                       \
     } event;                                                                  \
-  } TRACING_INTERNAL_UID(scoped_event){[&]() {                                \
+  } BASE_UNIQUIFY(scoped_event){[&]() {                                       \
     TRACING_INTERNAL_ADD_TRACE_EVENT(TRACE_EVENT_PHASE_BEGIN, category, name, \
                                      ##__VA_ARGS__);                          \
     return 0;                                                                 \
diff --git a/components/policy/core/common/policy_bundle.cc b/components/policy/core/common/policy_bundle.cc
index 4bdde54..1b68b39 100644
--- a/components/policy/core/common/policy_bundle.cc
+++ b/components/policy/core/common/policy_bundle.cc
@@ -44,7 +44,8 @@
   return clone;
 }
 
-void PolicyBundle::MergeFrom(const PolicyBundle& other) {
+void PolicyBundle::MergeFrom(const PolicyBundle& other,
+                             bool merge_precedence_metapolicies) {
   DCHECK_NE(this, &other);
 
   // Iterate over both |this| and |other| in order; skip what's extra in |this|,
@@ -57,7 +58,8 @@
   while (it_this != end_this && it_other != end_other) {
     if (it_this->first == it_other->first) {
       // Same namespace: merge existing PolicyMaps.
-      it_this->second.MergeFrom(it_other->second);
+      it_this->second.MergeFrom(it_other->second,
+                                merge_precedence_metapolicies);
       ++it_this;
       ++it_other;
     } else if (it_this->first < it_other->first) {
diff --git a/components/policy/core/common/policy_bundle.h b/components/policy/core/common/policy_bundle.h
index 6aa58ee..c215b47 100644
--- a/components/policy/core/common/policy_bundle.h
+++ b/components/policy/core/common/policy_bundle.h
@@ -44,7 +44,10 @@
   // Each policy in each PolicyMap is replaced only if the policy from |other|
   // has a higher priority.
   // See PolicyMap::MergeFrom for details on merging individual PolicyMaps.
-  void MergeFrom(const PolicyBundle& other);
+  // If |merge_precedence_metapolicies| is true, only the precedence
+  // metapolicies are merged for each policy map. Otherwise they are skipped.
+  void MergeFrom(const PolicyBundle& other,
+                 bool merge_precedence_metapolicies = false);
 
   // Returns true if |other| has the same keys and value as |this|.
   bool Equals(const PolicyBundle& other) const;
diff --git a/components/policy/core/common/policy_map.cc b/components/policy/core/common/policy_map.cc
index b8a0918..91ecf1c 100644
--- a/components/policy/core/common/policy_map.cc
+++ b/components/policy/core/common/policy_map.cc
@@ -497,7 +497,8 @@
     *policy = std::move(other_policy_copy);
 }
 
-void PolicyMap::MergeFrom(const PolicyMap& other) {
+void PolicyMap::MergeFrom(const PolicyMap& other,
+                          bool merge_precedence_metapolicies) {
   DCHECK_NE(this, &other);
   // Set affiliation IDs before merging policy values because user affiliation
   // affects the policy precedence check.
@@ -507,15 +508,18 @@
       CombineIds(GetDeviceAffiliationIds(), other.GetDeviceAffiliationIds()));
 
 #if !BUILDFLAG(IS_CHROMEOS)
-  // Precedence metapolicies are merged before all other policies, including
-  // merging metapolicies, because their value affects policy overriding.
-  for (auto* policy : metapolicy::kPrecedence) {
-    // Default precedence is used during merging of precedence metapolicies to
-    // prevent circular dependencies.
-    MergePolicy(policy, other, true);
-  }
+  if (merge_precedence_metapolicies) {
+    // Precedence metapolicies are merged before all other policies, including
+    // merging metapolicies, because their value affects policy overriding.
+    for (auto* policy : metapolicy::kPrecedence) {
+      // Default precedence is used during merging of precedence metapolicies to
+      // prevent circular dependencies.
+      MergePolicy(policy, other, true);
+    }
 
-  UpdateStoredComputedMetapolicies();
+    UpdateStoredComputedMetapolicies();
+    return;
+  }
 #endif
 
   for (const auto& policy_and_entry : other) {
diff --git a/components/policy/core/common/policy_map.h b/components/policy/core/common/policy_map.h
index ad2e3a7..dd3f641 100644
--- a/components/policy/core/common/policy_map.h
+++ b/components/policy/core/common/policy_map.h
@@ -279,7 +279,10 @@
   // overridden by those in |other| if they have a higher priority, as defined
   // by EntryHasHigherPriority(). If a policy is contained in both maps with the
   // same priority, the current value in |this| is preserved.
-  void MergeFrom(const PolicyMap& other);
+  // If |merge_precedence_metapolicies| is true, only the precedence
+  // metapolicies are merged. Otherwise they are skipped.
+  void MergeFrom(const PolicyMap& other,
+                 bool merge_precedence_metapolicies = false);
 
   // Merge the policy values that are coming from different sources.
   void MergeValues(const std::vector<PolicyMerger*>& mergers);
diff --git a/components/policy/core/common/policy_map_unittest.cc b/components/policy/core/common/policy_map_unittest.cc
index 8cc31d9..f653204 100644
--- a/components/policy/core/common/policy_map_unittest.cc
+++ b/components/policy/core/common/policy_map_unittest.cc
@@ -449,6 +449,7 @@
   auto conflicting_policy_3 = policy_map_2.Get(kTestPolicyName3)->DeepCopy();
   auto conflicting_policy_4 = policy_map_1.Get(kTestPolicyName4)->DeepCopy();
 
+  policy_map_1.MergeFrom(policy_map_2, /*merge_precedence_metapolicies=*/true);
   policy_map_1.MergeFrom(policy_map_2);
 
   PolicyMap policy_map_expected;
@@ -1644,6 +1645,7 @@
   policy_map_1.GetMutable(kTestPolicyName7)->SetBlocked();
   policy_map_2.GetMutable(kTestPolicyName7)->SetBlocked();
   policy_map_1.GetMutable(kTestPolicyName8)->SetBlocked();
+  policy_map_1.MergeFrom(policy_map_2, /*merge_precedence_metapolicies=*/true);
   policy_map_1.MergeFrom(policy_map_2);
 
   EXPECT_TRUE(policy_map_1.Equals(policy_map_expected));
@@ -1693,6 +1695,7 @@
                                 std::move(merge_list_1),
                                 std::move(merge_list_2));
 
+  policy_map_1.MergeFrom(policy_map_2, /*merge_precedence_metapolicies=*/true);
   policy_map_1.MergeFrom(policy_map_2);
 
   EXPECT_TRUE(policy_map_1.Equals(policy_map_expected));
@@ -1827,7 +1830,8 @@
       base::Value(CloudUserPolicyOverridesCloudMachinePolicy()), nullptr);
   // Causes the stored metapolicy values to be updated.
   PolicyMap policy_map_empty;
-  policy_map.MergeFrom(policy_map_empty);
+  policy_map.MergeFrom(policy_map_empty,
+                       /*merge_precedence_metapolicies=*/true);
 
   if (IsUserAffiliated()) {
     base::flat_set<std::string> affiliation_ids;
diff --git a/components/policy/core/common/policy_service_impl.cc b/components/policy/core/common/policy_service_impl.cc
index a9eb3ed..eeee15d 100644
--- a/components/policy/core/common/policy_service_impl.cc
+++ b/components/policy/core/common/policy_service_impl.cc
@@ -321,16 +321,30 @@
 #if BUILDFLAG(IS_CHROMEOS)
   DefaultChromeAppsMigrator chrome_apps_migrator;
 #endif  // BUILDFLAG(IS_CHROMEOS)
+#if !BUILDFLAG(IS_CHROMEOS)
+  // Merge precedence metapolicies into the bundle first.
+  // Because their value affects policy overriding.
+  for (auto* provider : providers_) {
+    if (!provider->is_active()) {
+      continue;
+    }
+    PolicyMap provider_map = provider->policies().Get(chrome_namespace).Clone();
+    IgnoreUserCloudPrecedencePolicies(&provider_map);
+    bundle.Get(chrome_namespace)
+        .MergeFrom(provider_map, /*merge_precedence_metapolicies=*/true);
+  }
+#endif  // !BUILDFLAG(IS_CHROMEOS)
+
   for (auto* provider : providers_) {
     if (!provider->is_active()) {
       continue;
     }
 
     PolicyBundle provided_bundle = provider->policies().Clone();
-    IgnoreUserCloudPrecedencePolicies(&provided_bundle.Get(chrome_namespace));
     DowngradeMetricsReportingToRecommendedPolicy(
         &provided_bundle.Get(chrome_namespace));
 #if BUILDFLAG(IS_CHROMEOS)
+    IgnoreUserCloudPrecedencePolicies(&provided_bundle.Get(chrome_namespace));
     chrome_apps_migrator.Migrate(&provided_bundle.Get(chrome_namespace));
 #endif  // BUILDFLAG(IS_CHROMEOS)
     bundle.MergeFrom(provided_bundle);
diff --git a/components/policy/core/common/policy_service_impl_unittest.cc b/components/policy/core/common/policy_service_impl_unittest.cc
index eb62f8d..71163c9 100644
--- a/components/policy/core/common/policy_service_impl_unittest.cc
+++ b/components/policy/core/common/policy_service_impl_unittest.cc
@@ -2355,4 +2355,57 @@
 }
 #endif  // !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_IOS)
 
+#if !BUILDFLAG(IS_CHROMEOS)
+TEST_F(PolicyServiceTest, PrecedencePolicy) {
+  const PolicyNamespace chrome_namespace(POLICY_DOMAIN_CHROME, std::string());
+  // Initialize affiliation IDs.
+  base::flat_set<std::string> ids;
+  ids.insert(kAffiliationId1);
+
+  // Set policy.
+  std::vector<std::pair<std::string, base::Value>> policies0;
+  policies0.emplace_back("a", base::Value(true));
+  auto policy_bundle0 = CreateBundle(POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD,
+                                     std::move(policies0), chrome_namespace);
+  policy_bundle0.Get(chrome_namespace).SetUserAffiliationIds(ids);
+  policy_bundle0.Get(chrome_namespace).SetDeviceAffiliationIds(ids);
+  provider0_.UpdatePolicy(std::move(policy_bundle0));
+
+  std::vector<std::pair<std::string, base::Value>> policies1;
+  policies1.emplace_back("a", base::Value(false));
+  auto policy_bundle1 = CreateBundle(POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD,
+                                     std::move(policies1), chrome_namespace);
+  policy_bundle1.Get(chrome_namespace).SetUserAffiliationIds(ids);
+  policy_bundle1.Get(chrome_namespace).SetDeviceAffiliationIds(ids);
+  provider1_.UpdatePolicy(std::move(policy_bundle1));
+
+  // Set precedence policy.
+  std::vector<std::pair<std::string, base::Value>> policies2;
+  policies2.emplace_back(key::kCloudUserPolicyOverridesCloudMachinePolicy,
+                         base::Value(true));
+  auto policy_bundle2 = CreateBundle(POLICY_SCOPE_USER, POLICY_SOURCE_PLATFORM,
+                                     std::move(policies2), chrome_namespace);
+  policy_bundle2.Get(chrome_namespace).SetUserAffiliationIds(ids);
+  policy_bundle2.Get(chrome_namespace).SetDeviceAffiliationIds(ids);
+  provider2_.UpdatePolicy(std::move(policy_bundle2));
+
+  // Verify user cloud policy override machine cloud policy.
+  PolicyMap expected_chrome;
+  expected_chrome.Set("a", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
+                      POLICY_SOURCE_CLOUD, base::Value(true), nullptr);
+  expected_chrome.Set(key::kCloudUserPolicyOverridesCloudMachinePolicy,
+                      POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
+                      POLICY_SOURCE_PLATFORM, base::Value(true), nullptr);
+  expected_chrome.Set("migrated", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
+                      POLICY_SOURCE_PLATFORM, base::Value(15), nullptr);
+  expected_chrome.GetMutable("a")->AddConflictingPolicy(
+      PolicyMap::Entry(POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE,
+                       POLICY_SOURCE_CLOUD, base::Value(false), nullptr));
+  expected_chrome.GetMutable("a")->AddMessage(PolicyMap::MessageType::kWarning,
+                                              IDS_POLICY_CONFLICT_DIFF_VALUE);
+
+  RunUntilIdle();
+  EXPECT_TRUE(VerifyPolicies(chrome_namespace, expected_chrome));
+}
+#endif  // !BUILDFLAG(IS_CHROMEOS)
 }  // namespace policy
diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc
index 339593e..252e01a 100644
--- a/ipc/ipc_message_utils.cc
+++ b/ipc/ipc_message_utils.cc
@@ -25,6 +25,7 @@
 #include "ipc/ipc_message_attachment.h"
 #include "ipc/ipc_message_attachment_set.h"
 #include "ipc/ipc_mojo_param_traits.h"
+#include "third_party/abseil-cpp/absl/strings/ascii.h"
 
 #if BUILDFLAG(IS_APPLE)
 #include "ipc/mach_port_mac.h"
@@ -67,11 +68,12 @@
   // On POSIX, we log to stdout, which we assume can display ASCII.
   static const size_t kMaxBytesToLog = 100;
   for (size_t i = 0; i < std::min(data.size(), kMaxBytesToLog); ++i) {
-    if (isprint(data[i]))
+    if (absl::ascii_isprint(static_cast<unsigned char>(data[i]))) {
       out->push_back(data[i]);
-    else
+    } else {
       out->append(
           base::StringPrintf("[%02X]", static_cast<unsigned char>(data[i])));
+    }
   }
   if (data.size() > kMaxBytesToLog) {
     out->append(base::StringPrintf(
@@ -471,7 +473,7 @@
   return ReadCharVector(m, iter, r);
 }
 
-void ParamTraits<std::vector<char> >::Log(const param_type& p, std::string* l) {
+void ParamTraits<std::vector<char>>::Log(const param_type& p, std::string* l) {
   LogBytes(p, l);
 }
 
diff --git a/mojo/public/cpp/bindings/lib/message.cc b/mojo/public/cpp/bindings/lib/message.cc
index d488f18..94961c5 100644
--- a/mojo/public/cpp/bindings/lib/message.cc
+++ b/mojo/public/cpp/bindings/lib/message.cc
@@ -271,7 +271,7 @@
 
   void* buffer;
   uint32_t buffer_size;
-  DCHECK(base::IsValueInRangeForNumericType<uint32_t>(payload.size()));
+  CHECK(base::IsValueInRangeForNumericType<uint32_t>(payload.size()));
   DCHECK(base::IsValueInRangeForNumericType<uint32_t>(handles.size()));
   MojoAppendMessageDataOptions options;
   options.struct_size = sizeof(options);
