| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview | 6 * @fileoverview |
| 7 * 'settings-internet-detail' is the settings subpage containing details | 7 * 'settings-internet-detail' is the settings subpage containing details |
| 8 * for a network. | 8 * for a network. |
| 9 */ | 9 */ |
| 10 (function() { | 10 (function() { |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 /** | 122 /** |
| 123 * Object providing network type values for data binding. | 123 * Object providing network type values for data binding. |
| 124 * @const | 124 * @const |
| 125 * @private | 125 * @private |
| 126 */ | 126 */ |
| 127 NetworkType_: { | 127 NetworkType_: { |
| 128 type: Object, | 128 type: Object, |
| 129 value: { | 129 value: { |
| 130 CELLULAR: CrOnc.Type.CELLULAR, | 130 CELLULAR: CrOnc.Type.CELLULAR, |
| 131 ETHERNET: CrOnc.Type.ETHERNET, | 131 ETHERNET: CrOnc.Type.ETHERNET, |
| 132 TETHER: CrOnc.Type.TETHER, |
| 132 VPN: CrOnc.Type.VPN, | 133 VPN: CrOnc.Type.VPN, |
| 133 WIFI: CrOnc.Type.WI_FI, | 134 WIFI: CrOnc.Type.WI_FI, |
| 134 WIMAX: CrOnc.Type.WI_MAX, | 135 WIMAX: CrOnc.Type.WI_MAX, |
| 135 }, | 136 }, |
| 136 readOnly: true | 137 readOnly: true |
| 137 }, | 138 }, |
| 138 }, | 139 }, |
| 139 | 140 |
| 140 /** | 141 /** |
| 141 * Listener function for chrome.networkingPrivate.onNetworksChanged event. | 142 * Listener function for chrome.networkingPrivate.onNetworksChanged event. |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 * @return {!Array<string>} The fields to display in the info section. | 768 * @return {!Array<string>} The fields to display in the info section. |
| 768 * @private | 769 * @private |
| 769 */ | 770 */ |
| 770 getInfoFields_: function() { | 771 getInfoFields_: function() { |
| 771 /** @type {!Array<string>} */ var fields = []; | 772 /** @type {!Array<string>} */ var fields = []; |
| 772 var type = this.networkProperties.Type; | 773 var type = this.networkProperties.Type; |
| 773 if (type == CrOnc.Type.CELLULAR && !!this.networkProperties.Cellular) { | 774 if (type == CrOnc.Type.CELLULAR && !!this.networkProperties.Cellular) { |
| 774 fields.push( | 775 fields.push( |
| 775 'Cellular.ActivationState', 'Cellular.RoamingState', | 776 'Cellular.ActivationState', 'Cellular.RoamingState', |
| 776 'RestrictedConnectivity', 'Cellular.ServingOperator.Name'); | 777 'RestrictedConnectivity', 'Cellular.ServingOperator.Name'); |
| 778 } else if (type == CrOnc.Type.TETHER && !!this.networkProperties.Tether) { |
| 779 fields.push( |
| 780 'Tether.BatteryPercentage', 'Tether.SignalStrength', |
| 781 'Tether.Carrier'); |
| 777 } else if (type == CrOnc.Type.VPN && !!this.networkProperties.VPN) { | 782 } else if (type == CrOnc.Type.VPN && !!this.networkProperties.VPN) { |
| 778 var vpnType = CrOnc.getActiveValue(this.networkProperties.VPN.Type); | 783 var vpnType = CrOnc.getActiveValue(this.networkProperties.VPN.Type); |
| 779 if (vpnType == 'ThirdPartyVPN') { | 784 if (vpnType == 'ThirdPartyVPN') { |
| 780 fields.push('VPN.ThirdPartyVPN.ProviderName'); | 785 fields.push('VPN.ThirdPartyVPN.ProviderName'); |
| 781 } else { | 786 } else { |
| 782 fields.push('VPN.Host', 'VPN.Type'); | 787 fields.push('VPN.Host', 'VPN.Type'); |
| 783 if (vpnType == 'OpenVPN') | 788 if (vpnType == 'OpenVPN') |
| 784 fields.push('VPN.OpenVPN.Username'); | 789 fields.push('VPN.OpenVPN.Username'); |
| 785 else if (vpnType == 'L2TP-IPsec') | 790 else if (vpnType == 'L2TP-IPsec') |
| 786 fields.push('VPN.L2TP.Username'); | 791 fields.push('VPN.L2TP.Username'); |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 */ | 930 */ |
| 926 allPropertiesMatch_: function(curValue, newValue) { | 931 allPropertiesMatch_: function(curValue, newValue) { |
| 927 for (var key in newValue) { | 932 for (var key in newValue) { |
| 928 if (newValue[key] != curValue[key]) | 933 if (newValue[key] != curValue[key]) |
| 929 return false; | 934 return false; |
| 930 } | 935 } |
| 931 return true; | 936 return true; |
| 932 } | 937 } |
| 933 }); | 938 }); |
| 934 })(); | 939 })(); |
| OLD | NEW |