libchrome: Remove backward-compatibility-1100 patch of FindDictKey
This CL removes the backward compatibility patch for
base::Value::FindDictKey.
BUG=b:279686484
TEST=CQ
Change-Id: Ibdd52c959fcd987b7d9d54e9f09cbadd638d7293
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/libchrome/+/4528812
Commit-Queue: Cici Ruan <cuicuiruan@google.com>
Reviewed-by: Grace Cham <hscham@chromium.org>
Tested-by: Cici Ruan <cuicuiruan@google.com>
diff --git a/libchrome_tools/patches/backward-compatibility-1100-Revert-Eliminate-remaining-calls-to-FindDictKey.patch b/libchrome_tools/patches/backward-compatibility-1100-Revert-Eliminate-remaining-calls-to-FindDictKey.patch
deleted file mode 100644
index 5eb57cb..0000000
--- a/libchrome_tools/patches/backward-compatibility-1100-Revert-Eliminate-remaining-calls-to-FindDictKey.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From b535b7b120cd19f6f0a1b1601446281b51db6c36 Mon Sep 17 00:00:00 2001
-From: Ren-Pei Zeng <kamesan@chromium.org>
-Date: Wed, 26 Apr 2023 04:49:31 +0000
-Subject: [PATCH] Revert "Eliminate remaining calls to FindDictKey()"
-
-This reverts commit 826ec0d4b23411b6b1055ce8428693cab8ffbaac.
----
- base/values.cc | 12 ++++++++++++
- base/values.h | 3 +++
- 2 files changed, 15 insertions(+)
-
-diff --git a/base/values.cc b/base/values.cc
-index ac4cc65f3e..2e51b987d3 100644
---- a/base/values.cc
-+++ b/base/values.cc
-@@ -1169,6 +1169,18 @@ std::string* Value::FindStringKey(StringPiece key) {
- return GetDict().FindString(key);
- }
-
-+const Value* Value::FindDictKey(StringPiece key) const {
-+ const Value* result = GetDict().Find(key);
-+ if (!result || result->type() != Type::DICT) {
-+ return nullptr;
-+ }
-+ return result;
-+}
-+
-+Value* Value::FindDictKey(StringPiece key) {
-+ return const_cast<Value*>(std::as_const(*this).FindDictKey(key));
-+}
-+
- const Value* Value::FindListKey(StringPiece key) const {
- const Value* result = GetDict().Find(key);
- if (!result || result->type() != Type::LIST) {
-diff --git a/base/values.h b/base/values.h
-index d9e9e2df67..45dfea06a8 100644
---- a/base/values.h
-+++ b/base/values.h
-@@ -769,6 +769,9 @@ class BASE_EXPORT GSL_OWNER Value {
- // DEPRECATED: prefer `Value::Dict::FindString()`.
- const std::string* FindStringKey(StringPiece key) const;
- std::string* FindStringKey(StringPiece key);
-+ // DEPRECATED: prefer `Value::Dict::FindDict()`.
-+ const Value* FindDictKey(StringPiece key) const;
-+ Value* FindDictKey(StringPiece key);
- // DEPRECATED: prefer `Value::Dict::FindList()`.
- const Value* FindListKey(StringPiece key) const;
- Value* FindListKey(StringPiece key);
---
-2.40.1.495.gc816e09b53d-goog
-