Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(752)

Unified Diff: ui/webui/resources/cr_elements/policy/cr_policy_indicator_behavior.js

Issue 2708013003: [MD settings] show icon when content settings are controlled by an extension (Closed)
Patch Set: unit test fix Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/webui/resources/cr_elements/policy/cr_policy_indicator_behavior.js
diff --git a/ui/webui/resources/cr_elements/policy/cr_policy_indicator_behavior.js b/ui/webui/resources/cr_elements/policy/cr_policy_indicator_behavior.js
index 6ebec5ed8434193b90f62a488dba6471348bcbf2..2ad60591ab21aed589a6552e5c26fe0b701f61b3 100644
--- a/ui/webui/resources/cr_elements/policy/cr_policy_indicator_behavior.js
+++ b/ui/webui/resources/cr_elements/policy/cr_policy_indicator_behavior.js
@@ -12,6 +12,7 @@
* Strings required for policy indicators. These must be set at runtime.
* Chrome OS only strings may be undefined.
* @type {{
+ * controlledSettingExtension: string,
* controlledSettingPolicy: string,
* controlledSettingRecommendedMatches: string,
* controlledSettingRecommendedDiffers: string,
@@ -79,8 +80,7 @@ var CrPolicyIndicatorBehavior = {
* @private
*/
getIndicatorVisible_: function(type) {
- return type != CrPolicyIndicatorType.NONE &&
- type != CrPolicyIndicatorType.EXTENSION;
+ return type != CrPolicyIndicatorType.NONE;
},
/**
@@ -89,26 +89,22 @@ var CrPolicyIndicatorBehavior = {
* @private
*/
getIndicatorIcon_: function(type) {
- var icon = '';
switch (type) {
case CrPolicyIndicatorType.EXTENSION:
+ return 'cr:extension';
case CrPolicyIndicatorType.NONE:
- return icon;
+ return '';
case CrPolicyIndicatorType.PRIMARY_USER:
- icon = 'cr:group';
- break;
+ return 'cr:group';
case CrPolicyIndicatorType.OWNER:
- icon = 'cr:person';
- break;
+ return 'cr:person';
case CrPolicyIndicatorType.USER_POLICY:
case CrPolicyIndicatorType.DEVICE_POLICY:
case CrPolicyIndicatorType.RECOMMENDED:
- icon = 'cr20:domain';
- break;
+ return 'cr20:domain';
default:
assertNotReached();
}
- return icon;
},
/**
@@ -123,6 +119,8 @@ var CrPolicyIndicatorBehavior = {
if (!CrPolicyStrings)
return ''; // Tooltips may not be defined, e.g. in OOBE.
switch (type) {
+ case CrPolicyIndicatorType.EXTENSION:
+ return CrPolicyStrings.controlledSettingExtension;
case CrPolicyIndicatorType.PRIMARY_USER:
return CrPolicyStrings.controlledSettingShared.replace('$1', name);
case CrPolicyIndicatorType.OWNER:

Powered by Google App Engine
This is Rietveld 408576698