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

Issue 1028163002: Processing USERNAME reply from Autofill server in Password Manager (Closed)

Created:
5 years, 9 months ago by dvadym
Modified:
5 years, 8 months ago
CC:
browser-components-watch_chromium.org, chromium-reviews, darin-cc_chromium.org, estade+watch_chromium.org, gcasto+watchlist_chromium.org, jam, mkwst+moarreviews-renderer_chromium.org, mkwst+watchlist-passwords_chromium.org, mlamouri+watch-content_chromium.org, rouslan+autofillwatch_chromium.org, vabr (Chromium)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Processing USERNAME reply from Autofill server in Password Manager In this CL it's implemented overwriting username element in parsing of password forms when Autofill server informs which field is username. This will help to fix problems when local heuristics for finding username fails. It works in the following way: 1. Autofill server reply is propagated to PasswordManager::ProcessAutofillPredictions, where all predictions that don't contain USERNAME or USERNAME_AND_EMAIL_ADDRESS fields are filtered out. 2. Predictions with USERNAME are propageted to PasswordAutofillAgent, where they are saved (in method PasswordAutofillAgent::OnAutofillDataReceived) 3. During password form parsing we use saved predictions to choose correct username (in password_form_conversion_utils.cc in function FindPredictedUsernameElement) 4. It's allowed for forms that were parsed with Autofill predictions to be different from form stored PendingLoginManagers in username_element (in PasswordFormManager::DoesManage) otherwise parsed with autofill data forms would not be accepted. BUG=467460 Committed: https://crrev.com/89bccb1e2750638fb2fa3684aeb4074c02ff817e Cr-Commit-Position: refs/heads/master@{#323280}

Patch Set 1 #

Patch Set 2 : Added more comments #

Patch Set 3 : Added password manager unittest #

Patch Set 4 : Small fix #

Patch Set 5 : Small fix #

Total comments: 10

Patch Set 6 : Enum fix #

Patch Set 7 : Reviewer's comments addressed #

Total comments: 20

Patch Set 8 : Addressed reviewer comments #

Patch Set 9 : Added test and changed sending message #

Total comments: 55

Patch Set 10 : Addressed many reviewer comments #

Total comments: 28

Patch Set 11 : Rebase #

Patch Set 12 : Addressed reviewers comments #

Total comments: 4

Patch Set 13 : Small fixes #

Patch Set 14 : Small nit #

Total comments: 6

Patch Set 15 : Addressed reviewer comments #

Total comments: 2

Patch Set 16 : Addressed reviewer comments #

Patch Set 17 : Rebase #

Patch Set 18 : Fix compilation errors for Android and IOS #

Patch Set 19 : Fix mac enum compilation error #

