New issue
Advanced search Search tips

Issue 805534 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Bug

Blocking:
issue 714618
issue 789561



Sign in to add a comment

PasswordManagerPresenter::GetAllPasswords() returns an empty list if the password list is still loading.

Project Member Reported by cfroussios@chromium.org, Jan 24 2018

Issue description

It should either block or fail with an error.
Otherwise exporting soon after Chrome's start results in an empty list.
 

Comment 1 by vabr@chromium.org, Jan 25 2018

Cc: ioanap@chromium.org
Labels: OS-Android OS-Chrome
I wonder if export should be disabled while the list in settings is loading. That's what Android does (it also uses PasswordManagerPresenter::GetAllPasswords), see SavePasswordsPreferences#onPrepareOptionsMenu.

Finally, looking at ios/chrome/browser/ui/settings/save_passwords_collection_view_controller.mm, there also seems to be a time interval when the settings page is still waiting for onGetPasswordStoreResults to be called. ioanap@ -- is the export button available during that time interval?

Comment 2 by kolos@chromium.org, Jan 26 2018

Blocking: 714618

Comment 3 by ioanap@chromium.org, Jan 26 2018

Just looked at it again and yes, the export button is disabled until the list of saved passwords is populated. 

For reference: this happens in SavePasswordsCollectionViewController via loadModel => updateExportpasswordsItem which is called once when the controller is initialized (list is empty, so the button is set to disabled) and then once when the passwords are ready (via reloadData).
I think the UX is the wrong level to solve the fact a method may return incorrect data. We're only hiding the bug and hoping we don't step on it again in the future. I would only consider it as temporary hack to make it to M66.

Comment 5 by vabr@chromium.org, Jan 28 2018

Why not put there a DCHECK then?
Making it block seems like adding unnecessary complexity, when the design could be kept so that this is not even called before the passwords are available.
Project Member

Comment 6 by bugdroid1@chromium.org, Feb 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d57ac0affdfc1080acc0de78384260798681b92c

commit d57ac0affdfc1080acc0de78384260798681b92c
Author: Christos Froussios <cfroussios@chromium.org>
Date: Tue Feb 06 18:32:11 2018

[Password Manager] Show export menu item only for a non-empty password list

Exporting an empty password list has no value for the user. Additionally,
exporting while the password list is still loading is undefined behaviour.

For these reasons, we only show the Export Passwords menu item only once
the password list has been read and is non-empty.

Bug:  789561 , 805534 , 807975 
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Ief82b4b46a231402dbaa7251e514c4078f7be31a
Reviewed-on: https://chromium-review.googlesource.com/897486
Commit-Queue: Christos Froussios <cfroussios@chromium.org>
Reviewed-by: Hector Carmona <hcarmona@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534728}
[modify] https://crrev.com/d57ac0affdfc1080acc0de78384260798681b92c/chrome/browser/resources/settings/passwords_and_forms_page/passwords_section.js

Status: Fixed (was: Available)
The implementation works around this. There is no motivation to change the implementation itself.
Cc: -vabr@chromium.org

Sign in to add a comment