| 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 /** | 339 /** |
| 340 * @param {!chrome.networkingPrivate.NetworkConfigProperties} onc The ONC | 340 * @param {!chrome.networkingPrivate.NetworkConfigProperties} onc The ONC |
| 341 * network properties. | 341 * network properties. |
| 342 * @private | 342 * @private |
| 343 */ | 343 */ |
| 344 setNetworkProperties_: function(onc) { | 344 setNetworkProperties_: function(onc) { |
| 345 if (!this.networkPropertiesReceived_) | 345 if (!this.networkPropertiesReceived_) |
| 346 return; | 346 return; |
| 347 | 347 |
| 348 assert(!!this.guid); | 348 assert(!!this.guid); |
| 349 this.networkingPrivate.setProperties(this.guid, onc, function() { | 349 this.networkingPrivate.setProperties(this.guid, onc, () => { |
| 350 if (chrome.runtime.lastError) { | 350 if (chrome.runtime.lastError) { |
| 351 // An error typically indicates invalid input; request the properties | 351 // An error typically indicates invalid input; request the properties |
| 352 // to update any invalid fields. | 352 // to update any invalid fields. |
| 353 this.getNetworkDetails_(); | 353 this.getNetworkDetails_(); |
| 354 } | 354 } |
| 355 }.bind(this)); | 355 }); |
| 356 }, | 356 }, |
| 357 | 357 |
| 358 /** | 358 /** |
| 359 * @return {!chrome.networkingPrivate.NetworkConfigProperties} An ONC | 359 * @return {!chrome.networkingPrivate.NetworkConfigProperties} An ONC |
| 360 * dictionary with just the Type property set. Used for passing properties | 360 * dictionary with just the Type property set. Used for passing properties |
| 361 * to setNetworkProperties_. | 361 * to setNetworkProperties_. |
| 362 * @private | 362 * @private |
| 363 */ | 363 */ |
| 364 getEmptyNetworkProperties_: function() { | 364 getEmptyNetworkProperties_: function() { |
| 365 return {Type: this.networkProperties.Type}; | 365 return {Type: this.networkProperties.Type}; |
| (...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1032 */ | 1032 */ |
| 1033 allPropertiesMatch_: function(curValue, newValue) { | 1033 allPropertiesMatch_: function(curValue, newValue) { |
| 1034 for (var key in newValue) { | 1034 for (var key in newValue) { |
| 1035 if (newValue[key] != curValue[key]) | 1035 if (newValue[key] != curValue[key]) |
| 1036 return false; | 1036 return false; |
| 1037 } | 1037 } |
| 1038 return true; | 1038 return true; |
| 1039 } | 1039 } |
| 1040 }); | 1040 }); |
| 1041 })(); | 1041 })(); |
| OLD | NEW |