Chromium Code Reviews| Index: chrome/browser/resources/settings/passwords_and_forms_page/passwords_section.js |
| diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/passwords_section.js b/chrome/browser/resources/settings/passwords_and_forms_page/passwords_section.js |
| index ea247205be16177c978995dc91fb153564078e86..ff917dd9604dcb769bf99f3f75a062842704e178 100644 |
| --- a/chrome/browser/resources/settings/passwords_and_forms_page/passwords_section.js |
| +++ b/chrome/browser/resources/settings/passwords_and_forms_page/passwords_section.js |
| @@ -20,8 +20,8 @@ PasswordManager.PasswordUiEntry; |
| /** @typedef {chrome.passwordsPrivate.LoginPair} */ |
| PasswordManager.LoginPair; |
| -/** @typedef {chrome.passwordsPrivate.ExceptionPair} */ |
| -PasswordManager.ExceptionPair; |
| +/** @typedef {chrome.passwordsPrivate.ExceptionEntry} */ |
| +PasswordManager.ExceptionEntry; |
| /** @typedef {chrome.passwordsPrivate.PlaintextPasswordEventParameters} */ |
| PasswordManager.PlaintextPasswordEvent; |
| @@ -54,19 +54,19 @@ PasswordManager.prototype = { |
| /** |
| * Add an observer to the list of password exceptions. |
| - * @param {function(!Array<!PasswordManager.ExceptionPair>):void} listener |
| + * @param {function(!Array<!PasswordManager.ExceptionEntry>):void} listener |
| */ |
| addExceptionListChangedListener: assertNotReached, |
| /** |
| * Remove an observer from the list of password exceptions. |
| - * @param {function(!Array<!PasswordManager.ExceptionPair>):void} listener |
| + * @param {function(!Array<!PasswordManager.ExceptionEntry>):void} listener |
| */ |
| removeExceptionListChangedListener: assertNotReached, |
| /** |
| * Request the list of password exceptions. |
| - * @param {function(!Array<!PasswordManager.ExceptionPair>):void} callback |
| + * @param {function(!Array<!PasswordManager.ExceptionEntry>):void} callback |
| */ |
| getExceptionList: assertNotReached, |
| @@ -144,7 +144,7 @@ PasswordManagerImpl.prototype = { |
| getPlaintextPassword: function(loginPair, callback) { |
| var listener = function(reply) { |
| // Only handle the reply for our loginPair request. |
| - if (reply.loginPair.originUrl == loginPair.originUrl && |
| + if (reply.loginPair.urls.origin == loginPair.urls.origin && |
| reply.loginPair.username == loginPair.username) { |
| chrome.passwordsPrivate.onPlaintextPasswordRetrieved.removeListener( |
| listener); |
| @@ -159,8 +159,8 @@ PasswordManagerImpl.prototype = { |
| /** @typedef {!{model: !{item: !chrome.passwordsPrivate.PasswordUiEntry}}} */ |
| var PasswordUiEntryEvent; |
| -/** @typedef {!{model: !{item: !chrome.passwordsPrivate.ExceptionPair}}} */ |
| -var ExceptionPairEntryEvent; |
| +/** @typedef {!{model: !{item: !chrome.passwordsPrivate.ExceptionEntry}}} */ |
| +var ExceptionEntryEntryEvent; |
| (function() { |
| 'use strict'; |
| @@ -185,7 +185,7 @@ Polymer({ |
| /** |
| * An array of sites to display. |
| - * @type {!Array<!PasswordManager.ExceptionPair>} |
| + * @type {!Array<!PasswordManager.ExceptionEntry>} |
| */ |
| passwordExceptions: Array, |
| @@ -235,7 +235,7 @@ Polymer({ |
| setSavedPasswordsListener_: null, |
| /** |
| - * @type {?function(!Array<PasswordManager.ExceptionPair>):void} |
| + * @type {?function(!Array<PasswordManager.ExceptionEntry>):void} |
| * @private |
| */ |
| setPasswordExceptionsListener_: null, |
| @@ -274,7 +274,7 @@ Polymer({ |
| /** @type {function(!Array<PasswordManager.PasswordUiEntry>):void} */( |
| this.setSavedPasswordsListener_)); |
| this.passwordManager_.removeExceptionListChangedListener( |
| - /** @type {function(!Array<PasswordManager.ExceptionPair>):void} */( |
| + /** @type {function(!Array<PasswordManager.ExceptionEntry>):void} */( |
| this.setPasswordExceptionsListener_)); |
| }, |
| @@ -285,7 +285,7 @@ Polymer({ |
| */ |
| setPassword: function(loginPair, password) { |
| if (this.activePassword && |
| - this.activePassword.loginPair.originUrl == loginPair.originUrl && |
| + this.activePassword.loginPair.urls.origin == loginPair.urls.origin && |
| this.activePassword.loginPair.username == loginPair.username) { |
| this.$$('password-edit-dialog').password = password; |
| } |
| @@ -320,19 +320,19 @@ Polymer({ |
| return savedPasswords; |
| return savedPasswords.filter(function(password) { |
| - return password.loginPair.originUrl.includes(filter) || |
| + return password.loginPair.urls.shown.includes(filter) || |
|
jdoerrie
2017/04/24 08:35:59
I changed this because we really should match agai
hcarmona
2017/04/24 16:39:15
👍
|
| password.loginPair.username.includes(filter); |
| }); |
| }, |
| /** |
| * @param {string} filter |
| - * @return {function(!chrome.passwordsPrivate.ExceptionPair): boolean} |
| + * @return {function(!chrome.passwordsPrivate.ExceptionEntry): boolean} |
| * @private |
| */ |
| passwordExceptionFilter_: function(filter) { |
| return function(exception) { |
| - return exception.exceptionUrl.includes(filter); |
| + return exception.urls.shown.includes(filter); |
| }; |
| }, |
| @@ -347,11 +347,11 @@ Polymer({ |
| /** |
| * Fires an event that should delete the password exception. |
| - * @param {!ExceptionPairEntryEvent} e The polymer event. |
| + * @param {!ExceptionEntryEntryEvent} e The polymer event. |
| * @private |
| */ |
| onRemoveExceptionButtonTap_: function(e) { |
| - this.passwordManager_.removeException(e.model.item.exceptionUrl); |
| + this.passwordManager_.removeException(e.model.item.urls.origin); |
| }, |
| /** |