Index: chrome/browser/resources/options/chromeos/internet_network_element.js |
diff --git a/chrome/browser/resources/options/chromeos/internet_network_element.js b/chrome/browser/resources/options/chromeos/internet_network_element.js |
index 1fbf854e7ca45ddf11ee46c6018d0ce7e609e6c1..bba5a54fcdd071432e35df5c177b89945479bb83 100644 |
--- a/chrome/browser/resources/options/chromeos/internet_network_element.js |
+++ b/chrome/browser/resources/options/chromeos/internet_network_element.js |
@@ -27,6 +27,10 @@ cr.define('options.internet', function() { |
Constants.TYPE_BLUETOOTH = 4; |
Constants.TYPE_CELLULAR = 5; |
Constants.TYPE_VPN = 6; |
+ // ONC sources: |
+ Constants.ONC_SOURCE_USER_IMPORT = 1; |
+ Constants.ONC_SOURCE_DEVICE_POLICY = 2; |
+ Constants.ONC_SOURCE_USER_POLICY = 3; |
/** |
* Creates a new network list div. |
@@ -138,6 +142,19 @@ cr.define('options.internet', function() { |
this.connecting = this.data.connecting; |
this.other = this.data.servicePath == '?'; |
this.id = this.data.servicePath; |
+ |
+ // Insert a div holding the policy-managed indicator. |
+ var policyIndicator = this.ownerDocument.createElement('div'); |
+ policyIndicator.className = 'controlled-setting-indicator'; |
+ cr.ui.decorate(policyIndicator, options.ControlledSettingIndicator); |
+ |
+ if (this.data.policyManaged) { |
+ policyIndicator.controlledBy = 'policy'; |
+ policyIndicator.setAttribute('textPolicy', |
+ localStrings.getString('managedNetwork')); |
+ } |
+ this.appendChild(policyIndicator); |
+ |
// textDiv holds icon, name and status text. |
var textDiv = this.ownerDocument.createElement('div'); |
textDiv.className = 'network-item-text'; |
@@ -246,7 +263,7 @@ cr.define('options.internet', function() { |
self.data.servicePath, |
'forget']); |
}); |
- |
+ button.disabled = this.data.policyManaged; |
buttonsDiv.appendChild(button); |
} |
this.appendChild(buttonsDiv); |