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

Side by Side Diff: chrome/browser/resources/settings/people_page/sync_page.js

Issue 2984843003: MD Settings: Convert all usages of .bind(this) to use ES6 arrow function. (Closed)
Patch Set: Resolve conflicts. 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 (function() { 5 (function() {
6 6
7 /** 7 /**
8 * Names of the radio buttons which allow the user to choose their encryption 8 * Names of the radio buttons which allow the user to choose their encryption
9 * mechanism. 9 * mechanism.
10 * @enum {string} 10 * @enum {string}
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 if (!this.syncPrefs.autofillRegistered || !this.syncPrefs.autofillSynced) 210 if (!this.syncPrefs.autofillRegistered || !this.syncPrefs.autofillSynced)
211 this.set('syncPrefs.paymentsIntegrationEnabled', false); 211 this.set('syncPrefs.paymentsIntegrationEnabled', false);
212 212
213 // Hide the new passphrase box if the sync data has been encrypted. 213 // Hide the new passphrase box if the sync data has been encrypted.
214 if (this.syncPrefs.encryptAllData) 214 if (this.syncPrefs.encryptAllData)
215 this.creatingNewPassphrase_ = false; 215 this.creatingNewPassphrase_ = false;
216 216
217 // Focus the password input box if password is needed to start sync. 217 // Focus the password input box if password is needed to start sync.
218 if (this.syncPrefs.passphraseRequired) { 218 if (this.syncPrefs.passphraseRequired) {
219 // Wait for the dom-if templates to render and subpage to become visible. 219 // Wait for the dom-if templates to render and subpage to become visible.
220 listenOnce(document, 'show-container', function() { 220 listenOnce(document, 'show-container', () => {
221 var input = /** @type {!PaperInputElement} */ ( 221 var input = /** @type {!PaperInputElement} */ (
222 this.$$('#existingPassphraseInput')); 222 this.$$('#existingPassphraseInput'));
223 input.inputElement.focus(); 223 input.inputElement.focus();
224 }.bind(this)); 224 });
225 } 225 }
226 }, 226 },
227 227
228 /** 228 /**
229 * Handler for when the sync all data types checkbox is changed. 229 * Handler for when the sync all data types checkbox is changed.
230 * @param {!Event} event 230 * @param {!Event} event
231 * @private 231 * @private
232 */ 232 */
233 onSyncAllDataTypesChanged_: function(event) { 233 onSyncAllDataTypesChanged_: function(event) {
234 if (event.target.checked) { 234 if (event.target.checked) {
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 onLearnMoreTap_: function(event) { 438 onLearnMoreTap_: function(event) {
439 if (event.target.tagName == 'A') { 439 if (event.target.tagName == 'A') {
440 // Stop the propagation of events, so that clicking on links inside 440 // Stop the propagation of events, so that clicking on links inside
441 // checkboxes or radio buttons won't change the value. 441 // checkboxes or radio buttons won't change the value.
442 event.stopPropagation(); 442 event.stopPropagation();
443 } 443 }
444 } 444 }
445 }); 445 });
446 446
447 })(); 447 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698