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

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 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..c813b6e6bebd0ff8edeb8645b386332138ada5fa 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 return 'None'.
+ * @return {string} The configuration source: 'None', 'User' or 'Device'.
+ */
+ getSource: function() {
+ var source = this.getActiveValue('Source');
pneubeck (no reviews) 2014/09/09 19:35:32 we should ensure that the ConfigurationHandler alw
stevenjb 2014/09/10 00:00:55 That seems unnecessarily verbose to me, and would
stevenjb 2014/09/10 00:26:01 Also, in practice, any configuration that actually
pneubeck (no reviews) 2014/09/10 10:49:38 Ah, I didn't mean to remove this fallback handling
+ if (source == undefined)
+ return 'None';
+ return source;
+ },
+
+
pneubeck (no reviews) 2014/09/09 19:35:31 nit: remove empty line
stevenjb 2014/09/10 00:00:55 Done.
+ /**
+ * Returns the WiFi security type where undefined == 'None'.
pneubeck (no reviews) 2014/09/09 19:35:32 nit: " where undefined == 'None'." -> " with defau
stevenjb 2014/09/10 00:00:55 Done.
+ * @return {string} The secuirity type.
pneubeck (no reviews) 2014/09/09 19:35:32 typo: secuirity
stevenjb 2014/09/10 00:00:55 Done.
+ */
+ 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