[Passwords/Settings] Avoid duplicated checks in PasswordsSection
It seems over time, different features added to passwords settings ended up implementing the check of whether there are saved passwords resulting in hasSome_, hasStoredPasswords_ and hasPasswords_ (e.g. crrev.com/c/1047867, crrev.com/2107524). This CL summarizes these in a single hasSavedPasswords_ property, reflecting the name of the corresponding array. The same is done for the array of exceptions. The motivations here are: a) Keep simplifying the PasswordsSection code; b) Avoid the use of hasStoredPasswords_ in setSavedPasswordsListener, allowing to extract that code into a new behavior in the next CL. Bug: None Change-Id: Ib39c29f3cc5fd90bde3313971eb95d17b3ed9fe1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2225905 Commit-Queue: Victor Vianna <victorvianna@google.com> Reviewed-by:Friedrich [CET] <fhorschig@chromium.org> Reviewed-by:
Jan Wilken Dörrie <jdoerrie@chromium.org> Cr-Commit-Position: refs/heads/master@{#774589}
Showing
Please register or sign in to comment