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

Unified Diff: chrome/browser/resources/settings/internet_page/network_property_list.js

Issue 1390073006: Add cr-policy-network-indicator to internet pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_521791_network_indicators_c3
Patch Set: Created 5 years, 2 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: 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;
},

Powered by Google App Engine
This is Rietveld 408576698