Fix passwords not being shown on settings due to deduplication failure
Assertions made by MultiStorePasswordUiEntry/MultiStoreExceptionEntry when merging two entries [1] are failing in some cases. This causes an exception to be thrown when the list of saved passwords is being updated, which in turn results in some passwords not being shown. In this CL, we treat merge failures more gracefully, namely: - Instead of assertions, we now have merge() return whether it succeeded. - The constructor of the multi-store entries can now only have 1 argument since we can't "return a failure" when calling the constructor. - When a merge fails, we just create separate items in the UI for the entries we were trying to merge. - We rename merge() to mergeInPlace() to make its side-effect clearer. [1] https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/resources/settings/autofill_page/multi_store_password_ui_entry.js;l=51 Bug: 1114697 Change-Id: I588af43cba874510b4d685a42434aa988c90b189 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2351911Reviewed-by:Jan Wilken Dörrie <jdoerrie@chromium.org> Commit-Queue: Victor Vianna <victorvianna@google.com> Cr-Commit-Position: refs/heads/master@{#797704}
Showing
Please register or sign in to comment