Commit d9c9e660 authored by Esmael El-Moslimany's avatar Esmael El-Moslimany Committed by Commit Bot

Site Settings WebUI: hide policy pref indicator when not enforced

Bug: 877896
Change-Id: I008e41233bf9378370b592425e5a928a0b97301f
Reviewed-on: https://chromium-review.googlesource.com/1195745Reviewed-by: default avatarScott Chen <scottchen@chromium.org>
Commit-Queue: Esmael El-Moslimany <aee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587651}
parent a37b0bc2
......@@ -54,7 +54,7 @@
<div class="separator"></div>
</template>
</div>
<template is="dom-if" if="[[model.controlledBy]]">
<template is="dom-if" if="[[showPolicyPrefIndicator_]]">
<cr-policy-pref-indicator pref="[[model]]"
icon-aria-label="[[label]]" on-mouseenter="onShowTooltip_"
on-focus="onShowTooltip_" focus-row-control focus-type="policy">
......
......@@ -44,6 +44,12 @@ Polymer({
type: String,
computed: 'computeSiteDescription_(model)',
},
/** @private */
showPolicyPrefIndicator_: {
type: Boolean,
computed: 'computeShowPolicyPrefIndicator_(model)',
},
},
/** @private */
......@@ -113,6 +119,16 @@ Polymer({
return displayName;
},
/**
* @return {boolean}
* @private
*/
computeShowPolicyPrefIndicator_: function() {
return this.model.enforcement ==
chrome.settingsPrivate.Enforcement.ENFORCED &&
!!this.model.controlledBy;
},
/** @private */
onResetButtonTap_: function() {
this.browserProxy.resetCategoryPermissionForPattern(
......
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