Commit 3eee2dc3 authored by Wenzhao Zang's avatar Wenzhao Zang Committed by Commit Bot

cros: Update controlled-setting indicator text for Demo Mode

There are three places that use |IDS_CONTROLLED_SETTING_POLICY|, but
AFAIK there's no need to change the other two places
(arc_support_host.cc and extensions_ui.cc).

Bug: 873946
Change-Id: I34e9fb0a20139b0aaca6380e949248745f50ed58
Reviewed-on: https://chromium-review.googlesource.com/1180526Reviewed-by: default avatarMichael Giuffrida <michaelpg@chromium.org>
Commit-Queue: Wenzhao (Colin) Zang <wzang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584361}
parent a999290e
...@@ -2770,6 +2770,9 @@ ...@@ -2770,6 +2770,9 @@
<message name="IDS_CONTROLLED_SETTING_SHARED" desc="Text displayed in the controlled settings bubble when a setting's value belongs to the primary user but can be edited."> <message name="IDS_CONTROLLED_SETTING_SHARED" desc="Text displayed in the controlled settings bubble when a setting's value belongs to the primary user but can be edited.">
This setting belongs to <ph name="OWNER_EMAIL">$1<ex>john@google.com</ex></ph>. This setting belongs to <ph name="OWNER_EMAIL">$1<ex>john@google.com</ex></ph>.
</message> </message>
<message name="IDS_CONTROLLED_SETTING_DEMO_SESSION" desc="Text displayed in the controlled settings bubble when a setting's value is enforced by demo session.">
This setting can't be changed in a demo session.
</message>
<message name="IDS_STATUSBAR_DISABLE_SPOKEN_FEEDBACK" desc="The menu option to disable spoken feedback accessibility feature."> <message name="IDS_STATUSBAR_DISABLE_SPOKEN_FEEDBACK" desc="The menu option to disable spoken feedback accessibility feature.">
Disable ChromeVox (spoken feedback) Disable ChromeVox (spoken feedback)
......
...@@ -8,6 +8,10 @@ ...@@ -8,6 +8,10 @@
#include "chrome/grit/generated_resources.h" #include "chrome/grit/generated_resources.h"
#include "content/public/browser/web_ui_data_source.h" #include "content/public/browser/web_ui_data_source.h"
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/login/demo_mode/demo_session.h"
#endif
namespace policy_indicator { namespace policy_indicator {
struct LocalizedString { struct LocalizedString {
...@@ -16,8 +20,13 @@ struct LocalizedString { ...@@ -16,8 +20,13 @@ struct LocalizedString {
}; };
void AddLocalizedStrings(content::WebUIDataSource* html_source) { void AddLocalizedStrings(content::WebUIDataSource* html_source) {
int controlled_setting_policy_id = IDS_CONTROLLED_SETTING_POLICY;
#if defined(OS_CHROMEOS)
if (chromeos::DemoSession::IsDeviceInDemoMode())
controlled_setting_policy_id = IDS_CONTROLLED_SETTING_DEMO_SESSION;
#endif
LocalizedString localized_strings[] = { LocalizedString localized_strings[] = {
{"controlledSettingPolicy", IDS_CONTROLLED_SETTING_POLICY}, {"controlledSettingPolicy", controlled_setting_policy_id},
{"controlledSettingRecommendedMatches", IDS_CONTROLLED_SETTING_RECOMMENDED}, {"controlledSettingRecommendedMatches", IDS_CONTROLLED_SETTING_RECOMMENDED},
{"controlledSettingRecommendedDiffers", {"controlledSettingRecommendedDiffers",
IDS_CONTROLLED_SETTING_HAS_RECOMMENDATION}, IDS_CONTROLLED_SETTING_HAS_RECOMMENDATION},
......
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