Commit b57bda33 authored by Thomas Tangl's avatar Thomas Tangl Committed by Commit Bot

[profile-menu] Update strings and icons of profile buttons

- Profile heading "Manage people" -> "People"
- Button "Open Guest window" -> "Guest"
- Button "Add Person" -> "Add"
- Guest icon of "Guest" button is updated
- Button "Close all your windows" is removed

Bug: 995720
Change-Id: I86dd1dcd14afec5b4e6d7ad911449ca9053d2910
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1827281Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Commit-Queue: Thomas Tangl <tangltom@chromium.org>
Auto-Submit: Thomas Tangl <tangltom@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700274}
parent 77f24899
......@@ -48,6 +48,7 @@
#include "components/signin/public/base/signin_pref_names.h"
#include "components/signin/public/identity_manager/accounts_mutator.h"
#include "components/signin/public/identity_manager/primary_account_mutator.h"
#include "components/strings/grit/components_strings.h"
#include "components/sync/driver/sync_service_utils.h"
#include "components/vector_icons/vector_icons.h"
#include "net/base/url_util.h"
......@@ -560,9 +561,7 @@ void ProfileMenuView::BuildAccountFeatureButtons() {
}
void ProfileMenuView::BuildProfileHeading() {
// TODO(crbug.com/995720): Update this string after approval from UX.
SetProfileHeading(
l10n_util::GetStringUTF16(IDS_PROFILES_MANAGE_USERS_BUTTON));
SetProfileHeading(l10n_util::GetStringUTF16(IDS_PROFILES_OPTIONS_GROUP_NAME));
}
void ProfileMenuView::BuildSelectableProfiles() {
......@@ -588,24 +587,17 @@ void ProfileMenuView::BuildProfileFeatureButtons() {
base::BindRepeating(&ProfileMenuView::OnManageProfilesButtonClicked,
base::Unretained(this)));
constexpr float kIconToImageRatio = 0.75;
AddProfileFeatureButton(
ImageForMenu(kUserMenuGuestIcon, kIconToImageRatio),
l10n_util::GetStringUTF16(IDS_PROFILES_OPEN_GUEST_PROFILE_BUTTON),
ColoredImageForMenu(kUserAccountAvatarIcon, gfx::kGoogleGrey500),
l10n_util::GetStringUTF16(IDS_GUEST_PROFILE_NAME),
base::BindRepeating(&ProfileMenuView::OnGuestProfileButtonClicked,
base::Unretained(this)));
AddProfileFeatureButton(
ImageForMenu(kAddIcon, kIconToImageRatio),
l10n_util::GetStringUTF16(IDS_ADD_USER_BUTTON),
ImageForMenu(kAddIcon, /*icon_to_image_ratio=*/0.75),
l10n_util::GetStringUTF16(IDS_ADD),
base::BindRepeating(&ProfileMenuView::OnAddNewProfileButtonClicked,
base::Unretained(this)));
AddProfileFeatureButton(
ImageForMenu(kCloseAllIcon, kIconToImageRatio),
l10n_util::GetStringUTF16(IDS_PROFILES_CLOSE_ALL_WINDOWS_BUTTON),
base::BindRepeating(&ProfileMenuView::OnExitProfileButtonClicked,
base::Unretained(this)));
}
void ProfileMenuView::AddProfileMenuView(AvatarMenu* avatar_menu) {
......
......@@ -673,7 +673,7 @@ class ProfileMenuClickTest_MultipleProfiles : public ProfileMenuClickTest {
public:
// List of actionable items in the correct order as they appear in the menu.
// If a new button is added to the menu, it should also be added to this list.
static constexpr ProfileMenuView::ActionableItem kOrderedActionableItems[11] =
static constexpr ProfileMenuView::ActionableItem kOrderedActionableItems[10] =
{ProfileMenuView::ActionableItem::kPasswordsButton,
ProfileMenuView::ActionableItem::kCreditCardsButton,
ProfileMenuView::ActionableItem::kAddressesButton,
......@@ -683,7 +683,6 @@ class ProfileMenuClickTest_MultipleProfiles : public ProfileMenuClickTest {
ProfileMenuView::ActionableItem::kOtherProfileButton,
ProfileMenuView::ActionableItem::kGuestProfileButton,
ProfileMenuView::ActionableItem::kAddNewProfileButton,
ProfileMenuView::ActionableItem::kExitProfileButton,
// The first button is added again to finish the cycle and test that
// there are no other buttons at the end.
ProfileMenuView::ActionableItem::kPasswordsButton};
......@@ -721,7 +720,7 @@ class ProfileMenuClickTest_WithPrimaryAccount : public ProfileMenuClickTest {
public:
// List of actionable items in the correct order as they appear in the menu.
// If a new button is added to the menu, it should also be added to this list.
static constexpr ProfileMenuView::ActionableItem kOrderedActionableItems[9] =
static constexpr ProfileMenuView::ActionableItem kOrderedActionableItems[8] =
{ProfileMenuView::ActionableItem::kPasswordsButton,
ProfileMenuView::ActionableItem::kCreditCardsButton,
ProfileMenuView::ActionableItem::kAddressesButton,
......@@ -729,7 +728,6 @@ class ProfileMenuClickTest_WithPrimaryAccount : public ProfileMenuClickTest {
ProfileMenuView::ActionableItem::kManageProfilesButton,
ProfileMenuView::ActionableItem::kGuestProfileButton,
ProfileMenuView::ActionableItem::kAddNewProfileButton,
ProfileMenuView::ActionableItem::kExitProfileButton,
// The first button is added again to finish the cycle and test that
// there are no other buttons at the end.
ProfileMenuView::ActionableItem::kPasswordsButton};
......@@ -771,7 +769,7 @@ class ProfileMenuClickTest_WithUnconsentedPrimaryAccount
public:
// List of actionable items in the correct order as they appear in the menu.
// If a new button is added to the menu, it should also be added to this list.
static constexpr ProfileMenuView::ActionableItem kOrderedActionableItems[11] =
static constexpr ProfileMenuView::ActionableItem kOrderedActionableItems[10] =
{ProfileMenuView::ActionableItem::kPasswordsButton,
ProfileMenuView::ActionableItem::kCreditCardsButton,
ProfileMenuView::ActionableItem::kAddressesButton,
......@@ -781,7 +779,6 @@ class ProfileMenuClickTest_WithUnconsentedPrimaryAccount
ProfileMenuView::ActionableItem::kManageProfilesButton,
ProfileMenuView::ActionableItem::kGuestProfileButton,
ProfileMenuView::ActionableItem::kAddNewProfileButton,
ProfileMenuView::ActionableItem::kExitProfileButton,
// The first button is added again to finish the cycle and test that
// there are no other buttons at the end.
ProfileMenuView::ActionableItem::kPasswordsButton};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment