Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Issue 1476523004: Implementation of new behaviour of Password Manager on retry password forms. (Closed)

Created:
5 years ago by dvadym
Modified:
5 years ago
Reviewers:
vabr (Chromium)
CC:
chromium-reviews, gcasto+watchlist_chromium.org, vabr+watchlistpasswordmanager_chromium.org, mkwst+watchlist-passwords_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implementation of new behaviour of Password Manager on retry password forms. A password form is considered to be retry password form if there is only one field, which is a password field. In this CL it's implemented the following behaviour on the successful submission of a retry password form: 1.If there are no any credentials saved for this site then to propose to save credentials without username 2.If there is a stored credentials with the same password (but possible with username) then do nothing (currently the user is used to save "no username" password) 3.If there are stored credentials but all they have different password then propose the user to update password. It might be when we missed change password form submission, and the then autofill old password and then site shows the user retry password form. This scenario happens on facebook.com BUG=359315, 527203 Committed: https://crrev.com/412087c2ca68dbdcd1865068654c1b8bb1ac804a Cr-Commit-Position: refs/heads/master@{#361906}

Patch Set 1 #

Patch Set 2 : Tests added #

Patch Set 3 : Comments updated #

Total comments: 13

Patch Set 4 : Addressed Vaclav's comments #

Patch Set 5 : Comments clean up #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+165 lines, -12 lines) Patch
M chrome/browser/password_manager/password_manager_browsertest.cc View 1 2 3 3 chunks +109 lines, -5 lines 0 comments Download
M chrome/test/data/password/password_form.html View 1 1 chunk +6 lines, -0 lines 0 comments Download
M components/password_manager/core/browser/password_form_manager.h View 1 2 3 4 3 chunks +20 lines, -0 lines 3 comments Download
M components/password_manager/core/browser/password_form_manager.cc View 1 2 3 4 chunks +27 lines, -6 lines 0 comments Download
M components/password_manager/core/browser/password_manager.cc View 2 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 14 (7 generated)
dvadym
Hi Vaclav, Could you please review this CL? Regards, Vadym
5 years ago (2015-11-26 12:13:32 UTC) #4
vabr (Chromium)
Thanks, Vadym, LGTM with comments. I have some reservations about the term "retry" form. These ...
5 years ago (2015-11-26 14:35:54 UTC) #5
dvadym
Thanks Vaclav, I've addressed your comments. PTAL https://codereview.chromium.org/1476523004/diff/40001/chrome/browser/password_manager/password_manager_browsertest.cc File chrome/browser/password_manager/password_manager_browsertest.cc (right): https://codereview.chromium.org/1476523004/diff/40001/chrome/browser/password_manager/password_manager_browsertest.cc#newcode2829 chrome/browser/password_manager/password_manager_browsertest.cc:2829: // submitted ...
5 years ago (2015-11-26 15:19:55 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1476523004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1476523004/80001
5 years ago (2015-11-26 15:56:23 UTC) #9
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years ago (2015-11-26 16:46:26 UTC) #11
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/412087c2ca68dbdcd1865068654c1b8bb1ac804a Cr-Commit-Position: refs/heads/master@{#361906}
5 years ago (2015-11-26 16:47:11 UTC) #13
vabr (Chromium)
5 years ago (2015-11-26 17:10:37 UTC) #14
Message was sent while issue was closed.
Still LGTM, just some nits on the one longer comment.

No need to rush addressing them, feel free to do it in whatever other CL you are
doing next in this code.

If you do make a separate CL for the nits below, feel free to just TBR me for
those changes.

Thanks,
Vaclav

https://codereview.chromium.org/1476523004/diff/40001/components/password_man...
File components/password_manager/core/browser/password_form_manager.cc (right):

https://codereview.chromium.org/1476523004/diff/40001/components/password_man...
components/password_manager/core/browser/password_form_manager.cc:1269: for
(auto it = best_matches_.begin(); it != best_matches_.end(); ++it) {
On 2015/11/26 15:19:55, dvadym wrote:
> On 2015/11/26 14:35:54, vabr (Chromium) wrote:
> > From this point until the end of the method, the code works similar to
> > FindBestMatchForUpdatePassword. The difference is that the other method
> requires
> > a unique match, and checks for empty password to speed-up searching. The
> second
> > one does not change the result, but the first one does. Are you not
requiring
> a
> > unique match here on purpose, or could you reuse the
> > FindBestMatchForUpdatePassword code to avoid duplication?
> 
> Yeah, I saw that this functions are quite similar, but they are have slightly
> different logic, so I don't think that it's worth to do one function. In this
> part the difference is that unique match is not required, because I want to
> verify that we already have forms with such passwords and not to show bubble,
it
> doesn't matter if there are multiple stored credentials with this password.

Acknowledged.

https://codereview.chromium.org/1476523004/diff/80001/components/password_man...
File components/password_manager/core/browser/password_form_manager.h (right):

https://codereview.chromium.org/1476523004/diff/80001/components/password_man...
components/password_manager/core/browser/password_form_manager.h:473: // a
password that is not equal to any password from stored for this origin
typo: from -> form

https://codereview.chromium.org/1476523004/diff/80001/components/password_man...
components/password_manager/core/browser/password_form_manager.h:473: // a
password that is not equal to any password from stored for this origin
nit: equal to -> part of
(password and form are different objects)

https://codereview.chromium.org/1476523004/diff/80001/components/password_man...
components/password_manager/core/browser/password_form_manager.h:474: //
credentials and it was entered on a retry password form.
nit: Seems like you could leave out "credentials"?

Powered by Google App Engine
This is Rietveld 408576698