Chromium Code Reviews| Index: chrome/browser/resources/settings/internet_page/network_property_list.js |
| diff --git a/chrome/browser/resources/settings/internet_page/network_property_list.js b/chrome/browser/resources/settings/internet_page/network_property_list.js |
| index ff8cd9fa37cfb690ab1701e38b128f3e3502149f..1660f0fb84a824878562e8d8d969fc9d0ac9602c 100644 |
| --- a/chrome/browser/resources/settings/internet_page/network_property_list.js |
| +++ b/chrome/browser/resources/settings/internet_page/network_property_list.js |
| @@ -14,6 +14,8 @@ |
| Polymer({ |
| is: 'network-property-list', |
| + behaviors: [CrPolicyNetworkBehavior], |
| + |
| properties: { |
| /** |
| * The dictionary containing the properties to display. |
| @@ -116,8 +118,11 @@ Polymer({ |
| showNoEdit_: function(propertyDict, editFieldTypes, key) { |
| if (!this.hasPropertyValue_(propertyDict, key)) |
| return false; |
| - var editType = editFieldTypes[key]; |
| - return !editType; |
| + var property = /** @type {!CrOnc.NetworkProperty|undefined} */( |
| + this.get(key, propertyDict)); |
| + if (this.isNetworkPolicyEnforced(property)) |
| + return true; |
| + return !editFieldTypes[key]; |
| }, |
| /** |
| @@ -130,6 +135,12 @@ Polymer({ |
| * @private |
| */ |
| showEdit_: function(propertyDict, editFieldTypes, key, type) { |
| + if (!this.hasPropertyValue_(propertyDict, key)) |
| + return false; |
| + var property = /** @type {!CrOnc.NetworkProperty|undefined} */( |
| + this.get(key, propertyDict)); |
|
michaelpg
2015/10/10 06:01:32
4-space indent
stevenjb
2015/10/22 19:08:08
Done.
|
| + if (this.isNetworkPolicyEnforced(property)) |
| + return false; |
| return editFieldTypes[key] == type; |
| }, |