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 78e25a7170f8ae302867cc125c0a0ab4628f5a73..79c0af46e5330d55e84b6d3a72b8b5308456dca7 100644 |
--- a/chrome/browser/resources/options/chromeos/onc_data.js |
+++ b/chrome/browser/resources/options/chromeos/onc_data.js |
@@ -12,8 +12,6 @@ cr.define('cr.onc', function() { |
function OncData(data) { |
this.data_ = data; |
- // For convenience set 'type' to the active 'Type' value. |
- this.type = this.getActiveValue('Type'); |
} |
OncData.prototype = { |
@@ -104,7 +102,7 @@ cr.define('cr.onc', function() { |
return value; |
var oncString = 'Onc' + key + value; |
// Handle special cases |
- if (key == 'Name' && this.type == 'Ethernet') |
+ if (key == 'Name' && this.getActiveValue('Type') == 'Ethernet') |
return loadTimeData.getString('ethernetName'); |
if (key == 'VPN.Type' && value == 'L2TP-IPsec') { |
var auth = this.getActiveValue('VPN.IPsec.AuthenticationType'); |
@@ -135,6 +133,17 @@ cr.define('cr.onc', function() { |
}, |
/** |
+ * Updates the properties of |data_| from the properties in |update|. |
pneubeck (no reviews)
2014/09/08 09:18:00
not sure whether that has the intended effect.
IIU
stevenjb
2014/09/08 19:43:12
Eventually this should go away, we really shouldn'
|
+ * @param {object} update Dictionary containing the updated properties. |
+ */ |
+ updateData: function(update) { |
+ for (var prop in update) { |
+ if (prop in this.data_) |
+ this.data_[prop] = update[prop]; |
+ } |
+ }, |
+ |
+ /** |
* Get the effective value from a Managed property ONC dictionary. |
* @param {object} property The managed property ONC dictionary. |
* @return {*} The effective value or undefined. |