Index: chrome/browser/resources/options/chromeos/onc_data.js |
diff --git a/chrome/browser/resources/options/chromeos/onc_data.js b/chrome/browser/resources/options/chromeos/onc_data.js |
index dd1f062c72bb902865fbce841049915fa2538cc7..61e162225bf0eabe0e9c0c8f1b630fa7108b420e 100644 |
--- a/chrome/browser/resources/options/chromeos/onc_data.js |
+++ b/chrome/browser/resources/options/chromeos/onc_data.js |
@@ -133,6 +133,29 @@ cr.define('cr.onc', function() { |
}, |
/** |
+ * Returns the Source of this configuration. If undefined returns 'None'. |
+ * @return {string} The configuration source: 'None', 'User', 'Device', |
+ * 'UserPolicy', or 'DevicePolicy'. |
+ */ |
+ getSource: function() { |
+ var source = this.getActiveValue('Source'); |
+ if (source == undefined) |
+ return 'None'; |
+ return source; |
+ }, |
+ |
+ /** |
+ * Returns the WiFi security type (defaults to 'None'). |
+ * @return {string} The security type. |
+ */ |
+ getWiFiSecurity: function() { |
+ var security = this.getActiveValue('WiFi.Security'); |
+ if (security == undefined) |
+ return 'None'; |
+ return security; |
+ }, |
+ |
+ /** |
* Updates the properties of |data_| from the properties in |update|. |
* Note: this only looks at top level entries, so if a dictionary is |
* updated the entire dictionary is written over. TODO(stevenjb): |