Commit a8cb40c1 authored by Ramin Halavati's avatar Ramin Halavati Committed by Commit Bot

Update accessible window title in guest mode.

Accessible window titles in guest mode had an (Incognito) addition.
This is changed in this CL to (Guest mode).

Bug: 947933
Change-Id: Ica441beb893140218a8448e94313c0d06fe38855
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1611933Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662522}
parent 3c77c50d
......@@ -5186,6 +5186,9 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_ACCESSIBLE_INCOGNITO_WINDOW_TITLE_FORMAT" desc="The format for the accessible title of an incognito window">
<ph name="WINDOW_TITLE">$1</ph> (Incognito)
</message>
<message name="IDS_ACCESSIBLE_GUEST_WINDOW_TITLE_FORMAT" desc="The format for the accessible title of a guest mode window">
<ph name="WINDOW_TITLE">$1</ph> (Guest)
</message>
<message name="IDS_ACCESSIBLE_WINDOW_TITLE_WITH_PROFILE_FORMAT" desc="The format for describing the accessible window title when the window is associated with a particular named profile.">
<ph name="WINDOW_TITLE">$1<ex>Wikipedia - Google Chrome</ex></ph> - <ph name="PROFILE_NAME">$2<ex>John Smith</ex></ph>
</message>
......
......@@ -1914,12 +1914,13 @@ base::string16 BrowserView::GetAccessibleWindowTitleForChannelAndProfile(
title = l10n_util::GetStringFUTF16(message_id, title);
}
// Finally annotate with the user - add Incognito if it's an incognito
// window, otherwise use the avatar name.
// Finally annotate with the user - add Incognito or guest if it's an
// incognito or guest window, otherwise use the avatar name.
ProfileManager* profile_manager = g_browser_process->profile_manager();
// TODO(https://crbug.com/947933): Comment and title text are about incognito
// mode but the |IsOffTheRecord| function covers both guest and incognito.
if (profile->IsOffTheRecord()) {
if (profile->IsGuestSession()) {
title = l10n_util::GetStringFUTF16(IDS_ACCESSIBLE_GUEST_WINDOW_TITLE_FORMAT,
title);
} else if (profile->IsIncognitoProfile()) {
title = l10n_util::GetStringFUTF16(
IDS_ACCESSIBLE_INCOGNITO_WINDOW_TITLE_FORMAT, title);
} else if (profile->IsRegularProfile() &&
......
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