Patch ABSL_DEPRECATED_AND_INLINE macro to be usable in chromium

This macro still adds ABSL_REFACTOR_INLINE attribute to aid automated
refactoring scripts, but no longer adds [[deprecated]] so that chromium
code and its dependencies can continue using recently deprecated
symbols.

This should reduce work during abseil rolls when a new symbol become
deprecated, but are still used by some third party libraries.

Patches that undeprecate deprecated symbols are combined into single one
and reduced as much as possible.

Patch numbering changed with patches 0000 represent persistent patches,
where other patches are considered temporary.

Bug: None
Change-Id: I324e0c3284826b89a6bc8ab54fde1e03a34277b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7823141
Commit-Queue: Danil Chapovalov <danilchap@chromium.org>
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1626825}
NOKEYCHECK=True
GitOrigin-RevId: 2d65de36b2c525bdfcd4ebad16516e27a784e197
diff --git a/absl/base/macros.h b/absl/base/macros.h
index 392b7b8..7c9594b 100644
--- a/absl/base/macros.h
+++ b/absl/base/macros.h
@@ -230,7 +230,10 @@
 // `ABSL_REFACTOR_INLINE` is preferred because it provides a more informative
 // deprecation message to developers, especially those that do not have access
 // to the automated refactoring capabilities of go/cpp-inliner.
-#define ABSL_DEPRECATE_AND_INLINE() [[deprecated]] ABSL_REFACTOR_INLINE
+// In chromium this macro doesn't add [[deprecated]] attribute as chromium disallows to
+// use deprecated code. By removing this attribute other third party libraries get more
+// time to migrate from deprecated api to something newer.
+#define ABSL_DEPRECATE_AND_INLINE() ABSL_REFACTOR_INLINE
 
 // Requires the compiler to prove that the size of the given object is at least
 // the expected amount.
diff --git a/absl/meta/type_traits.h b/absl/meta/type_traits.h
index f9be25d..e77112f 100644
--- a/absl/meta/type_traits.h
+++ b/absl/meta/type_traits.h
@@ -119,112 +119,112 @@
 // https://en.cppreference.com/w/cpp/header/type_traits
 
 template <class T>
-using add_const_t ABSL_REFACTOR_INLINE = std::add_const_t<T>;
+using add_const_t ABSL_DEPRECATE_AND_INLINE() = std::add_const_t<T>;
 
 template <class T>
-using add_cv_t ABSL_REFACTOR_INLINE = std::add_cv_t<T>;
+using add_cv_t ABSL_DEPRECATE_AND_INLINE() = std::add_cv_t<T>;
 
 template <class T>
-using add_lvalue_reference_t ABSL_REFACTOR_INLINE =
+using add_lvalue_reference_t ABSL_DEPRECATE_AND_INLINE() =
     std::add_lvalue_reference_t<T>;
 
 template <class T>
-using add_pointer_t ABSL_REFACTOR_INLINE = std::add_pointer_t<T>;
+using add_pointer_t ABSL_DEPRECATE_AND_INLINE() = std::add_pointer_t<T>;
 
 template <class T>
-using add_rvalue_reference_t ABSL_REFACTOR_INLINE =
+using add_rvalue_reference_t ABSL_DEPRECATE_AND_INLINE() =
     std::add_rvalue_reference_t<T>;
 
 template <class T>
-using add_volatile_t ABSL_REFACTOR_INLINE = std::add_volatile_t<T>;
+using add_volatile_t ABSL_DEPRECATE_AND_INLINE() = std::add_volatile_t<T>;
 
 template <class... T>
-using common_type_t ABSL_REFACTOR_INLINE = std::common_type_t<T...>;
+using common_type_t ABSL_DEPRECATE_AND_INLINE() = std::common_type_t<T...>;
 
 template <bool C, class T, class F>
-using conditional_t ABSL_REFACTOR_INLINE = std::conditional_t<C, T, F>;
+using conditional_t ABSL_DEPRECATE_AND_INLINE() = std::conditional_t<C, T, F>;
 
 template <class... T>
-using conjunction ABSL_REFACTOR_INLINE = std::conjunction<T...>;
+using conjunction ABSL_DEPRECATE_AND_INLINE() = std::conjunction<T...>;
 
 template <class T>
-using decay_t ABSL_REFACTOR_INLINE = std::decay_t<T>;
+using decay_t ABSL_DEPRECATE_AND_INLINE() = std::decay_t<T>;
 
 template <bool C, class T = void>
-using enable_if_t ABSL_REFACTOR_INLINE = std::enable_if_t<C, T>;
+using enable_if_t ABSL_DEPRECATE_AND_INLINE() = std::enable_if_t<C, T>;
 
 template <class... T>
-using disjunction ABSL_REFACTOR_INLINE = std::disjunction<T...>;
+using disjunction ABSL_DEPRECATE_AND_INLINE() = std::disjunction<T...>;
 
 template <class T>
-using is_copy_assignable ABSL_REFACTOR_INLINE =
+using is_copy_assignable ABSL_DEPRECATE_AND_INLINE() =
     std::is_copy_assignable<T>;
 
 template <class T>
-using is_function ABSL_REFACTOR_INLINE = std::is_function<T>;
+using is_function ABSL_DEPRECATE_AND_INLINE() = std::is_function<T>;
 
 template <class T>
-using is_move_assignable ABSL_REFACTOR_INLINE =
+using is_move_assignable ABSL_DEPRECATE_AND_INLINE() =
     std::is_move_assignable<T>;
 
 template <class T>
