Commit 659c4c97 authored by Toby Huang's avatar Toby Huang Committed by Commit Bot

Change domain icon to kite when dev mode is disabled for child users

If logged in with a child account, the chrome://extensions page shows
developer mode is disabled with an office building icon (used for
enterprise users) and the tooltip "This setting is enforced by your
administrator." The icon and tooltip should be Unicorn-specific. This
CL changes the icon to show the kite icon and tooltip "This setting
can't be changed by a child user."

Bug: 928543
Change-Id: Ic518d78c1304a957ba0cd007372232cbbb31a15e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1842494
Commit-Queue: Toby Huang <tobyhuang@chromium.org>
Reviewed-by: default avatarMichael Giuffrida <michaelpg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704360}
parent 4cefb851
...@@ -1610,9 +1610,6 @@ ...@@ -1610,9 +1610,6 @@
<message name="IDS_CONTROLLED_SETTING_PARENT" desc="Text displayed in the controlled settings bubble when a setting's value is controlled by user's parent."> <message name="IDS_CONTROLLED_SETTING_PARENT" desc="Text displayed in the controlled settings bubble when a setting's value is controlled by user's parent.">
This setting is managed by a parent. This setting is managed by a parent.
</message> </message>
<message name="IDS_CONTROLLED_SETTING_CHILD_RESTRICTION" desc="Text displayed in the controlled settings bubble when a setting's value is pre-set because the user is a child.">
This setting can't be changed by a child user.
</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)
</message> </message>
......
...@@ -6459,7 +6459,9 @@ the Bookmarks menu."> ...@@ -6459,7 +6459,9 @@ the Bookmarks menu.">
<message name="IDS_CONTROLLED_SETTING_HAS_RECOMMENDATION" desc="Text displayed in the controlled settings bubble when a value is recommended for a setting through policy but is currently overridden by a user-supplied value."> <message name="IDS_CONTROLLED_SETTING_HAS_RECOMMENDATION" desc="Text displayed in the controlled settings bubble when a value is recommended for a setting through policy but is currently overridden by a user-supplied value.">
Your administrator recommends a specific value for this setting. Your administrator recommends a specific value for this setting.
</message> </message>
<message name="IDS_CONTROLLED_SETTING_CHILD_RESTRICTION" desc="Text displayed in the controlled settings bubble when a setting's value is pre-set because the user is a child.">
This setting can't be changed by a child user.
</message>
<!-- Extension install location strings --> <!-- Extension install location strings -->
<message name="IDS_EXTENSIONS_INSTALL_LOCATION_UNKNOWN" desc="The text explaining the the installation location is unknown."> <message name="IDS_EXTENSIONS_INSTALL_LOCATION_UNKNOWN" desc="The text explaining the the installation location is unknown.">
Not from Chrome Web Store. Not from Chrome Web Store.
......
...@@ -97,10 +97,11 @@ ...@@ -97,10 +97,11 @@
narrow-threshold="1000"> narrow-threshold="1000">
<div class="more-actions"> <div class="more-actions">
<span id="devModeLabel">$i18n{toolbarDevMode}</span> <span id="devModeLabel">$i18n{toolbarDevMode}</span>
<cr-tooltip-icon hidden$="[[!devModeControlledByPolicy]]" <cr-tooltip-icon hidden="[[!shouldDisableDevMode_(
tooltip-text="$i18n{controlledSettingPolicy}" devModeControlledByPolicy, isSupervised)]]"
icon-class="cr20:domain" tooltip-text="[[getTooltipText_(isSupervised)]]"
icon-aria-label="$i18n{controlledSettingPolicy}"> icon-class="[[getIcon_(isSupervised)]]"
icon-aria-label="[[getTooltipText_(isSupervised)]]">
</cr-tooltip-icon> </cr-tooltip-icon>
<cr-toggle id="devMode" on-change="onDevModeToggleChange_" <cr-toggle id="devMode" on-change="onDevModeToggleChange_"
disabled="[[shouldDisableDevMode_( disabled="[[shouldDisableDevMode_(
......
...@@ -75,6 +75,24 @@ cr.define('extensions', function() { ...@@ -75,6 +75,24 @@ cr.define('extensions', function() {
return this.devModeControlledByPolicy || this.isSupervised; return this.devModeControlledByPolicy || this.isSupervised;
}, },
/**
* @return {string}
* @private
*/
getTooltipText_: function() {
return this.i18n(
this.isSupervised ? 'controlledSettingChildRestriction' :
'controlledSettingPolicy');
},
/**
* @return {string}
* @private
*/
getIcon_: function() {
return this.isSupervised ? 'cr20:kite' : 'cr20:domain';
},
/** /**
* @param {!CustomEvent<boolean>} e * @param {!CustomEvent<boolean>} e
* @private * @private
......
...@@ -69,6 +69,8 @@ content::WebUIDataSource* CreateMdExtensionsSource(Profile* profile, ...@@ -69,6 +69,8 @@ content::WebUIDataSource* CreateMdExtensionsSource(Profile* profile,
{"close", IDS_CLOSE}, {"close", IDS_CLOSE},
{"clear", IDS_CLEAR}, {"clear", IDS_CLEAR},
{"confirm", IDS_CONFIRM}, {"confirm", IDS_CONFIRM},
{"controlledSettingChildRestriction",
IDS_CONTROLLED_SETTING_CHILD_RESTRICTION},
{"controlledSettingPolicy", IDS_CONTROLLED_SETTING_POLICY}, {"controlledSettingPolicy", IDS_CONTROLLED_SETTING_POLICY},
{"done", IDS_DONE}, {"done", IDS_DONE},
{"learnMore", IDS_LEARN_MORE}, {"learnMore", IDS_LEARN_MORE},
......
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