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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 var preferNetwork = priority > 0; | 191 var preferNetwork = priority > 0; |
192 if (preferNetwork != this.preferNetwork_) | 192 if (preferNetwork != this.preferNetwork_) |
193 this.preferNetwork_ = preferNetwork; | 193 this.preferNetwork_ = preferNetwork; |
194 | 194 |
195 // Set the IPAddress property to the IPV4 Address. | 195 // Set the IPAddress property to the IPV4 Address. |
196 var ipv4 = | 196 var ipv4 = |
197 CrOnc.getIPConfigForType(this.networkProperties, CrOnc.IPType.IPV4); | 197 CrOnc.getIPConfigForType(this.networkProperties, CrOnc.IPType.IPV4); |
198 this.IPAddress_ = (ipv4 && ipv4.IPAddress) || ''; | 198 this.IPAddress_ = (ipv4 && ipv4.IPAddress) || ''; |
199 | 199 |
200 // Update the detail page title. | 200 // Update the detail page title. |
201 this.parentNode.pageTitle = | 201 this.parentNode.pageTitle = CrOnc.getNetworkName(this.networkProperties); |
202 CrOnc.getNetworkName(this.networkProperties, this); | |
203 }, | 202 }, |
204 | 203 |
205 /** @private */ | 204 /** @private */ |
206 autoConnectChanged_: function() { | 205 autoConnectChanged_: function() { |
207 if (!this.networkProperties || !this.guid) | 206 if (!this.networkProperties || !this.guid) |
208 return; | 207 return; |
209 var onc = this.getEmptyNetworkProperties_(); | 208 var onc = this.getEmptyNetworkProperties_(); |
210 CrOnc.setTypeProperty(onc, 'AutoConnect', this.autoConnect_); | 209 CrOnc.setTypeProperty(onc, 'AutoConnect', this.autoConnect_); |
211 this.setNetworkProperties_(onc); | 210 this.setNetworkProperties_(onc); |
212 }, | 211 }, |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 */ | 866 */ |
868 allPropertiesMatch_: function(curValue, newValue) { | 867 allPropertiesMatch_: function(curValue, newValue) { |
869 for (let key in newValue) { | 868 for (let key in newValue) { |
870 if (newValue[key] != curValue[key]) | 869 if (newValue[key] != curValue[key]) |
871 return false; | 870 return false; |
872 } | 871 } |
873 return true; | 872 return true; |
874 } | 873 } |
875 }); | 874 }); |
876 })(); | 875 })(); |
OLD | NEW |