-using is_trivially_copy_assignable ABSL_REFACTOR_INLINE =
+using is_trivially_copy_assignable ABSL_DEPRECATE_AND_INLINE() =
     std::is_trivially_copy_assignable<T>;
 
 template <class T>
-using is_trivially_copy_constructible ABSL_REFACTOR_INLINE =
+using is_trivially_copy_constructible ABSL_DEPRECATE_AND_INLINE() =
     std::is_trivially_copy_constructible<T>;
 
 template <class T>
-using is_trivially_default_constructible ABSL_REFACTOR_INLINE =
+using is_trivially_default_constructible ABSL_DEPRECATE_AND_INLINE() =
     std::is_trivially_default_constructible<T>;
 
 template <class T>
-using is_trivially_destructible ABSL_REFACTOR_INLINE =
+using is_trivially_destructible ABSL_DEPRECATE_AND_INLINE() =
     std::is_trivially_destructible<T>;
 
 template <class T>
-using is_trivially_move_assignable ABSL_REFACTOR_INLINE =
+using is_trivially_move_assignable ABSL_DEPRECATE_AND_INLINE() =
     std::is_trivially_move_assignable<T>;
 
 template <class T>
-using is_trivially_move_constructible ABSL_REFACTOR_INLINE =
+using is_trivially_move_constructible ABSL_DEPRECATE_AND_INLINE() =
     std::is_trivially_move_constructible<T>;
 
 template <class T>
-using make_signed_t ABSL_REFACTOR_INLINE = std::make_signed_t<T>;
+using make_signed_t ABSL_DEPRECATE_AND_INLINE() = std::make_signed_t<T>;
 
 template <class T>
-using make_unsigned_t ABSL_REFACTOR_INLINE = std::make_unsigned_t<T>;
+using make_unsigned_t ABSL_DEPRECATE_AND_INLINE() = std::make_unsigned_t<T>;
 
 template <class T>
-using negation ABSL_REFACTOR_INLINE = std::negation<T>;
+using negation ABSL_DEPRECATE_AND_INLINE() = std::negation<T>;
 
 template <class T>
-using remove_all_extents_t ABSL_REFACTOR_INLINE =
+using remove_all_extents_t ABSL_DEPRECATE_AND_INLINE() =
     std::remove_all_extents_t<T>;
 
 template <class T>
-using remove_const_t ABSL_REFACTOR_INLINE = std::remove_const_t<T>;
+using remove_const_t ABSL_DEPRECATE_AND_INLINE() = std::remove_const_t<T>;
 
 template <class T>
-using remove_cv_t ABSL_REFACTOR_INLINE = std::remove_cv_t<T>;
+using remove_cv_t ABSL_DEPRECATE_AND_INLINE() = std::remove_cv_t<T>;
 
 template <class T>
-using remove_extent_t ABSL_REFACTOR_INLINE = std::remove_extent_t<T>;
+using remove_extent_t ABSL_DEPRECATE_AND_INLINE() = std::remove_extent_t<T>;
 
 template <class T>
-using remove_pointer_t ABSL_REFACTOR_INLINE = std::remove_pointer_t<T>;
+using remove_pointer_t ABSL_DEPRECATE_AND_INLINE() = std::remove_pointer_t<T>;
 
 template <class T>
-using remove_reference_t ABSL_REFACTOR_INLINE =
+using remove_reference_t ABSL_DEPRECATE_AND_INLINE() =
     std::remove_reference_t<T>;
 
 template <class T>
-using remove_volatile_t ABSL_REFACTOR_INLINE = std::remove_volatile_t<T>;
+using remove_volatile_t ABSL_DEPRECATE_AND_INLINE() = std::remove_volatile_t<T>;
 
 template <class T>
-using underlying_type_t ABSL_REFACTOR_INLINE = std::underlying_type_t<T>;
+using underlying_type_t ABSL_DEPRECATE_AND_INLINE() = std::underlying_type_t<T>;
 
 #if defined(__cpp_lib_remove_cvref) && __cpp_lib_remove_cvref >= 201711L
 template <typename T>
diff --git a/absl/synchronization/mutex.h b/absl/synchronization/mutex.h
index 05af4fe..8bbbd1f 100644
--- a/absl/synchronization/mutex.h
+++ b/absl/synchronization/mutex.h
@@ -191,6 +191,7 @@
   // then acquires it exclusively. (This lock is also known as a "write lock.")
   void lock() ABSL_EXCLUSIVE_LOCK_FUNCTION();
 
+  ABSL_DEPRECATE_AND_INLINE()
   inline void Lock() ABSL_EXCLUSIVE_LOCK_FUNCTION() { lock(); }
 
   // Mutex::unlock()
@@ -199,6 +200,7 @@
   // free state. Calling thread must hold the `Mutex` exclusively.
   void unlock() ABSL_UNLOCK_FUNCTION();
 
+  ABSL_DEPRECATE_AND_INLINE()
   inline void Unlock() ABSL_UNLOCK_FUNCTION() { unlock(); }
 
   // Mutex::try_lock()
@@ -208,6 +210,7 @@
   // probability if the `Mutex` was free.
   [[nodiscard]] bool try_lock() ABSL_EXCLUSIVE_TRYLOCK_FUNCTION(true);
 
