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

Side by Side Diff: chrome/browser/resources/settings/passwords_and_forms_page/passwords_and_forms_page.js

Issue 2156413002: Settings Router Refactor: Migrate to settings.Route.navigateTo calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use timing fix Created 4 years, 4 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 'settings-passwords-and-forms-page' is the settings page 6 * @fileoverview 'settings-passwords-and-forms-page' is the settings page
7 * for passwords and auto fill. 7 * for passwords and auto fill.
8 */ 8 */
9 9
10 /** 10 /**
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 469
470 /** 470 /**
471 * Shows the manage autofill sub page. 471 * Shows the manage autofill sub page.
472 * @param {!Event} event 472 * @param {!Event} event
473 * @private 473 * @private
474 */ 474 */
475 onAutofillTap_: function(event) { 475 onAutofillTap_: function(event) {
476 // Ignore clicking on the toggle button and verify autofill is enabled. 476 // Ignore clicking on the toggle button and verify autofill is enabled.
477 if (Polymer.dom(event).localTarget != this.$.autofillToggle && 477 if (Polymer.dom(event).localTarget != this.$.autofillToggle &&
478 this.getPref('autofill.enabled').value) { 478 this.getPref('autofill.enabled').value) {
479 this.$.pages.setSubpageChain(['manage-autofill']); 479 settings.navigateTo(settings.Route.AUTOFILL);
480 } 480 }
481 }, 481 },
482 482
483 /** 483 /**
484 * Shows the manage passwords sub page. 484 * Shows the manage passwords sub page.
485 * @param {!Event} event 485 * @param {!Event} event
486 * @private 486 * @private
487 */ 487 */
488 onPasswordsTap_: function(event) { 488 onPasswordsTap_: function(event) {
489 // Ignore clicking on the toggle button and only expand if the manager is 489 // Ignore clicking on the toggle button and only expand if the manager is
490 // enabled. 490 // enabled.
491 if (Polymer.dom(event).localTarget != this.$.passwordToggle && 491 if (Polymer.dom(event).localTarget != this.$.passwordToggle &&
492 this.getPref('profile.password_manager_enabled').value) { 492 this.getPref('profile.password_manager_enabled').value) {
493 this.$.pages.setSubpageChain(['manage-passwords']); 493 settings.navigateTo(settings.Route.MANAGE_PASSWORDS);
494 } 494 }
495 }, 495 },
496 496
497 /** 497 /**
498 * Listens for the save-address event, and calls the private API. 498 * Listens for the save-address event, and calls the private API.
499 * @param {!Event} event 499 * @param {!Event} event
500 * @private 500 * @private
501 */ 501 */
502 saveAddress_: function(event) { 502 saveAddress_: function(event) {
503 this.autofillManager_.saveAddress(event.detail); 503 this.autofillManager_.saveAddress(event.detail);
(...skipping 13 matching lines...) Expand all
517 * @param {!Event} event 517 * @param {!Event} event
518 * @private 518 * @private
519 */ 519 */
520 showPassword_: function(event) { 520 showPassword_: function(event) {
521 this.passwordManager_.getPlaintextPassword(event.detail, function(e) { 521 this.passwordManager_.getPlaintextPassword(event.detail, function(e) {
522 this.$$('#passwordSection').setPassword(e.loginPair, e.plaintextPassword); 522 this.$$('#passwordSection').setPassword(e.loginPair, e.plaintextPassword);
523 }.bind(this)); 523 }.bind(this));
524 }, 524 },
525 }); 525 });
526 })(); 526 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698