Commit 389d9e63 authored by Mariam Ali's avatar Mariam Ali Committed by Commit Bot

Update close button strings and remove others section in guest

This CL updates close button strings in both incognito and guest menu
to align with the new menu design, as well as removing Other People
section in guest mode.

Design Deck: go/alignmenus

Screenshots:
https://screenshot.googleplex.com/6Vu7adRHK62CgxG.png

Bug: 1105763
Change-Id: Ib81fdcfe5816c08978c28b86ce22656b5e5f5d94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2391069
Commit-Queue: Mariam Ali <alimariam@google.com>
Reviewed-by: default avatarRamin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#804426}
parent bd7cfdea
......@@ -10597,6 +10597,14 @@ Please help our engineers fix this problem. Tell us what happened right before y
<message name="IDS_INCOGNITO_PROFILE_MENU_CLOSE_BUTTON" desc="The text of the button offering to close all incognito windows.">
Exit Incognito
</message>
<message name="IDS_INCOGNITO_PROFILE_MENU_CLOSE_BUTTON_NEW" desc="The text of the button offering to close all incognito windows.">
Close incognito
</message>
<!-- Guest Profile Menu bubble. -->
<message name="IDS_GUEST_PROFILE_MENU_CLOSE_BUTTON" desc="The text of the button offering to close all guest windows.">
Close guest
</message>
<!-- User happiness tracking survey UI -->
<if expr="not is_android">
......
7cf633fd6fae2b7fbe23d3c3cf892c15b4dcdd07
\ No newline at end of file
2baf2a11aadf5ce9d562f1417ee7d3ab2c404779
\ No newline at end of file
......@@ -18,8 +18,10 @@
#include "chrome/app/vector_icons/vector_icons.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/grit/generated_resources.h"
#include "components/vector_icons/vector_icons.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/models/image_model.h"
#include "ui/views/accessibility/view_accessibility.h"
......@@ -76,11 +78,16 @@ void IncognitoMenuView::BuildMenu() {
}
#endif
const bool new_menu_design =
base::FeatureList::IsEnabled(features::kNewProfilePicker);
AddFeatureButton(
l10n_util::GetStringUTF16(IDS_INCOGNITO_PROFILE_MENU_CLOSE_BUTTON),
l10n_util::GetStringUTF16(
new_menu_design ? IDS_INCOGNITO_PROFILE_MENU_CLOSE_BUTTON_NEW
: IDS_INCOGNITO_PROFILE_MENU_CLOSE_BUTTON),
base::BindRepeating(&IncognitoMenuView::OnExitButtonClicked,
base::Unretained(this)),
kCloseAllIcon);
new_menu_design ? vector_icons::kCloseIcon : kCloseAllIcon);
}
base::string16 IncognitoMenuView::GetAccessibleWindowTitle() const {
......
......@@ -171,11 +171,12 @@ ProfileMenuView::~ProfileMenuView() = default;
void ProfileMenuView::BuildMenu() {
Profile* profile = browser()->profile();
const bool is_guest = profile->IsGuestSession();
if (profile->IsRegularProfile()) {
BuildIdentity();
BuildSyncInfo();
BuildAutofillButtons();
} else if (profile->IsGuestSession()) {
} else if (is_guest) {
BuildGuestIdentity();
} else {
NOTREACHED();
......@@ -185,9 +186,12 @@ void ProfileMenuView::BuildMenu() {
// ChromeOS doesn't support multi-profile.
#if !defined(OS_CHROMEOS)
BuildProfileManagementHeading();
BuildSelectableProfiles();
BuildProfileManagementFeatureButtons();
if (!(is_guest &&
base::FeatureList::IsEnabled(features::kNewProfilePicker))) {
BuildProfileManagementHeading();
BuildSelectableProfiles();
BuildProfileManagementFeatureButtons();
}
#endif
}
......@@ -589,14 +593,22 @@ void ProfileMenuView::BuildFeatureButtons() {
#endif
}
int window_count = CountBrowsersFor(profile);
if (window_count > 1) {
if (base::FeatureList::IsEnabled(features::kNewProfilePicker) && is_guest) {
AddFeatureButton(
l10n_util::GetPluralStringFUTF16(IDS_PROFILES_CLOSE_X_WINDOWS_BUTTON,
window_count),
l10n_util::GetStringUTF16(IDS_GUEST_PROFILE_MENU_CLOSE_BUTTON),
base::BindRepeating(&ProfileMenuView::OnExitProfileButtonClicked,
base::Unretained(this)),
vector_icons::kCloseIcon);
} else {
int window_count = CountBrowsersFor(profile);
if (window_count > 1) {
AddFeatureButton(
l10n_util::GetPluralStringFUTF16(IDS_PROFILES_CLOSE_X_WINDOWS_BUTTON,
window_count),
base::BindRepeating(&ProfileMenuView::OnExitProfileButtonClicked,
base::Unretained(this)),
vector_icons::kCloseIcon);
}
}
#if !defined(OS_CHROMEOS)
......
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