+  ABSL_DEPRECATE_AND_INLINE()
   [[nodiscard]] bool TryLock() ABSL_EXCLUSIVE_TRYLOCK_FUNCTION(true) {
     return try_lock();
   }
@@ -262,6 +265,7 @@
   // lock on the mutex.
   void lock_shared() ABSL_SHARED_LOCK_FUNCTION();
 
+  ABSL_DEPRECATE_AND_INLINE()
   void ReaderLock() ABSL_SHARED_LOCK_FUNCTION() { lock_shared(); }
 
   // Mutex::unlock_shared()
@@ -271,6 +275,7 @@
   // Note that you cannot call `unlock_shared()` on a mutex held in write mode.
   void unlock_shared() ABSL_UNLOCK_FUNCTION();
 
+  ABSL_DEPRECATE_AND_INLINE()
   void ReaderUnlock() ABSL_UNLOCK_FUNCTION() { unlock_shared(); }
 
   // Mutex::try_lock_shared()
@@ -280,6 +285,7 @@
   // `true` with high probability if the `Mutex` was free or shared.
   [[nodiscard]] bool try_lock_shared() ABSL_SHARED_TRYLOCK_FUNCTION(true);
 
+  ABSL_DEPRECATE_AND_INLINE()
   [[nodiscard]] bool ReaderTryLock() ABSL_SHARED_TRYLOCK_FUNCTION(true) {
     return try_lock_shared();
   }
@@ -304,10 +310,13 @@
   // These methods may be used (along with the complementary `Reader*()`
   // methods) to distinguish simple exclusive `Mutex` usage (`Lock()`,
   // etc.) from reader/writer lock usage.
+  ABSL_DEPRECATE_AND_INLINE()
   void WriterLock() ABSL_EXCLUSIVE_LOCK_FUNCTION() { lock(); }
 
+  ABSL_DEPRECATE_AND_INLINE()
   void WriterUnlock() ABSL_UNLOCK_FUNCTION() { unlock(); }
 
+  ABSL_DEPRECATE_AND_INLINE()
   [[nodiscard]] bool WriterTryLock() ABSL_EXCLUSIVE_TRYLOCK_FUNCTION(true) {
     return try_lock();
   }
@@ -634,6 +643,7 @@
     this->mu_.LockWhen(cond);
   }
 
+  [[deprecated("Use the constructor that takes a reference instead")]]
   ABSL_REFACTOR_INLINE
   explicit MutexLock(Mutex* absl_nonnull mu, const Condition& cond)
       ABSL_EXCLUSIVE_LOCK_FUNCTION(mu)
@@ -672,6 +682,7 @@
     mu.ReaderLockWhen(cond);
   }
 
+  [[deprecated("Use the constructor that takes a reference instead")]]
   ABSL_REFACTOR_INLINE
   explicit ReaderMutexLock(Mutex* absl_nonnull mu, const Condition& cond)
       ABSL_SHARED_LOCK_FUNCTION(mu)
@@ -712,6 +723,7 @@
     mu.WriterLockWhen(cond);
   }
 
+  [[deprecated("Use the constructor that takes a reference instead")]]
   ABSL_REFACTOR_INLINE
   explicit WriterMutexLock(Mutex* absl_nonnull mu, const Condition& cond)
       ABSL_EXCLUSIVE_LOCK_FUNCTION(mu)
@@ -1145,6 +1157,7 @@
     this->mu_->LockWhen(cond);
   }
 
+  [[deprecated("Use the constructor that takes a reference instead")]]
   ABSL_REFACTOR_INLINE
   explicit ReleasableMutexLock(Mutex* absl_nonnull mu, const Condition& cond)
       ABSL_EXCLUSIVE_LOCK_FUNCTION(mu)
diff --git a/absl/utility/utility.h b/absl/utility/utility.h
index 60e9ffa..06e5378 100644
--- a/absl/utility/utility.h
+++ b/absl/utility/utility.h
@@ -49,10 +49,10 @@
 using std::in_place_type;
 
 template <class T>
-using in_place_type_t ABSL_REFACTOR_INLINE = std::in_place_type_t<T>;
+using in_place_type_t ABSL_DEPRECATE_AND_INLINE() = std::in_place_type_t<T>;
 
 template <size_t... I>
-using index_sequence ABSL_REFACTOR_INLINE = std::index_sequence<I...>;
+using index_sequence ABSL_DEPRECATE_AND_INLINE() = std::index_sequence<I...>;
 
 template <class T, T... I>
 using integer_sequence ABSL_DEPRECATE_AND_INLINE() =
@@ -65,7 +65,7 @@
 using std::make_from_tuple;
 
 template <size_t N>
-using make_index_sequence ABSL_REFACTOR_INLINE =
+using make_index_sequence ABSL_DEPRECATE_AND_INLINE() =
     std::make_index_sequence<N>;
 
 template <class T, T N>
