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

Issue 1050903002: Postpone check if password form is loaded from store (Closed)

Created:
5 years, 8 months ago by dvadym
Modified:
3 years, 5 months ago
CC:
chromium-reviews, gcasto+watchlist_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

In some cases we encounter situation when in processing onSubmit of password form we didn't receive information from password store yet. For example this can happen when JavaScript creates password form after submission and submit it (as for nytimes.com). To process such situation this CL postpones checking if password form fetched from store until moment when we are going to decide if we should save it. In order to process this correctly creating pending credentials in PasswordManager was moved to separate method and it is called only when both events happen - form submission and fetching from store finished. Tests are not added yet BUG=470322 Committed: https://crrev.com/f46ff48284131eba449796a932ec32290b03a403 Cr-Commit-Position: refs/heads/master@{#324400}

Patch Set 1 #

Patch Set 2 : Postponing creating pending credentials #

Patch Set 3 : Small fixes #

Patch Set 4 : Rebase #

Patch Set 5 : Small fix #

Total comments: 13

Patch Set 6 : Addressed reviewer comments #

Patch Set 7 : Added test and fix #

Total comments: 2

Patch Set 8 : Rebase #

Patch Set 9 : Comments fix #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+215 lines, -134 lines) Patch
M components/password_manager/core/browser/password_form_manager.h View 1 2 3 4 5 3 chunks +10 lines, -1 line 0 comments Download
M components/password_manager/core/browser/password_form_manager.cc View 1 2 3 4 5 6 5 chunks +136 lines, -113 lines 2 comments Download
M components/password_manager/core/browser/password_manager.cc View 1 2 3 4 5 6 7 4 chunks +20 lines, -20 lines 0 comments Download
M components/password_manager/core/browser/password_manager_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +49 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (3 generated)
dvadym
Hi Vaclav and Garrett, Could you please review this CL? Best regards, Vadym
5 years, 8 months ago (2015-04-07 12:51:05 UTC) #2
vabr (Chromium)
LGTM with some comments. Thanks! Vaclav https://codereview.chromium.org/1050903002/diff/70001/components/password_manager/core/browser/password_form_manager.cc File components/password_manager/core/browser/password_form_manager.cc (right): https://codereview.chromium.org/1050903002/diff/70001/components/password_manager/core/browser/password_form_manager.cc#newcode262 components/password_manager/core/browser/password_form_manager.cc:262: DCHECK(state_ == MATCHING_PHASE ...
5 years, 8 months ago (2015-04-07 13:27:15 UTC) #3
vabr (Chromium)
Still, I'd like to review the tests as well, before you land. Cheers, Vaclav
5 years, 8 months ago (2015-04-07 13:28:00 UTC) #4
dvadym
Thanks Vaclav! I've addressed your comments in PatchSet 6. Sure, I will not land until ...
5 years, 8 months ago (2015-04-07 13:49:10 UTC) #5
vabr (Chromium)
LGTM so far, looking forward to the tests. :) Cheers, Vaclav https://codereview.chromium.org/1050903002/diff/70001/components/password_manager/core/browser/password_manager.cc File components/password_manager/core/browser/password_manager.cc (right): ...
5 years, 8 months ago (2015-04-07 13:54:40 UTC) #6
dvadym
Hi Vaclav and Garrett, I've added a test and fixed a bug that I found ...
5 years, 8 months ago (2015-04-08 15:31:30 UTC) #7
vabr (Chromium)
Thanks for the test, LGTM! Vaclav https://codereview.chromium.org/1050903002/diff/110001/components/password_manager/core/browser/password_manager_unittest.cc File components/password_manager/core/browser/password_manager_unittest.cc (right): https://codereview.chromium.org/1050903002/diff/110001/components/password_manager/core/browser/password_manager_unittest.cc#newcode1101 components/password_manager/core/browser/password_manager_unittest.cc:1101: // Make that ...
5 years, 8 months ago (2015-04-08 16:22:40 UTC) #8
dvadym
Thanks Vaclav! https://codereview.chromium.org/1050903002/diff/110001/components/password_manager/core/browser/password_manager_unittest.cc File components/password_manager/core/browser/password_manager_unittest.cc (right): https://codereview.chromium.org/1050903002/diff/110001/components/password_manager/core/browser/password_manager_unittest.cc#newcode1101 components/password_manager/core/browser/password_manager_unittest.cc:1101: // Make that action called on GetLogins ...
5 years, 8 months ago (2015-04-08 16:26:21 UTC) #9
vabr (Chromium)
LGTM, thanks! Vaclav
5 years, 8 months ago (2015-04-09 07:21:30 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1050903002/150001
5 years, 8 months ago (2015-04-09 07:45:38 UTC) #12
commit-bot: I haz the power
Committed patchset #9 (id:150001)
5 years, 8 months ago (2015-04-09 08:41:51 UTC) #13
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/f46ff48284131eba449796a932ec32290b03a403 Cr-Commit-Position: refs/heads/master@{#324400}
5 years, 8 months ago (2015-04-09 08:42:48 UTC) #14
battre
Vadym, I have a question regarding a very old CL of yours. https://codereview.chromium.org/1050903002/diff/150001/components/password_manager/core/browser/password_form_manager.cc File components/password_manager/core/browser/password_form_manager.cc ...
3 years, 5 months ago (2017-07-13 13:30:51 UTC) #16
vabr (Chromium)
3 years, 5 months ago (2017-07-13 14:01:27 UTC) #17
Message was sent while issue was closed.
https://codereview.chromium.org/1050903002/diff/150001/components/password_ma...
File components/password_manager/core/browser/password_form_manager.cc (right):

https://codereview.chromium.org/1050903002/diff/150001/components/password_ma...
components/password_manager/core/browser/password_form_manager.cc:525:
CreatePendingCredentials();
On 2017/07/13 13:30:51, battre wrote:
> Do you remember why you decided not to return here but continue to process the
> frames by the drivers? - Just curious... (The code still exists today in a
> similar way)

The PasswordFormManager still needs to ensure saved forms are filled. The added
bit of code just adds a different functionality of creating pending credentials
in a special case of store response coming later than expected. There seems to
be no reason to suspend the first functionality because of executing the second
one.

Powered by Google App Engine
This is Rietveld 408576698