Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(495)

Side by Side Diff: chrome/browser/resources/settings/internet_page/internet_detail_page.js

Issue 2984843003: MD Settings: Convert all usages of .bind(this) to use ES6 arrow function. (Closed)
Patch Set: Fix compiler errors, newly revealed. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 /** 342 /**
343 * @param {!chrome.networkingPrivate.NetworkConfigProperties} onc The ONC 343 * @param {!chrome.networkingPrivate.NetworkConfigProperties} onc The ONC
344 * network properties. 344 * network properties.
345 * @private 345 * @private
346 */ 346 */
347 setNetworkProperties_: function(onc) { 347 setNetworkProperties_: function(onc) {
348 if (!this.networkPropertiesReceived_) 348 if (!this.networkPropertiesReceived_)
349 return; 349 return;
350 350
351 assert(!!this.guid); 351 assert(!!this.guid);
352 this.networkingPrivate.setProperties(this.guid, onc, function() { 352 this.networkingPrivate.setProperties(this.guid, onc, () => {
353 if (chrome.runtime.lastError) { 353 if (chrome.runtime.lastError) {
354 // An error typically indicates invalid input; request the properties 354 // An error typically indicates invalid input; request the properties
355 // to update any invalid fields. 355 // to update any invalid fields.
356 this.getNetworkDetails_(); 356 this.getNetworkDetails_();
357 } 357 }
358 }.bind(this)); 358 });
359 }, 359 },
360 360
361 /** 361 /**
362 * @return {!chrome.networkingPrivate.NetworkConfigProperties} An ONC 362 * @return {!chrome.networkingPrivate.NetworkConfigProperties} An ONC
363 * dictionary with just the Type property set. Used for passing properties 363 * dictionary with just the Type property set. Used for passing properties
364 * to setNetworkProperties_. 364 * to setNetworkProperties_.
365 * @private 365 * @private
366 */ 366 */
367 getEmptyNetworkProperties_: function() { 367 getEmptyNetworkProperties_: function() {
368 return {Type: this.networkProperties.Type}; 368 return {Type: this.networkProperties.Type};
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 */ 1036 */
1037 allPropertiesMatch_: function(curValue, newValue) { 1037 allPropertiesMatch_: function(curValue, newValue) {
1038 for (var key in newValue) { 1038 for (var key in newValue) {
1039 if (newValue[key] != curValue[key]) 1039 if (newValue[key] != curValue[key])
1040 return false; 1040 return false;
1041 } 1041 }
1042 return true; 1042 return true;
1043 } 1043 }
1044 }); 1044 });
1045 })(); 1045 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698