summaryrefslogtreecommitdiffstats
path: root/recipes-wam/cef/files/chromium/0014-meta-browser-Avoid-std-ranges-find_if.patch
diff options
context:
space:
mode:
authorRoger Zanoni <rzanoni@igalia.com>2023-10-22 01:07:31 +0000
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2023-11-16 16:51:05 +0000
commit4a1b172ebda54d587db7ecfc61af5443d0c11d0d (patch)
treee5e39bfbda54a45d33bdd829cf7a3370ede2a88c /recipes-wam/cef/files/chromium/0014-meta-browser-Avoid-std-ranges-find_if.patch
parentbcbfd0131bce06c11197d2eee84300897c1680a9 (diff)
[cef][wam] Make the recipe work with official chromium release tarballs
This change drops the chromium mirror repository that was being used for milestone 108 in favor of using the official release tarballs from https://commondatastorage.googleapis.com/chromium-browser-official in an effort to make it easier to upgrade the current chromium milestones (also to improve download and build times). Also, the current milestone is being upgraded from 108 to 118. Bug-AGL: SPEC-3872 Signed-off-by: Roger Zanoni <rzanoni@igalia.com> Change-Id: Iba4a94ef762d278864114c02bb9e36a308ff5a7a Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl-demo/+/29417 Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> ci-image-build: Jenkins Job builder account Tested-by: Jenkins Job builder account ci-image-boot-test: Jenkins Job builder account
Diffstat (limited to 'recipes-wam/cef/files/chromium/0014-meta-browser-Avoid-std-ranges-find_if.patch')
-rw-r--r--recipes-wam/cef/files/chromium/0014-meta-browser-Avoid-std-ranges-find_if.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/recipes-wam/cef/files/chromium/0014-meta-browser-Avoid-std-ranges-find_if.patch b/recipes-wam/cef/files/chromium/0014-meta-browser-Avoid-std-ranges-find_if.patch
new file mode 100644
index 00000000..2bd12fae
--- /dev/null
+++ b/recipes-wam/cef/files/chromium/0014-meta-browser-Avoid-std-ranges-find_if.patch
@@ -0,0 +1,70 @@
+From a577e7a76e6002e50b5ab27514b7f49d4070499c Mon Sep 17 00:00:00 2001
+From: Max Ihlenfeldt <max@igalia.com>
+Date: Wed, 30 Aug 2023 16:06:19 +0000
+Subject: [PATCH 14/33] [meta-browser] Avoid std::ranges::find_if()
+
+std::ranges::find_if() was introduced in C++20, and older versions of
+clang don't support it. We can instead use Chromium's `base::ranges`
+library, which is supported.
+
+Upstream-Status: Inappropriate [specific to older versions of clang]
+Signed-off-by: Max Ihlenfeldt <max@igalia.com>
+---
+ .../password_manager/core/browser/ui/passwords_grouper.cc | 3 ++-
+ components/webauthn/core/browser/passkey_sync_bridge.cc | 5 +++--
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/components/password_manager/core/browser/ui/passwords_grouper.cc b/components/password_manager/core/browser/ui/passwords_grouper.cc
+index 1b016e0eb9561..d259c6accf246 100644
+--- a/components/password_manager/core/browser/ui/passwords_grouper.cc
++++ b/components/password_manager/core/browser/ui/passwords_grouper.cc
+@@ -8,6 +8,7 @@
+ #include "base/containers/flat_set.h"
+ #include "base/strings/escape.h"
+ #include "base/strings/string_util.h"
++#include "base/ranges/algorithm.h"
+ #include "components/password_manager/core/browser/affiliation/affiliation_service.h"
+ #include "components/password_manager/core/browser/affiliation/affiliation_utils.h"
+ #include "components/password_manager/core/browser/passkey_credential.h"
+@@ -277,7 +278,7 @@ absl::optional<PasskeyCredential> PasswordsGrouper::GetPasskeyFor(
+ const std::vector<PasskeyCredential>& passkeys =
+ map_group_id_to_credentials_[group_id_iterator->second].passkeys;
+ const auto passkey_it =
+- std::ranges::find_if(passkeys, [&credential](const auto& passkey) {
++ base::ranges::find_if(passkeys, [&credential](const auto& passkey) {
+ return credential.passkey_credential_id == passkey.credential_id();
+ });
+ if (passkey_it == passkeys.end()) {
+diff --git a/components/webauthn/core/browser/passkey_sync_bridge.cc b/components/webauthn/core/browser/passkey_sync_bridge.cc
+index 93129fed756aa..794c696fcff04 100644
+--- a/components/webauthn/core/browser/passkey_sync_bridge.cc
++++ b/components/webauthn/core/browser/passkey_sync_bridge.cc
+@@ -16,6 +16,7 @@
+ #include "base/containers/span.h"
+ #include "base/feature_list.h"
+ #include "base/functional/callback_helpers.h"
++#include "base/ranges/algorithm.h"
+ #include "base/strings/string_number_conversions.h"
+ #include "base/trace_event/trace_event.h"
+ #include "components/sync/base/features.h"
+@@ -258,7 +259,7 @@ PasskeySyncBridge::GetPasskeysForRelyingPartyId(
+ bool PasskeySyncBridge::DeletePasskey(const std::string& credential_id) {
+ // Find the credential with the given |credential_id|.
+ const auto passkey_it =
+- std::ranges::find_if(data_, [&credential_id](const auto& passkey) {
++ base::ranges::find_if(data_, [&credential_id](const auto& passkey) {
+ return passkey.second.credential_id() == credential_id;
+ });
+ if (passkey_it == data_.end()) {
+@@ -309,7 +310,7 @@ bool PasskeySyncBridge::UpdatePasskey(const std::string& credential_id,
+ PasskeyChange change) {
+ // Find the credential with the given |credential_id|.
+ const auto passkey_it =
+- std::ranges::find_if(data_, [&credential_id](const auto& passkey) {
++ base::ranges::find_if(data_, [&credential_id](const auto& passkey) {
+ return passkey.second.credential_id() == credential_id;
+ });
+ if (passkey_it == data_.end()) {
+--
+2.42.1
+