chromium/chromium-110-CredentialUIEn...

42 lines
1.9 KiB
Diff

From b4e56d22275cae5a910463a966a96345430a83ea Mon Sep 17 00:00:00 2001
From: Ivan Murashov <ivan.murashov@lge.com>
Date: Sat, 17 Dec 2022 12:06:01 +0000
Subject: [PATCH] libstdc++: Don't use const members in std::vector in password_manager::CredentialUIEntry
Otherwise build fails when building with use_custom_libcxx=false.
The error example:
std::vector must have a non-const, non-volatile value_type
Implementation of std::vector in libstdc++ does not allow const.
Bug: 957519
Change-Id: I089de2d52df25138d74dbf01fdf61d6301b4d871
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4111037
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1084697}
---
diff --git a/components/password_manager/core/browser/ui/credential_ui_entry.cc b/components/password_manager/core/browser/ui/credential_ui_entry.cc
index 1e0766a..a9a34f7 100644
--- a/components/password_manager/core/browser/ui/credential_ui_entry.cc
+++ b/components/password_manager/core/browser/ui/credential_ui_entry.cc
@@ -97,7 +97,7 @@
// For cases when the notes differ within grouped passwords (e.g: a
// credential exists in both account and profile stores), respective notes
// should be concatenated and linebreak used as a delimiter.
- std::vector<const std::u16string> notes_with_duplicates;
+ std::vector<std::u16string> notes_with_duplicates;
for (const auto& form : forms) {
// Only notes with an empty `unique_display_name` are supported in the
// settings UI.
@@ -109,7 +109,7 @@
}
auto unique_notes =
base::MakeFlatSet<std::u16string>(std::move(notes_with_duplicates));
- note = base::JoinString(std::vector<const std::u16string>(
+ note = base::JoinString(std::vector<std::u16string>(
unique_notes.begin(), unique_notes.end()),
u"\n");