| Index: ui/webui/resources/cr_elements/cr_onc/cr_onc_data.js
|
| diff --git a/ui/webui/resources/cr_elements/cr_onc/cr_onc_data.js b/ui/webui/resources/cr_elements/cr_onc/cr_onc_data.js
|
| index 1d87b7494756b778fe9a9b03f6a76182aab79bde..c1a484afd0a513669f1412eb9e88b34d9c487f59 100644
|
| --- a/ui/webui/resources/cr_elements/cr_onc/cr_onc_data.js
|
| +++ b/ui/webui/resources/cr_elements/cr_onc/cr_onc_data.js
|
| @@ -5,8 +5,7 @@
|
| /**
|
| * @fileoverview ONC network configuration support class. Wraps a dictionary
|
| * object containing ONC managed or unmanaged dictionaries. Also provides
|
| - * special accessors for ONC properties. See cr-onc-types for ONC types,
|
| - * e.g. CrOnc.NetworkConfigType. Used by consumers of the
|
| + * special accessors for ONC properties. Used by consumers of the
|
| * chrome.networkingPrivate API. See components/onc/docs/onc_spec.html.
|
| */
|
| Polymer('cr-onc-data', {
|
| @@ -16,7 +15,7 @@ Polymer('cr-onc-data', {
|
| * chrome.networkingPrivate.getProperties() call.
|
| *
|
| * @attribute data
|
| - * @type CrOnc.NetworkConfigType
|
| + * @type chrome.networkingPrivate.NetworkStateProperties
|
| * @default null
|
| */
|
| data: null,
|
| @@ -24,17 +23,20 @@ Polymer('cr-onc-data', {
|
|
|
| /** @override */
|
| created: function() {
|
| - this.data = /** @type {CrOnc.NetworkConfigType} */({});
|
| + this.data =
|
| + /** @type {chrome.networkingPrivate.NetworkStateProperties} */({});
|
| },
|
|
|
| /** @return {boolean} True if the network is connected. */
|
| connected: function() {
|
| - return this.data.ConnectionState == CrOnc.ConnectionState.CONNECTED;
|
| + return this.data.ConnectionState ==
|
| + chrome.networkingPrivate.ConnectionStateType.Connected;
|
| },
|
|
|
| /** @return {boolean} True if the network is connecting. */
|
| connecting: function() {
|
| - return this.data.ConnectionState == CrOnc.ConnectionState.CONNECTING;
|
| + return this.data.ConnectionState ==
|
| + chrome.networkingPrivate.ConnectionStateType.Connecting;
|
| },
|
|
|
| /** @return {number} The signal strength of the network. */
|
| @@ -50,22 +52,22 @@ Polymer('cr-onc-data', {
|
| return strength;
|
| },
|
|
|
| - /** @return {CrOnc.Security} The ONC security type. */
|
| + /** @return {DOMString} The ONC security type. */
|
| getWiFiSecurity: function() {
|
| return (this.data.WiFi && this.data.WiFi.Security) ?
|
| - this.data.WiFi.Security : CrOnc.Security.NONE;
|
| + this.data.WiFi.Security : 'None';
|
| },
|
|
|
| - /** @return {CrOnc.RoamingState} The ONC roaming state. */
|
| + /** @return {DOMString} The ONC roaming state. */
|
| getCellularRoamingState: function() {
|
| return (this.data.Cellular && this.data.Cellular.RoamingState) ?
|
| - this.data.Cellular.RoamingState : CrOnc.RoamingState.UNKNOWN;
|
| + this.data.Cellular.RoamingState : 'Unknown';
|
| },
|
|
|
| - /** @return {CrOnc.NetworkTechnology} The ONC network technology. */
|
| + /** @return {DOMString} The ONC network technology. */
|
| getCellularTechnology: function() {
|
| return (this.data.Cellular && this.data.Cellular.NetworkTechnology) ?
|
| - this.data.Cellular.NetworkTechnology : CrOnc.NetworkTechnology.UNKNOWN;
|
| + this.data.Cellular.NetworkTechnology : 'Unknown';
|
| }
|
| });
|
|
|
| @@ -78,7 +80,8 @@ var CrOncDataElement = {};
|
| * Helper method to create and return a typed cr-onc-data Polymer element.
|
| * Sets the data property of the element to |state|.
|
| *
|
| - * @param {!CrOnc.NetworkConfigType} state The network state properties.
|
| + * @param {!chrome.networkingPrivate.NetworkStateProperties} state The network
|
| + * state properties.
|
| * @return {!CrOncDataElement} A cr-onc-data element.
|
| */
|
| CrOncDataElement.create = function(state) {
|
|
|