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

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

Issue 552113002: Add ONC 'Source' configuration property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_279351_internet_options_9a
Patch Set: Rebase, Feedback, add *Policy sources Created 6 years, 3 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/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):

Powered by Google App Engine
This is Rietveld 408576698