diff --git a/patches/0000-Allow-absl-deprecated-api b/patches/0000-Allow-absl-deprecated-api
new file mode 100644
index 0000000..6b9f4a8
--- /dev/null
+++ b/patches/0000-Allow-absl-deprecated-api
@@ -0,0 +1,22 @@
+Allow code deprecated with ABSL_DEPRECATED_AND_INLINE to be used in chromium,
+This extends transition time from deprecated api to new one.
+That is particulary helpful when symbols are deprecated in abseil, and various third party
+code first need to be updated to work with new version of abseil, then the new version
+of such library need to be rolled into chromium.
+---
+diff --git a/third_party/abseil-cpp/absl/base/macros.h b/third_party/abseil-cpp/absl/base/macros.h
+index 392b7b8f7a526..7c9594bf26121 100644
+--- a/third_party/abseil-cpp/absl/base/macros.h
++++ b/third_party/abseil-cpp/absl/base/macros.h
+@@ -230,7 +230,10 @@ ABSL_NAMESPACE_END
+ // `ABSL_REFACTOR_INLINE` is preferred because it provides a more informative
+ // deprecation message to developers, especially those that do not have access
+ // to the automated refactoring capabilities of go/cpp-inliner.
+-#define ABSL_DEPRECATE_AND_INLINE() [[deprecated]] ABSL_REFACTOR_INLINE
++// In chromium this macro doesn't add [[deprecated]] attribute as chromium disallows to
++// use deprecated code. By removing this attribute other third party libraries get more
++// time to migrate from deprecated api to something newer.
++#define ABSL_DEPRECATE_AND_INLINE() ABSL_REFACTOR_INLINE
+ 
+ // Requires the compiler to prove that the size of the given object is at least
+ // the expected amount.
diff --git a/patches/0001-Turn-on-hardened-mode.patch b/patches/0000-Turn-on-hardened-mode.patch
similarity index 64%
rename from patches/0001-Turn-on-hardened-mode.patch
rename to patches/0000-Turn-on-hardened-mode.patch
index 55a422b..197d976 100644
--- a/patches/0001-Turn-on-hardened-mode.patch
+++ b/patches/0000-Turn-on-hardened-mode.patch
@@ -1,13 +1,5 @@
-From 15f51edf989cc47588c3d8635a62c255cdeb0072 Mon Sep 17 00:00:00 2001
-From: Daniel Cheng <dcheng@chromium.org>
-Date: Wed, 6 Oct 2021 03:23:23 -0700
-Subject: [PATCH] Turn on hardened mode
-
 Enable various hardening checks in absl which would otherwise be UB.
 ---
- third_party/abseil-cpp/absl/base/options.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
 diff --git a/third_party/abseil-cpp/absl/base/options.h b/third_party/abseil-cpp/absl/base/options.h
 index 71bafb39f2124..212891c5067f1 100644
 --- a/third_party/abseil-cpp/absl/base/options.h
@@ -20,5 +12,4 @@
 +#define ABSL_OPTION_HARDENED 1
 
  #endif  // ABSL_BASE_OPTIONS_H_
