Chromium Code Reviews| 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 f32491eeb136e463e3849ca8629bda797df4c913..d3d66252614300f8555ebc8d002f83a67175066b 100644 |
| --- a/chrome/browser/resources/options/chromeos/onc_data.js |
| +++ b/chrome/browser/resources/options/chromeos/onc_data.js |
| @@ -22,8 +22,8 @@ cr.define('cr.onc', function() { |
| /** |
| * Returns either a managed property dictionary or an unmanaged value. |
| * @param {string} key The property key. |
| - * @return {*} The property value or dictionary if it exists, otherwise |
| - * undefined. |
| + * @return {(Object|string|undefined)} The property value or dictionary if |
| + * it exists, otherwise undefined. |
| */ |
| getManagedProperty: function(key) { |
| var data = this.data_; |
| @@ -44,7 +44,7 @@ cr.define('cr.onc', function() { |
| * Sets the value of a property. Currently only supports unmanaged |
| * properties. |
| * @param {string} key The property key. |
| - * @param {string} value The property value to set. |
| + * @param {Object} value The property value to set. |
| */ |
| setManagedProperty: function(key, value) { |
| var data = this.data_; |
| @@ -76,7 +76,8 @@ cr.define('cr.onc', function() { |
| /** |
| * Gets the active value of a property. |
| * @param {string} key The property key. |
| - * @return {*} The property value or undefined. |
| + * @return {(Object|Array|string|undefined)} The property value or |
|
Dan Beam
2014/09/12 03:25:20
@typedef
Vitaly Pavlenko
2014/09/12 19:16:23
Done.
|
| + * undefined. |
| */ |
| getActiveValue: function(key) { |
| var property = this.getManagedProperty(key); |
| @@ -86,7 +87,8 @@ cr.define('cr.onc', function() { |
| if ('Active' in property) |
| return property['Active']; |
| // If no Active value is defined, return the effective value if present. |
| - var effective = this.getEffectiveValueFromProperty_(property); |
| + var effective = this.getEffectiveValueFromProperty_( |
| + /** @type {Object} */(property)); |
| if (effective != undefined) |
| return effective; |
| // Otherwise this is an Object but not a Managed one. |
| @@ -97,7 +99,8 @@ cr.define('cr.onc', function() { |
| * Gets the translated ONC value from the result of getActiveValue() using |
| * loadTimeData. If no translation exists, returns the untranslated value. |
| * @param {string} key The property key. |
| - * @return {*} The translation if available or the value if not. |
| + * @return {(Object|Array|string|undefined)} The translation if available or |
| + * the value if not. |
| */ |
| getTranslatedValue: function(key) { |
| var value = this.getActiveValue(key); |
| @@ -121,7 +124,8 @@ cr.define('cr.onc', function() { |
| /** |
| * Gets the recommended value of a property. |
| * @param {string} key The property key. |
| - * @return {*} The property value or undefined. |
| + * @return {(Object|Array|string|undefined)} The property value or |
| + * undefined. |
| */ |
| getRecommendedValue: function(key) { |
| var property = this.getManagedProperty(key); |
| @@ -176,7 +180,8 @@ cr.define('cr.onc', function() { |
| /** |
| * Get the effective value from a Managed property ONC dictionary. |
| * @param {Object} property The managed property ONC dictionary. |
| - * @return {*} The effective value or undefined. |
| + * @return {(Object|Array|string|undefined)} The effective value or |
| + * undefined. |
| * @private |
| */ |
| getEffectiveValueFromProperty_: function(property) { |