Patch Set 20 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+348 lines, -41 lines) Patch
M android_webview/native/aw_autofill_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download
M android_webview/native/aw_autofill_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/autofill/chrome_autofill_client.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/autofill/chrome_autofill_client.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/renderer/autofill/password_autofill_agent_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +75 lines, -0 lines 0 comments Download
M components/autofill/content/browser/content_autofill_driver.h View 1 chunk +1 line, -1 line 0 comments Download
M components/autofill/content/browser/content_autofill_driver.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M components/autofill/content/common/autofill_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +11 lines, -0 lines 0 comments Download
M components/autofill/content/common/autofill_param_traits_macros.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M components/autofill/content/renderer/password_autofill_agent.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +8 lines, -0 lines 0 comments Download
M components/autofill/content/renderer/password_autofill_agent.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +17 lines, -8 lines 0 comments Download
M components/autofill/content/renderer/password_form_conversion_utils.h View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -1 line 0 comments Download
M components/autofill/content/renderer/password_form_conversion_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +68 lines, -3 lines 0 comments Download
M components/autofill/content/renderer/password_form_conversion_utils_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M components/autofill/content/renderer/password_generation_agent.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/autofill/core/browser/autofill_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -3 lines 0 comments Download
M components/autofill/core/browser/autofill_driver.h View 1 1 chunk +3 lines, -3 lines 0 comments Download
M components/autofill/core/browser/autofill_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M components/autofill/core/browser/autofill_metrics.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +5 lines, -0 lines 0 comments Download
M components/autofill/core/browser/autofill_profile.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M components/autofill/core/browser/autofill_type.cc View 1 2 3 4 5 6 7 3 chunks +8 lines, -0 lines 0 comments Download
M components/autofill/core/browser/field_types.h View 1 2 3 2 chunks +6 lines, -1 line 0 comments Download
M components/autofill/core/browser/personal_data_manager_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
M components/autofill/core/browser/test_autofill_client.h View 1 chunk +1 line, -1 line 0 comments Download
M components/autofill/core/browser/test_autofill_client.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/autofill/core/browser/test_autofill_driver.h View 1 chunk +1 line, -1 line 0 comments Download
M components/autofill/core/browser/test_autofill_driver.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/autofill/core/common/password_form.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +3 lines, -0 lines 0 comments Download
M components/autofill/core/common/password_form.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +7 lines, -2 lines 0 comments Download
M components/autofill/ios/browser/autofill_driver_ios.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download
M components/autofill/ios/browser/autofill_driver_ios.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -2 lines 0 comments Download
M components/password_manager/content/browser/content_password_manager_driver.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M components/password_manager/content/browser/content_password_manager_driver.cc View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -0 lines 0 comments Download
M components/password_manager/core/browser/password_form_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +7 lines, -1 line 0 comments Download
M components/password_manager/core/browser/password_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +8 lines, -0 lines 0 comments Download
M components/password_manager/core/browser/password_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +23 lines, -0 lines 0 comments Download
M components/password_manager/core/browser/password_manager_driver.h View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -0 lines 0 comments Download
M components/password_manager/core/browser/password_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +45 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 58 (20 generated)
dvadym
Hi Garret, Could you please review this CL? Best regards, Vadym
5 years, 9 months ago (2015-03-23 15:32:53 UTC) #2
vabr (Chromium)
An initial round of nits. :) I'll have one more pass when the tests are ...
5 years, 9 months ago (2015-03-23 16:48:23 UTC) #4
dvadym
Thanks Vaclav! https://codereview.chromium.org/1028163002/diff/80001/components/autofill/content/renderer/password_form_conversion_utils.cc File components/autofill/content/renderer/password_form_conversion_utils.cc (right): https://codereview.chromium.org/1028163002/diff/80001/components/autofill/content/renderer/password_form_conversion_utils.cc#newcode114 components/autofill/content/renderer/password_form_conversion_utils.cc:114: WebVector<WebFormControlElement>& control_elements, On 2015/03/23 16:48:23, vabr (Chromium) ...
5 years, 9 months ago (2015-03-23 17:20:45 UTC) #5
Garrett Casto
Generally looks good. Most of the comments are style or wordsmithing related. https://codereview.chromium.org/1028163002/diff/120001/components/autofill/content/renderer/password_form_conversion_utils.cc File components/autofill/content/renderer/password_form_conversion_utils.cc ...
5 years, 9 months ago (2015-03-24 01:31:12 UTC) #6
dvadym
Thanks Garrett. I've made changes according to your comments. PTAL. https://codereview.chromium.org/1028163002/diff/120001/components/autofill/content/renderer/password_form_conversion_utils.cc File components/autofill/content/renderer/password_form_conversion_utils.cc (right): https://codereview.chromium.org/1028163002/diff/120001/components/autofill/content/renderer/password_form_conversion_utils.cc#newcode117 ...
5 years, 9 months ago (2015-03-24 16:38:50 UTC) #7
Garrett Casto
LGTM https://codereview.chromium.org/1028163002/diff/160001/components/autofill/content/renderer/password_autofill_agent.h File components/autofill/content/renderer/password_autofill_agent.h (right): https://codereview.chromium.org/1028163002/diff/160001/components/autofill/content/renderer/password_autofill_agent.h#newcode181 components/autofill/content/renderer/password_autofill_agent.h:181: FindingUsernameWithAutofillPredictions); Don't friend here. Instead just send a ...
5 years, 9 months ago (2015-03-24 23:31:50 UTC) #8
vabr (Chromium)
Hi Vadym. LGTM with a collection of mostly nits. :) For the OWNERS check, I ...
5 years, 9 months ago (2015-03-25 10:12:34 UTC) #9
Mike West
https://codereview.chromium.org/1028163002/diff/160001/components/autofill/content/common/autofill_messages.h File components/autofill/content/common/autofill_messages.h (right): https://codereview.chromium.org/1028163002/diff/160001/components/autofill/content/common/autofill_messages.h#newcode41 components/autofill/content/common/autofill_messages.h:41: IPC_STRUCT_TRAITS_END() On 2015/03/25 at 10:12:33, vabr (Chromium) wrote: > ...
5 years, 9 months ago (2015-03-25 10:24:57 UTC) #11
dvadym
Thanks Garrett, Vaclav and Mike! I've addressed all your comments in PatchSet 10. https://codereview.chromium.org/1028163002/diff/160001/chrome/renderer/autofill/password_autofill_agent_browsertest.cc File ...
5 years, 9 months ago (2015-03-25 16:34:08 UTC) #12
dvadym
Hi Ilya, Could you please review changes in this CL that correspond to changes in ...
5 years, 9 months ago (2015-03-25 17:15:20 UTC) #14
Ilya Sherman
I'm not super happy about the round-trip through the renderer that's being used here. Is ...
5 years, 9 months ago (2015-03-26 00:30:04 UTC) #15
vabr (Chromium)
Hi Vadym, Some more comments under way. :) Thanks! Vaclav https://codereview.chromium.org/1028163002/diff/160001/components/autofill/content/renderer/password_form_conversion_utils.cc File components/autofill/content/renderer/password_form_conversion_utils.cc (right): https://codereview.chromium.org/1028163002/diff/160001/components/autofill/content/renderer/password_form_conversion_utils.cc#newcode6 ...
5 years, 9 months ago (2015-03-26 09:43:55 UTC) #16
dvadym
Thanks Ilya! Sorry, maybe my comment was a little bit confusing (about sending data back ...
5 years, 9 months ago (2015-03-26 12:25:08 UTC) #17
dvadym
Thanks Ilya and Vaclav! I've addressed your comments in PatchSet 12, PTAL. https://codereview.chromium.org/1028163002/diff/160001/components/autofill/content/renderer/password_form_conversion_utils.cc File components/autofill/content/renderer/password_form_conversion_utils.cc ...
5 years, 9 months ago (2015-03-26 12:29:13 UTC) #18
vabr (Chromium)
LGTM with some minor nits. Cheers, Vaclav https://codereview.chromium.org/1028163002/diff/220001/components/password_manager/core/browser/password_manager_unittest.cc File components/password_manager/core/browser/password_manager_unittest.cc (right): https://codereview.chromium.org/1028163002/diff/220001/components/password_manager/core/browser/password_manager_unittest.cc#newcode1063 components/password_manager/core/browser/password_manager_unittest.cc:1063: // will ...
5 years, 9 months ago (2015-03-26 12:49:46 UTC) #19
dvadym
Thanks Vaclav, fixed (PatchSet 13) https://codereview.chromium.org/1028163002/diff/220001/components/password_manager/core/browser/password_manager_unittest.cc File components/password_manager/core/browser/password_manager_unittest.cc (right): https://codereview.chromium.org/1028163002/diff/220001/components/password_manager/core/browser/password_manager_unittest.cc#newcode1063 components/password_manager/core/browser/password_manager_unittest.cc:1063: // will rejected as ...
5 years, 9 months ago (2015-03-26 13:38:27 UTC) #20
dvadym
https://codereview.chromium.org/1028163002/diff/180001/chrome/renderer/autofill/password_autofill_agent_browsertest.cc File chrome/renderer/autofill/password_autofill_agent_browsertest.cc (right): https://codereview.chromium.org/1028163002/diff/180001/chrome/renderer/autofill/password_autofill_agent_browsertest.cc#newcode281 chrome/renderer/autofill/password_autofill_agent_browsertest.cc:281: blink::WebInputElement GetInputElementByID(const char* id) { On 2015/03/26 00:30:04, Ilya ...
5 years, 9 months ago (2015-03-27 18:49:01 UTC) #21
Ilya Sherman
I guess LGTM (% nits), but it would be really nice to reduce the amount ...
5 years, 8 months ago (2015-03-31 00:45:04 UTC) #22
Ilya Sherman
I guess LGTM (% nits), but it would be really nice to reduce the amount ...
5 years, 8 months ago (2015-03-31 00:45:08 UTC) #23
dvadym
Thanks Ilya! I've addressed all your comments in PatchSet 15. Yeah, it would be nice ...
5 years, 8 months ago (2015-03-31 09:54:03 UTC) #24
Mike West
IPC LGTM % nits. https://codereview.chromium.org/1028163002/diff/280001/components/autofill/content/common/autofill_messages.h File components/autofill/content/common/autofill_messages.h (right): https://codereview.chromium.org/1028163002/diff/280001/components/autofill/content/common/autofill_messages.h#newcode105 components/autofill/content/common/autofill_messages.h:105: typedef std::map<autofill::FormData, autofill::FormFieldData> Nit: I ...
5 years, 8 months ago (2015-03-31 10:18:35 UTC) #25
dvadym
Thanks Mike, I've addressed your comments in PatchSet 16 https://codereview.chromium.org/1028163002/diff/280001/components/autofill/content/common/autofill_messages.h File components/autofill/content/common/autofill_messages.h (right): https://codereview.chromium.org/1028163002/diff/280001/components/autofill/content/common/autofill_messages.h#newcode105 components/autofill/content/common/autofill_messages.h:105: ...
5 years, 8 months ago (2015-03-31 11:37:26 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1028163002/300001
5 years, 8 months ago (2015-04-01 08:37:31 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/10646) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 8 months ago (2015-04-01 08:46:50 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1028163002/340001
5 years, 8 months ago (2015-04-01 09:57:19 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/53229)
5 years, 8 months ago (2015-04-01 10:07:24 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1028163002/360001
5 years, 8 months ago (2015-04-01 10:38:26 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/53234)
5 years, 8 months ago (2015-04-01 10:50:15 UTC) #41
dvadym
Hi Daniel, Could you please review IOS changes: components/autofill/ios/browser/autofill_driver_ios.h components/autofill/ios/browser/autofill_driver_ios.mm ? Best regards, Vadym
5 years, 8 months ago (2015-04-01 11:35:27 UTC) #43
dvadym
Hi Bo, Could you please review Android changes: android_webview/native/aw_autofill_client.h android_webview/native/aw_autofill_client.cc ? Best regards, Vadym
5 years, 8 months ago (2015-04-01 11:45:40 UTC) #45
dconnelly
This is not going to work on iOS. Please file a new iOS bug, assign ...
5 years, 8 months ago (2015-04-01 14:36:54 UTC) #46
boliu
android_webview rs lgtm
5 years, 8 months ago (2015-04-01 15:32:09 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1028163002/360001
5 years, 8 months ago (2015-04-01 16:04:15 UTC) #49
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/53313)
5 years, 8 months ago (2015-04-01 16:15:23 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1028163002/380001
5 years, 8 months ago (2015-04-01 16:31:41 UTC) #54
commit-bot: I haz the power
Committed patchset #20 (id:380001)
5 years, 8 months ago (2015-04-01 17:44:27 UTC) #55
commit-bot: I haz the power
Patchset 20 (id:??) landed as https://crrev.com/89bccb1e2750638fb2fa3684aeb4074c02ff817e Cr-Commit-Position: refs/heads/master@{#323280}
5 years, 8 months ago (2015-04-01 17:45:04 UTC) #56
stgao
5 years, 8 months ago (2015-04-03 00:00:34 UTC) #58

Powered by Google App Engine
This is Rietveld 408576698