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

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: ignore-extensions 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 fb6eb7cb3f490586d4bfa5a073f2c24f680b62e1..2de772b3fb3d7f2daa46feb82c11beea0de0b410 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
@@ -10,6 +10,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,
@@ -38,8 +39,7 @@ var CrPolicyIndicatorBehavior = {
* @private
*/
isIndicatorVisible: function(type) {
- return type != CrPolicyIndicatorType.NONE &&
- type != CrPolicyIndicatorType.EXTENSION;
dschuyler 2017/02/28 00:15:18 This is now accounted for in cr_policy_pref_behavi
+ return type != CrPolicyIndicatorType.NONE;
},
/**
@@ -48,26 +48,22 @@ var CrPolicyIndicatorBehavior = {
* @private
*/
getPolicyIndicatorIcon: function(type) {
- var icon = '';
switch (type) {
- case CrPolicyIndicatorType.EXTENSION:
case CrPolicyIndicatorType.NONE:
- return icon;
+ return '';
+ case CrPolicyIndicatorType.EXTENSION:
+ return 'cr:extension';
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;
},
/**
@@ -82,6 +78,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