| Index: chrome/browser/resources/settings/passwords_and_forms_page/passwords_and_forms_page.js
|
| diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/passwords_and_forms_page.js b/chrome/browser/resources/settings/passwords_and_forms_page/passwords_and_forms_page.js
|
| index d38235f03cc5fe51c68c306687d8e6c69ee1ec4d..af46188480ceed05488681f3521eb510e1234db1 100644
|
| --- a/chrome/browser/resources/settings/passwords_and_forms_page/passwords_and_forms_page.js
|
| +++ b/chrome/browser/resources/settings/passwords_and_forms_page/passwords_and_forms_page.js
|
| @@ -71,7 +71,7 @@ PasswordManager.prototype = {
|
|
|
| /**
|
| * Should remove the password exception and notify that the list has changed.
|
| - * @param {!string} exception The exception that should be removed from the
|
| + * @param {string} exception The exception that should be removed from the
|
| * list. No-op if |exception| is not in the list.
|
| */
|
| removeException: assertNotReached,
|
| @@ -133,6 +133,12 @@ AutofillManager.prototype = {
|
| * @param {function(!Array<!AutofillManager.CreditCardEntry>):void} callback
|
| */
|
| getCreditCardList: assertNotReached,
|
| +
|
| + /**
|
| + * Saves the given credit card.
|
| + * @param {!AutofillManager.CreditCardEntry} creditCard
|
| + */
|
| + saveCreditCard: assertNotReached,
|
| };
|
|
|
| /**
|
| @@ -245,6 +251,11 @@ AutofillManagerImpl.prototype = {
|
| getCreditCardList: function(callback) {
|
| chrome.autofillPrivate.getCreditCardList(callback);
|
| },
|
| +
|
| + /** @override */
|
| + saveCreditCard: function(creditCard) {
|
| + chrome.autofillPrivate.saveCreditCard(creditCard);
|
| + }
|
| };
|
|
|
| (function() {
|
| @@ -306,6 +317,7 @@ Polymer({
|
| listeners: {
|
| 'remove-password-exception': 'removePasswordException_',
|
| 'remove-saved-password': 'removeSavedPassword_',
|
| + 'save-credit-card': 'saveCreditCard_',
|
| 'show-password': 'showPassword_',
|
| },
|
|
|
| @@ -419,6 +431,15 @@ Polymer({
|
| },
|
|
|
| /**
|
| + * Listens for the save-credit-card event, and calls the private API.
|
| + * @param {!Event} event
|
| + * @private
|
| + */
|
| + saveCreditCard_: function(event) {
|
| + this.autofillManager_.saveCreditCard(event.detail);
|
| + },
|
| +
|
| + /**
|
| * Listens for the show-password event, and calls the private API.
|
| * @param {!Event} event
|
| * @private
|
|
|