Skip to content

Commit

Permalink
settings: update browsing data deletion string for passkeys
Browse files Browse the repository at this point in the history
The browsing data deletion dialog currently refers to credentials on
the local macOS platform authenticator as "other sign-in data". This
string predates the term passkeys.

But these credentials can now be managed on chrome://settings/passkeys, which calls them 'passkeys'. Hence, this change updates the browsing
data deletion dialog to match.

Screenshot: https://screenshot.googleplex.com/8u3UFexKit7D5ui.png

Bug: 1422751
Change-Id: Iabcff096e67b43e3c145f2543ed000c44779c986
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4344349
Commit-Queue: Martin Kreichgauer <martinkr@google.com>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Auto-Submit: Martin Kreichgauer <martinkr@google.com>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1118696}
  • Loading branch information
kreichgauer authored and Chromium LUCI CQ committed Mar 17, 2023
1 parent d91fc98 commit 7431efd
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 23 deletions.
13 changes: 10 additions & 3 deletions chrome/app/settings_strings.grdp
Original file line number Diff line number Diff line change
Expand Up @@ -1384,9 +1384,16 @@
<message name="IDS_SETTINGS_CLEAR_COOKIES" desc="Checkbox for deleting Cookies and other site data">
Cookies and other site data
</message>
<message name="IDS_SETTINGS_CLEAR_PASSWORDS" desc="Checkbox for deleting Passwords and other sign-in data">
Passwords and other sign-in data
</message>
<if expr="not is_macosx">
<message name="IDS_SETTINGS_CLEAR_PASSWORDS" desc="Checkbox for deleting Passwords and other sign-in data">
Passwords and other sign-in data
</message>
</if>
<if expr="is_macosx">
<message name="IDS_SETTINGS_CLEAR_PASSWORDS" desc="Checkbox for deleting Passwords and passkeys. Refer to Glossary for the translation of passkey.">
Passwords and passkeys
</message>
</if>
<message name="IDS_SETTINGS_CLEAR_FORM_DATA" desc="Checkbox for deleting form data saved for Autofill">
Autofill form data
</message>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e19fb51dbaf7f8647bb437a082e9fad8f907ae44
a7ec583a210b0b4a7d7c2bd8a212fbecc0497536
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ TEST_F(BrowsingDataCounterUtilsTest, HostedAppsCounterResult) {
}
#endif

// Tests the output for "Passwords and other sign-in data" on the advanced tab.
// Tests the output for "Passwords and passkeys" on the advanced tab.
TEST_F(BrowsingDataCounterUtilsTest, DeletePasswordsAndSigninData) {
// This test assumes that the strings are served exactly as defined,
// i.e. that the locale is set to the default "en".
Expand All @@ -157,6 +157,16 @@ TEST_F(BrowsingDataCounterUtilsTest, DeletePasswordsAndSigninData) {
std::vector<std::string> domain_examples;
std::vector<std::string> account_domain_examples;
};
// Sign-in data is referred to as passkeys on macOS only currently.
auto signin_data_str = [](size_t n) {
DCHECK(n > 0);
#if BUILDFLAG(IS_MAC)
return n == 1 ? "1 passkey" : base::StringPrintf("%zu passkeys", n);
#else
return n == 1 ? "sign-in data for 1 account"
: base::StringPrintf("sign-in data for %zu accounts", n);
#endif
};
const struct TestCase {
TestInput input;
std::string expected_output;
Expand All @@ -172,25 +182,24 @@ TEST_F(BrowsingDataCounterUtilsTest, DeletePasswordsAndSigninData) {
"2 passwords (for a.com, b.com, synced)"},
{{0, 2, 0, false, {}, {"x.com", "y.com"}},
"2 passwords in your account (for x.com, y.com)"},
{{0, 0, 1, false, {}, {}}, "sign-in data for 1 account"},
{{0, 0, 1, true, {}, {}}, "sign-in data for 1 account"},
{{0, 0, 2, false, {}, {}}, "sign-in data for 2 accounts"},
{{0, 0, 2, true, {}, {}}, "sign-in data for 2 accounts"},
{{0, 0, 1, false, {}, {}}, signin_data_str(1)},
{{0, 0, 1, true, {}, {}}, signin_data_str(1)},
{{0, 0, 2, false, {}, {}}, signin_data_str(2)},
{{0, 0, 2, true, {}, {}}, signin_data_str(2)},
{{1, 0, 2, false, {"a.de"}, {}},
"1 password (for a.de); sign-in data for 2 accounts"},
"1 password (for a.de); " + signin_data_str(2)},
{{2, 0, 1, false, {"a.de", "b.de"}, {}},
"2 passwords (for a.de, b.de); sign-in data for 1 account"},
"2 passwords (for a.de, b.de); " + signin_data_str(1)},
{{2, 0, 3, true, {"a.de", "b.de"}, {}},
"2 passwords (for a.de, b.de, synced); sign-in data for 3 "
"accounts"},
"2 passwords (for a.de, b.de, synced); " + signin_data_str(3)},
{{4, 0, 2, false, {"a.de", "b.de"}, {}},
"4 passwords (for a.de, b.de, and 2 more); sign-in data for 2 "
"accounts"},
"4 passwords (for a.de, b.de, and 2 more); " + signin_data_str(2)},
{{6, 0, 0, true, {"a.de", "b.de", "c.de", "d.de", "e.de", "f.de"}, {}},
"6 passwords (for a.de, b.de, and 4 more, synced)"},
{{2, 1, 1, false, {"a.de", "b.de"}, {"c.de"}},
"2 passwords (for a.de, b.de); 1 password in your account (for c.de); "
"sign-in data for 1 account"},
"2 passwords (for a.de, b.de); 1 password in your account (for "
"c.de); " +
signin_data_str(1)},
};
for (const auto& test_case : kTestCases) {
auto& input = test_case.input;
Expand Down
22 changes: 16 additions & 6 deletions components/browsing_data_strings.grdp
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,22 @@
=1 {and 1 more}
other {and # more}}
</message>
<message name="IDS_DEL_SIGNIN_DATA_COUNTER" desc="A counter showing how many sign-in data items the user has.">
{COUNT, plural,
=0 {None}
=1 {sign-in data for 1 account}
other {sign-in data for # accounts}}
</message>
<if expr="not is_macosx">
<message name="IDS_DEL_SIGNIN_DATA_COUNTER" desc="A counter showing how many sign-in data items the user has.">
{COUNT, plural,
=0 {None}
=1 {sign-in data for 1 account}
other {sign-in data for # accounts}}
</message>
</if>
<if expr="is_macosx">
<message name="IDS_DEL_SIGNIN_DATA_COUNTER" desc="A counter showing how many passkeys the user has. Refer to Glossary for the meaning of passkey. Do not translate as 'password'.">
{COUNT, plural,
=0 {None}
=1 {1 passkey}
other {# passkeys}}
</message>
</if>
<message name="IDS_DEL_PASSWORDS_AND_SIGNIN_DATA_COUNTER_NONE" desc="A counter showing that the user has no passwords or other sign-in data.">
None
</message>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a7ec583a210b0b4a7d7c2bd8a212fbecc0497536

0 comments on commit 7431efd

Please sign in to comment.