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

Unified Diff: chrome/browser/resources/options/chromeos/internet_network_element.js

Issue 8726007: Disable UI in chrome://settings/internet and details popup for policy-managed networks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make clang happy. Created 9 years, 1 month 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/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);

Powered by Google App Engine
This is Rietveld 408576698