---
-2.49.0.rc0.332.g42c0ae87b1-goog
+
diff --git a/patches/0001-Undeprecate-deprecated.patch b/patches/0001-Undeprecate-deprecated.patch
new file mode 100644
index 0000000..1b93872
--- /dev/null
+++ b/patches/0001-Undeprecate-deprecated.patch
@@ -0,0 +1,66 @@
+Deprecated abseil api that is still used by some third party libraries.
+When possible, this patch should be reduced!
+This patch is currently relied on by grpc and protobuf libraries.
+---
+diff --git a/third_party/abseil-cpp/absl/synchronization/mutex.h b/third_party/abseil-cpp/absl/synchronization/mutex.h
+index ad156d443d6c5..13e8e3ff58775 100644
+--- a/third_party/abseil-cpp/absl/synchronization/mutex.h
++++ b/third_party/abseil-cpp/absl/synchronization/mutex.h
+@@ -630,7 +630,6 @@ class ABSL_SCOPED_LOCKABLE MutexLock {
+   // Calls `mu->lock()` and returns when that call returns. That is, `*mu` is
+   // guaranteed to be locked when this object is constructed. Requires that
+   // `mu` be dereferenceable.
+-  [[deprecated("Use the constructor that takes a reference instead")]]
+   ABSL_REFACTOR_INLINE
+   explicit MutexLock(Mutex* absl_nonnull mu) ABSL_EXCLUSIVE_LOCK_FUNCTION(mu)
+       : MutexLock(*mu) {}
+@@ -672,7 +672,6 @@ class ABSL_SCOPED_LOCKABLE ReaderMutexLock {
+     mu.lock_shared();
+   }
+ 
+-  [[deprecated("Use the constructor that takes a reference instead")]]
+   ABSL_REFACTOR_INLINE
+   explicit ReaderMutexLock(Mutex* absl_nonnull mu) ABSL_SHARED_LOCK_FUNCTION(mu)
+       : ReaderMutexLock(*mu) {}
+@@ -712,7 +711,6 @@ class ABSL_SCOPED_LOCKABLE WriterMutexLock {
+     mu.lock();
+   }
+ 
+-  [[deprecated("Use the constructor that takes a reference instead")]]
+   ABSL_REFACTOR_INLINE
+   explicit WriterMutexLock(Mutex* absl_nonnull mu)
+       ABSL_EXCLUSIVE_LOCK_FUNCTION(mu)
+@@ -1148,7 +1147,6 @@ class ABSL_SCOPED_LOCKABLE ReleasableMutexLock {
+     this->mu_->lock();
+   }
+ 
+-  [[deprecated("Use the constructor that takes a reference instead")]]
+   ABSL_REFACTOR_INLINE
+   explicit ReleasableMutexLock(Mutex* absl_nonnull mu)
+       ABSL_EXCLUSIVE_LOCK_FUNCTION(mu)
+diff --git a/third_party/abseil-cpp/absl/strings/escaping.h b/third_party/abseil-cpp/absl/strings/escaping.h
+index aaacc2899a28a..213a0ff23b96e 100644
+--- a/third_party/abseil-cpp/absl/strings/escaping.h
++++ b/third_party/abseil-cpp/absl/strings/escaping.h
+@@ -127,9 +127,7 @@ std::string Utf8SafeCHexEscape(absl::string_view src);
+ // characters. This function conforms with RFC 4648 section 4 (base64) and RFC
+ // 2045.
+ std::string Base64Escape(absl::string_view src);
+-[[deprecated(
+-    "Use the string-returning version of "
+-    "Base64Escape()")]] ABSL_REFACTOR_INLINE inline void
++ABSL_REFACTOR_INLINE inline void
+ Base64Escape(absl::string_view src, std::string* absl_nonnull dest) {
+   *dest = Base64Escape(src);
+ }
+@@ -138,9 +138,7 @@ Base64Escape(absl::string_view src, std::string* absl_nonnull dest) {
+ // outputs '-' instead of '+' and '_' instead of '/', and does not pad 'dest'.
+ // This function conforms with RFC 4648 section 5 (base64url).
+ std::string WebSafeBase64Escape(absl::string_view src);
+-[[deprecated(
+-    "Use the string-returning version of "
+-    "WebSafeBase64Escape()")]] ABSL_REFACTOR_INLINE inline void
++ABSL_REFACTOR_INLINE inline void
+ WebSafeBase64Escape(absl::string_view src, std::string* absl_nonnull dest) {
+   *dest = WebSafeBase64Escape(src);
+ }
diff --git a/patches/0005-mutex-deprecations.patch b/patches/0005-mutex-deprecations.patch
deleted file mode 100644
index 7811adc..0000000
--- a/patches/0005-mutex-deprecations.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-diff --git a/third_party/abseil-cpp/absl/synchronization/mutex.h b/third_party/abseil-cpp/absl/synchronization/mutex.h
-index 39ea0d0f23e27..41e9010f7e76d 100644
---- a/third_party/abseil-cpp/absl/synchronization/mutex.h
-+++ b/third_party/abseil-cpp/absl/synchronization/mutex.h
-@@ -178,7 +178,6 @@ class ABSL_LOCKABLE ABSL_ATTRIBUTE_WARN_UNUSED Mutex {
-   // then acquires it exclusively. (This lock is also known as a "write lock.")
-   void lock() ABSL_EXCLUSIVE_LOCK_FUNCTION();
- 
--  ABSL_DEPRECATE_AND_INLINE()
-   inline void Lock() ABSL_EXCLUSIVE_LOCK_FUNCTION() { lock(); }
- 
-   // Mutex::unlock()
-@@ -187,7 +186,6 @@ class ABSL_LOCKABLE ABSL_ATTRIBUTE_WARN_UNUSED Mutex {
-   // free state. Calling thread must hold the `Mutex` exclusively.
-   void unlock() ABSL_UNLOCK_FUNCTION();
- 
--  ABSL_DEPRECATE_AND_INLINE()
-   inline void Unlock() ABSL_UNLOCK_FUNCTION() { unlock(); }
- 
-   // Mutex::try_lock()
-@@ -197,7 +195,6 @@ class ABSL_LOCKABLE ABSL_ATTRIBUTE_WARN_UNUSED Mutex {
-   // probability if the `Mutex` was free.
-   [[nodiscard]] bool try_lock() ABSL_EXCLUSIVE_TRYLOCK_FUNCTION(true);
- 
--  ABSL_DEPRECATE_AND_INLINE()
-   [[nodiscard]] bool TryLock() ABSL_EXCLUSIVE_TRYLOCK_FUNCTION(true) {
-     return try_lock();
-   }
-@@ -252,7 +249,6 @@ class ABSL_LOCKABLE ABSL_ATTRIBUTE_WARN_UNUSED Mutex {
-   // lock on the mutex.
-   void lock_shared() ABSL_SHARED_LOCK_FUNCTION();
- 
--  ABSL_DEPRECATE_AND_INLINE()
-   void ReaderLock() ABSL_SHARED_LOCK_FUNCTION() { lock_shared(); }
- 
-   // Mutex::unlock_shared()
-@@ -262,7 +258,6 @@ class ABSL_LOCKABLE ABSL_ATTRIBUTE_WARN_UNUSED Mutex {
-   // Note that you cannot call `unlock_shared()` on a mutex held in write mode.
-   void unlock_shared() ABSL_UNLOCK_FUNCTION();
- 
--  ABSL_DEPRECATE_AND_INLINE()
-   void ReaderUnlock() ABSL_UNLOCK_FUNCTION() { unlock_shared(); }
- 
-   // Mutex::try_lock_shared()
-@@ -272,7 +267,6 @@ class ABSL_LOCKABLE ABSL_ATTRIBUTE_WARN_UNUSED Mutex {
-   // `true` with high probability if the `Mutex` was free or shared.
-   [[nodiscard]] bool try_lock_shared() ABSL_SHARED_TRYLOCK_FUNCTION(true);
- 
--  ABSL_DEPRECATE_AND_INLINE()
-   [[nodiscard]] bool ReaderTryLock() ABSL_SHARED_TRYLOCK_FUNCTION(true) {
-     return try_lock_shared();
-   }
-@@ -297,13 +291,10 @@ class ABSL_LOCKABLE ABSL_ATTRIBUTE_WARN_UNUSED Mutex {
-   // These methods may be used (along with the complementary `Reader*()`
-   // methods) to distinguish simple exclusive `Mutex` usage (`Lock()`,
-   // etc.) from reader/writer lock usage.
--  ABSL_DEPRECATE_AND_INLINE()
-   void WriterLock() ABSL_EXCLUSIVE_LOCK_FUNCTION() { lock(); }
- 
--  ABSL_DEPRECATE_AND_INLINE()
-   void WriterUnlock() ABSL_UNLOCK_FUNCTION() { unlock(); }
- 
--  ABSL_DEPRECATE_AND_INLINE()
-   [[nodiscard]] bool WriterTryLock() ABSL_EXCLUSIVE_TRYLOCK_FUNCTION(true) {
-     return try_lock();
-   }
-@@ -617,7 +608,6 @@ class ABSL_SCOPED_LOCKABLE MutexLock {
-   // Calls `mu->lock()` and returns when that call returns. That is, `*mu` is
-   // guaranteed to be locked when this object is constructed. Requires that
-   // `mu` be dereferenceable.
--  [[deprecated("Use the constructor that takes a reference instead")]]
-   ABSL_REFACTOR_INLINE
-   explicit MutexLock(Mutex* absl_nonnull mu) ABSL_EXCLUSIVE_LOCK_FUNCTION(mu)
-       : MutexLock(*mu) {}
-@@ -631,7 +621,6 @@ class ABSL_SCOPED_LOCKABLE MutexLock {
-     this->mu_.LockWhen(cond);
-   }
- 
--  [[deprecated("Use the constructor that takes a reference instead")]]
-   ABSL_REFACTOR_INLINE
-   explicit MutexLock(Mutex* absl_nonnull mu, const Condition& cond)
-       ABSL_EXCLUSIVE_LOCK_FUNCTION(mu)
-@@ -660,7 +649,6 @@ class ABSL_SCOPED_LOCKABLE ReaderMutexLock {
-     mu.lock_shared();
-   }
- 
--  [[deprecated("Use the constructor that takes a reference instead")]]
-   ABSL_REFACTOR_INLINE
-   explicit ReaderMutexLock(Mutex* absl_nonnull mu) ABSL_SHARED_LOCK_FUNCTION(mu)
-       : ReaderMutexLock(*mu) {}
-@@ -671,7 +659,6 @@ class ABSL_SCOPED_LOCKABLE ReaderMutexLock {
-     mu.ReaderLockWhen(cond);
-   }
- 
--  [[deprecated("Use the constructor that takes a reference instead")]]
-   ABSL_REFACTOR_INLINE
-   explicit ReaderMutexLock(Mutex* absl_nonnull mu, const Condition& cond)
-       ABSL_SHARED_LOCK_FUNCTION(mu)
-@@ -700,7 +687,6 @@ class ABSL_SCOPED_LOCKABLE WriterMutexLock {
-     mu.lock();
-   }
- 
--  [[deprecated("Use the constructor that takes a reference instead")]]
-   ABSL_REFACTOR_INLINE
-   explicit WriterMutexLock(Mutex* absl_nonnull mu)
-       ABSL_EXCLUSIVE_LOCK_FUNCTION(mu)
-@@ -713,7 +699,6 @@ class ABSL_SCOPED_LOCKABLE WriterMutexLock {
-     mu.WriterLockWhen(cond);
-   }
- 
--  [[deprecated("Use the constructor that takes a reference instead")]]
-   ABSL_REFACTOR_INLINE
-   explicit WriterMutexLock(Mutex* absl_nonnull mu, const Condition& cond)
-       ABSL_EXCLUSIVE_LOCK_FUNCTION(mu)
-@@ -1118,7 +1103,6 @@ class ABSL_SCOPED_LOCKABLE ReleasableMutexLock {
-     this->mu_->lock();
-   }
- 
--  [[deprecated("Use the constructor that takes a reference instead")]]
-   ABSL_REFACTOR_INLINE
-   explicit ReleasableMutexLock(Mutex* absl_nonnull mu)
-       ABSL_EXCLUSIVE_LOCK_FUNCTION(mu)
-@@ -1131,7 +1115,6 @@ class ABSL_SCOPED_LOCKABLE ReleasableMutexLock {
-     this->mu_->LockWhen(cond);
-   }
- 
--  [[deprecated("Use the constructor that takes a reference instead")]]
-   ABSL_REFACTOR_INLINE
-   explicit ReleasableMutexLock(Mutex* absl_nonnull mu, const Condition& cond)
-       ABSL_EXCLUSIVE_LOCK_FUNCTION(mu)
diff --git a/patches/0007-deprecated-base64-escape.patch b/patches/0007-deprecated-base64-escape.patch
deleted file mode 100644
index ef27ad7..0000000
--- a/patches/0007-deprecated-base64-escape.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/third_party/abseil-cpp/absl/strings/escaping.h b/third_party/abseil-cpp/absl/strings/escaping.h
-index aaacc2899a28a..9b2701406e1ca 100644
---- a/third_party/abseil-cpp/absl/strings/escaping.h
-+++ b/third_party/abseil-cpp/absl/strings/escaping.h
-@@ -127,9 +127,7 @@ std::string Utf8SafeCHexEscape(absl::string_view src);
- // characters. This function conforms with RFC 4648 section 4 (base64) and RFC
- // 2045.
- std::string Base64Escape(absl::string_view src);
--[[deprecated(
--    "Use the string-returning version of "
--    "Base64Escape()")]] ABSL_REFACTOR_INLINE inline void
-+ABSL_REFACTOR_INLINE inline void
- Base64Escape(absl::string_view src, std::string* absl_nonnull dest) {
-   *dest = Base64Escape(src);
- }
-@@ -140,9 +138,7 @@ Base64Escape(absl::string_view src, std::string* absl_nonnull dest) {
- // outputs '-' instead of '+' and '_' instead of '/', and does not pad 'dest'.
- // This function conforms with RFC 4648 section 5 (base64url).
- std::string WebSafeBase64Escape(absl::string_view src);
--[[deprecated(
--    "Use the string-returning version of "
--    "WebSafeBase64Escape()")]] ABSL_REFACTOR_INLINE inline void
-+ABSL_REFACTOR_INLINE inline void
- WebSafeBase64Escape(absl::string_view src, std::string* absl_nonnull dest) {
-   *dest = WebSafeBase64Escape(src);
- }
diff --git a/patches/0008-deprecated-meta-type-traits.patch b/patches/0008-deprecated-meta-type-traits.patch
deleted file mode 100644
index d29a12f..0000000
--- a/patches/0008-deprecated-meta-type-traits.patch
+++ /dev/null
@@ -1,175 +0,0 @@
-diff --git a/third_party/abseil-cpp/absl/meta/type_traits.h b/third_party/abseil-cpp/absl/meta/type_traits.h
-index 9013aead88898..66a8be988dd93 100644
---- a/third_party/abseil-cpp/absl/meta/type_traits.h
-+++ b/third_party/abseil-cpp/absl/meta/type_traits.h
-@@ -118,112 +118,112 @@ using void_t = typename type_traits_internal::VoidTImpl<Ts...>::type;
- // https://en.cppreference.com/w/cpp/header/type_traits
- 
- template <class T>
--using add_const_t ABSL_DEPRECATE_AND_INLINE() = std::add_const_t<T>;
-+using add_const_t ABSL_REFACTOR_INLINE = std::add_const_t<T>;
- 
- template <class T>
--using add_cv_t ABSL_DEPRECATE_AND_INLINE() = std::add_cv_t<T>;
-+using add_cv_t ABSL_REFACTOR_INLINE = std::add_cv_t<T>;
- 
- template <class T>
--using add_lvalue_reference_t ABSL_DEPRECATE_AND_INLINE() =
-+using add_lvalue_reference_t ABSL_REFACTOR_INLINE =
-     std::add_lvalue_reference_t<T>;
- 
- template <class T>
--using add_pointer_t ABSL_DEPRECATE_AND_INLINE() = std::add_pointer_t<T>;
-+using add_pointer_t ABSL_REFACTOR_INLINE = std::add_pointer_t<T>;
- 
- template <class T>
--using add_rvalue_reference_t ABSL_DEPRECATE_AND_INLINE() =
-+using add_rvalue_reference_t ABSL_REFACTOR_INLINE =
-     std::add_rvalue_reference_t<T>;
- 
- template <class T>
--using add_volatile_t ABSL_DEPRECATE_AND_INLINE() = std::add_volatile_t<T>;
-+using add_volatile_t ABSL_REFACTOR_INLINE = std::add_volatile_t<T>;
- 
- template <class... T>
--using common_type_t ABSL_DEPRECATE_AND_INLINE() = std::common_type_t<T...>;
-+using common_type_t ABSL_REFACTOR_INLINE = std::common_type_t<T...>;
- 
- template <bool C, class T, class F>
--using conditional_t ABSL_DEPRECATE_AND_INLINE() = std::conditional_t<C, T, F>;
-+using conditional_t ABSL_REFACTOR_INLINE = std::conditional_t<C, T, F>;
- 
- template <class... T>
--using conjunction ABSL_DEPRECATE_AND_INLINE() = std::conjunction<T...>;
-+using conjunction ABSL_REFACTOR_INLINE = std::conjunction<T...>;
- 
- template <class T>
--using decay_t ABSL_DEPRECATE_AND_INLINE() = std::decay_t<T>;
-+using decay_t ABSL_REFACTOR_INLINE = std::decay_t<T>;
- 
- template <bool C, class T = void>
--using enable_if_t ABSL_DEPRECATE_AND_INLINE() = std::enable_if_t<C, T>;
-+using enable_if_t ABSL_REFACTOR_INLINE = std::enable_if_t<C, T>;
- 
- template <class... T>
--using disjunction ABSL_DEPRECATE_AND_INLINE() = std::disjunction<T...>;
-+using disjunction ABSL_REFACTOR_INLINE = std::disjunction<T...>;
- 
- template <class T>
--using is_copy_assignable ABSL_DEPRECATE_AND_INLINE() =
-+using is_copy_assignable ABSL_REFACTOR_INLINE =
-     std::is_copy_assignable<T>;
- 
- template <class T>
--using is_function ABSL_DEPRECATE_AND_INLINE() = std::is_function<T>;
-+using is_function ABSL_REFACTOR_INLINE = std::is_function<T>;
- 
- template <class T>
--using is_move_assignable ABSL_DEPRECATE_AND_INLINE() =
-+using is_move_assignable ABSL_REFACTOR_INLINE =
-     std::is_move_assignable<T>;
- 
- template <class T>
--using is_trivially_copy_assignable ABSL_DEPRECATE_AND_INLINE() =
-+using is_trivially_copy_assignable ABSL_REFACTOR_INLINE =
-     std::is_trivially_copy_assignable<T>;
- 
- template <class T>
--using is_trivially_copy_constructible ABSL_DEPRECATE_AND_INLINE() =
-+using is_trivially_copy_constructible ABSL_REFACTOR_INLINE =
-     std::is_trivially_copy_constructible<T>;
- 
- template <class T>
--using is_trivially_default_constructible ABSL_DEPRECATE_AND_INLINE() =
-+using is_trivially_default_constructible ABSL_REFACTOR_INLINE =
-     std::is_trivially_default_constructible<T>;
- 
- template <class T>
--using is_trivially_destructible ABSL_DEPRECATE_AND_INLINE() =
-+using is_trivially_destructible ABSL_REFACTOR_INLINE =
-     std::is_trivially_destructible<T>;
- 
- template <class T>
--using is_trivially_move_assignable ABSL_DEPRECATE_AND_INLINE() =
-+using is_trivially_move_assignable ABSL_REFACTOR_INLINE =
-     std::is_trivially_move_assignable<T>;
- 
- template <class T>
--using is_trivially_move_constructible ABSL_DEPRECATE_AND_INLINE() =
-+using is_trivially_move_constructible ABSL_REFACTOR_INLINE =
-     std::is_trivially_move_constructible<T>;
- 
- template <class T>
--using make_signed_t ABSL_DEPRECATE_AND_INLINE() = std::make_signed_t<T>;
-+using make_signed_t ABSL_REFACTOR_INLINE = std::make_signed_t<T>;
- 
- template <class T>
--using make_unsigned_t ABSL_DEPRECATE_AND_INLINE() = std::make_unsigned_t<T>;
-+using make_unsigned_t ABSL_REFACTOR_INLINE = std::make_unsigned_t<T>;
- 
- template <class T>
--using negation ABSL_DEPRECATE_AND_INLINE() = std::negation<T>;
-+using negation ABSL_REFACTOR_INLINE = std::negation<T>;
- 
- template <class T>
--using remove_all_extents_t ABSL_DEPRECATE_AND_INLINE() =
-+using remove_all_extents_t ABSL_REFACTOR_INLINE =
-     std::remove_all_extents_t<T>;
- 
- template <class T>
--using remove_const_t ABSL_DEPRECATE_AND_INLINE() = std::remove_const_t<T>;
-+using remove_const_t ABSL_REFACTOR_INLINE = std::remove_const_t<T>;
- 
- template <class T>
--using remove_cv_t ABSL_DEPRECATE_AND_INLINE() = std::remove_cv_t<T>;
-+using remove_cv_t ABSL_REFACTOR_INLINE = std::remove_cv_t<T>;
- 
- template <class T>
--using remove_extent_t ABSL_DEPRECATE_AND_INLINE() = std::remove_extent_t<T>;
-+using remove_extent_t ABSL_REFACTOR_INLINE = std::remove_extent_t<T>;
- 
- template <class T>
--using remove_pointer_t ABSL_DEPRECATE_AND_INLINE() = std::remove_pointer_t<T>;
-+using remove_pointer_t ABSL_REFACTOR_INLINE = std::remove_pointer_t<T>;
- 
- template <class T>
--using remove_reference_t ABSL_DEPRECATE_AND_INLINE() =
-+using remove_reference_t ABSL_REFACTOR_INLINE =
-     std::remove_reference_t<T>;
- 
- template <class T>
--using remove_volatile_t ABSL_DEPRECATE_AND_INLINE() = std::remove_volatile_t<T>;
-+using remove_volatile_t ABSL_REFACTOR_INLINE = std::remove_volatile_t<T>;
- 
- template <class T>
--using underlying_type_t ABSL_DEPRECATE_AND_INLINE() = std::underlying_type_t<T>;
-+using underlying_type_t ABSL_REFACTOR_INLINE = std::underlying_type_t<T>;
- 
- #if defined(__cpp_lib_remove_cvref) && __cpp_lib_remove_cvref >= 201711L
- template <typename T>
-diff --git a/third_party/abseil-cpp/absl/utility/utility.h b/third_party/abseil-cpp/absl/utility/utility.h
-index 06e53785dbe23..60e9ffa3c20a9 100644
---- a/third_party/abseil-cpp/absl/utility/utility.h
-+++ b/third_party/abseil-cpp/absl/utility/utility.h
-@@ -49,10 +49,10 @@ using in_place_t ABSL_DEPRECATE_AND_INLINE() = std::in_place_t;
- using std::in_place_type;
- 
- template <class T>
--using in_place_type_t ABSL_DEPRECATE_AND_INLINE() = std::in_place_type_t<T>;
-+using in_place_type_t ABSL_REFACTOR_INLINE = std::in_place_type_t<T>;
- 
- template <size_t... I>
--using index_sequence ABSL_DEPRECATE_AND_INLINE() = std::index_sequence<I...>;
-+using index_sequence ABSL_REFACTOR_INLINE = std::index_sequence<I...>;
- 
- template <class T, T... I>
- using integer_sequence ABSL_DEPRECATE_AND_INLINE() =
-@@ -65,7 +65,7 @@ using index_sequence_for ABSL_DEPRECATE_AND_INLINE() =
- using std::make_from_tuple;
- 
- template <size_t N>
--using make_index_sequence ABSL_DEPRECATE_AND_INLINE() =
-+using make_index_sequence ABSL_REFACTOR_INLINE =
-     std::make_index_sequence<N>;
- 
- template <class T, T N>