Chromium Code Reviews| 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 174b509f9cb855fb9b031261d522a5f06af7096e..7d4905859a1e2a95ab6a109ff3b8bf006afd3e1b 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 |
| @@ -116,6 +116,12 @@ AutofillManager.prototype = { |
| */ |
| getAddressList: assertNotReached, |
| + /** |
| + * Saves the given address. |
| + * @param {!AutofillManager.AddressEntry} creditCard |
|
michaelpg
2016/06/29 00:00:28
address
hcarmona
2016/07/11 22:35:45
Done.
|
| + */ |
| + saveAddress: assertNotReached, |
| + |
| /** @param {string} guid The guid of the address to remove. */ |
| removeAddress: assertNotReached, |
| @@ -247,6 +253,11 @@ AutofillManagerImpl.prototype = { |
| }, |
| /** @override */ |
| + saveAddress: function(address) { |
| + chrome.autofillPrivate.saveAddress(address); |
| + }, |
| + |
| + /** @override */ |
| removeAddress: function(guid) { |
| assert(guid); |
| chrome.autofillPrivate.removeEntry(guid); |
| @@ -339,6 +350,7 @@ Polymer({ |
| 'remove-credit-card': 'removeCreditCard_', |
| 'remove-password-exception': 'removePasswordException_', |
| 'remove-saved-password': 'removeSavedPassword_', |
| + 'save-address': 'saveAddress_', |
| 'save-credit-card': 'saveCreditCard_', |
| 'show-password': 'showPassword_', |
| }, |
| @@ -480,6 +492,15 @@ Polymer({ |
| }, |
| /** |
| + * Listens for the save-address event, and calls the private API. |
| + * @param {!Event} event |
| + * @private |
| + */ |
| + saveAddress_: function(event) { |
| + this.autofillManager_.saveAddress(event.detail); |
| + }, |
| + |
| + /** |
| * Listens for the save-credit-card event, and calls the private API. |
| * @param {!Event} event |
| * @private |